Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
85c4c68e
Commit
85c4c68e
authored
Aug 17, 2015
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9331 from edx/cdodge/only-global-staff-see-proctoring
only let global staff (is_staff) see the proctoring tab
parents
a345edfa
1bd0ce57
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletions
+35
-1
lms/djangoapps/instructor/tests/test_proctoring.py
+28
-0
lms/djangoapps/instructor/views/instructor_dashboard.py
+7
-1
No files found.
lms/djangoapps/instructor/tests/test_proctoring.py
View file @
85c4c68e
...
...
@@ -39,6 +39,34 @@ class TestProctoringDashboardViews(ModuleStoreTestCase):
"""
Test Pass Proctoring Tab is in the Instructor Dashboard
"""
self
.
instructor
.
is_staff
=
True
self
.
instructor
.
save
()
response
=
self
.
client
.
get
(
self
.
url
)
self
.
assertTrue
(
self
.
proctoring_link
in
response
.
content
)
self
.
assertTrue
(
'Allowance Section'
in
response
.
content
)
def
test_no_tab_non_global_staff
(
self
):
"""
Test Pass Proctoring Tab is not in the Instructor Dashboard
for non global staff users
"""
self
.
instructor
.
is_staff
=
False
self
.
instructor
.
save
()
response
=
self
.
client
.
get
(
self
.
url
)
self
.
assertFalse
(
self
.
proctoring_link
in
response
.
content
)
self
.
assertFalse
(
'Allowance Section'
in
response
.
content
)
@patch.dict
(
settings
.
FEATURES
,
{
'ENABLE_PROCTORED_EXAMS'
:
False
})
def
test_no_tab_flag_unset
(
self
):
"""
Test Pass Proctoring Tab is not in the Instructor Dashboard
if the feature flag 'ENABLE_PROCTORED_EXAMS' is unset.
"""
self
.
instructor
.
is_staff
=
True
self
.
instructor
.
save
()
response
=
self
.
client
.
get
(
self
.
url
)
self
.
assertFalse
(
self
.
proctoring_link
in
response
.
content
)
self
.
assertFalse
(
'Allowance Section'
in
response
.
content
)
lms/djangoapps/instructor/views/instructor_dashboard.py
View file @
85c4c68e
...
...
@@ -142,7 +142,13 @@ def instructor_dashboard_2(request, course_id):
sections
.
append
(
_section_e_commerce
(
course
,
access
,
paid_modes
[
0
],
is_white_label
,
is_white_label
))
# Gate access to Proctoring tab
if
settings
.
FEATURES
.
get
(
'ENABLE_PROCTORED_EXAMS'
,
False
)
and
course
.
enable_proctored_exams
:
# only global staff (user.is_staff) is allowed to see this tab
can_see_proctoring
=
(
settings
.
FEATURES
.
get
(
'ENABLE_PROCTORED_EXAMS'
,
False
)
and
course
.
enable_proctored_exams
and
request
.
user
.
is_staff
)
if
can_see_proctoring
:
sections
.
append
(
_section_proctoring
(
course
,
access
))
# Certificates panel
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment