Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-proctoring
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
OpenEdx
edx-proctoring
Commits
db5d3fa1
Commit
db5d3fa1
authored
Jul 30, 2015
by
Afzal Wali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored the enrollment_mode check a bit to allow for easier understanding of the logic involved.
parent
e2913575
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
edx_proctoring/api.py
+8
-5
No files found.
edx_proctoring/api.py
View file @
db5d3fa1
...
...
@@ -514,11 +514,14 @@ def get_student_view(user_id, course_id, content_id,
)
if
check_mode
:
# Return None (show exam content) for non verified users unless it's a practice exam
# where both honor and verified users are shown the proctoring screen.
if
context
[
'credit_state'
][
'enrollment_mode'
]
!=
'verified'
:
if
not
(
context
[
'is_practice_exam'
]
and
context
[
'credit_state'
][
'enrollment_mode'
]
==
'honor'
):
return
None
# Allow only the verified students to take the exam as a proctored exam
# Also make an exception for the honor students to take the "practice exam" as a proctored exam.
# For the rest of the enrollment modes, None is returned which shows the exam content
# to the student rather than the proctoring prompt.
if
not
(
context
[
'credit_state'
][
'enrollment_mode'
]
==
'verified'
or
(
context
[
'credit_state'
][
'enrollment_mode'
]
==
'honor'
and
context
[
'is_practice_exam'
])):
return
None
student_view_template
=
None
...
...
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