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
edx
edx-proctoring
Commits
3504e79f
Commit
3504e79f
authored
Aug 16, 2017
by
attiyaishaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EDUCATOR-1104 Fix 500 error in course page.
parent
2bee1437
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
edx_proctoring/api.py
+1
-1
edx_proctoring/tests/test_api.py
+15
-0
No files found.
edx_proctoring/api.py
View file @
3504e79f
...
@@ -1235,7 +1235,7 @@ def _check_eligibility_of_enrollment_mode(credit_state):
...
@@ -1235,7 +1235,7 @@ def _check_eligibility_of_enrollment_mode(credit_state):
# Also make an exception for the honor students to take the "practice 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
# For the rest of the enrollment modes, None is returned which shows the exam content
# to the student rather than the proctoring prompt.
# to the student rather than the proctoring prompt.
return
credit_state
[
'enrollment_mode'
]
==
'verified'
return
credit_state
and
credit_state
[
'enrollment_mode'
]
==
'verified'
def
_get_ordered_prerequisites
(
prerequisites_statuses
,
filter_out_namespaces
=
None
):
def
_get_ordered_prerequisites
(
prerequisites_statuses
,
filter_out_namespaces
=
None
):
...
...
edx_proctoring/tests/test_api.py
View file @
3504e79f
...
@@ -1648,3 +1648,18 @@ class ProctoredExamApiTests(ProctoredExamTestCase):
...
@@ -1648,3 +1648,18 @@ class ProctoredExamApiTests(ProctoredExamTestCase):
self
.
assertEqual
(
len
(
results
[
'failed_prerequisites'
]),
expected_len_failed_prerequisites
)
self
.
assertEqual
(
len
(
results
[
'failed_prerequisites'
]),
expected_len_failed_prerequisites
)
self
.
assertEqual
(
len
(
results
[
'pending_prerequisites'
]),
expected_len_pending_prerequisites
)
self
.
assertEqual
(
len
(
results
[
'pending_prerequisites'
]),
expected_len_pending_prerequisites
)
self
.
assertEqual
(
len
(
results
[
'declined_prerequisites'
]),
expected_len_declined_prerequisites
)
self
.
assertEqual
(
len
(
results
[
'declined_prerequisites'
]),
expected_len_declined_prerequisites
)
def
test_summary_without_credit_state
(
self
):
"""
Test that attempt status summary is None for users who are not enrolled.
"""
exam_id
=
self
.
_create_exam_with_due_time
()
set_runtime_service
(
'credit'
,
MockCreditServiceNone
())
timed_exam
=
get_exam_by_id
(
exam_id
)
summary
=
get_attempt_status_summary
(
self
.
user
.
id
,
timed_exam
[
'course_id'
],
timed_exam
[
'content_id'
]
)
self
.
assertIsNone
(
summary
)
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