push
0 of 1 new or added line in 1 file covered. (0.0%)
6593 existing lines in 123 files now uncovered.2413 of 15669 relevant lines covered (15.4%)
1.24 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
|
× |