push
32 of 78 new or added lines in 7 files covered. (41.03%)
5741 existing lines in 105 files now uncovered.4922 of 15153 relevant lines covered (32.48%)
5.06 hits per line
UNCOV
1
|
class StudentViewController < ApplicationController |
× |
UNCOV
2
|
include AuthorizationHelper
|
× |
3 |
|
|
UNCOV
4
|
def action_allowed? |
× |
UNCOV
5
|
current_user_has_instructor_privileges? |
× |
UNCOV
6
|
end
|
× |
7 |
|
|
UNCOV
8
|
def flip_view |
× |
9 |
# flips the value of session[:flip_user], allowing an instructor
|
|
10 |
# to see the student view, or allows them to switch back, due to
|
|
11 |
# check on session[:flip_user] in _navigation.html.erb.
|
|
12 |
|
|
13 |
# if flag is false or uninitialized, set it to true
|
|
UNCOV
14
|
if session[:flip_user].nil? || !session[:flip_user] |
× |
UNCOV
15
|
session[:flip_user] = true |
× |
UNCOV
16
|
redirect_to '/'
|
× |
17 |
|
|
18 |
# if flag is true, set to false.
|
|
UNCOV
19
|
elsif session[:flip_user] |
× |
UNCOV
20
|
session[:flip_user] = false |
× |
UNCOV
21
|
redirect_to '/'
|
× |
UNCOV
22
|
end
|
× |
UNCOV
23
|
end
|
× |
UNCOV
24
|
end
|
× |