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
08e4928f
Commit
08e4928f
authored
Aug 18, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove useless line
parent
4f839e65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
edx_proctoring/api.py
+18
-18
No files found.
edx_proctoring/api.py
View file @
08e4928f
...
@@ -603,7 +603,7 @@ def update_attempt_status(exam_id, user_id, to_status, raise_if_not_found=True,
...
@@ -603,7 +603,7 @@ def update_attempt_status(exam_id, user_id, to_status, raise_if_not_found=True,
if
cascade_effects
:
if
cascade_effects
:
# some state transitions (namely to a rejected or declined status)
# some state transitions (namely to a rejected or declined status)
# will mark other exams as declined because once we fail or decline
# will mark other exams as declined because once we fail or decline
# one exam all other (un-completed) proctored exams will
w
e likewise
# one exam all other (un-completed) proctored exams will
b
e likewise
# updated to reflect a declined status
# updated to reflect a declined status
cascade_failure
=
to_status
in
[
cascade_failure
=
to_status
in
[
ProctoredExamStudentAttemptStatus
.
rejected
,
ProctoredExamStudentAttemptStatus
.
rejected
,
...
@@ -627,23 +627,23 @@ def update_attempt_status(exam_id, user_id, to_status, raise_if_not_found=True,
...
@@ -627,23 +627,23 @@ def update_attempt_status(exam_id, user_id, to_status, raise_if_not_found=True,
]
]
for
exam
in
exams
:
for
exam
in
exams
:
if
exam
.
content_id
!=
exam_attempt_obj
.
proctored_exam
.
content_id
:
# see if there was an attempt on those other exams already
# make sure there was no attempt
attempt
=
get_exam_attempt
(
exam
.
id
,
user_id
)
attempt
=
get_exam_attempt
(
exam
.
id
,
user_id
)
if
attempt
and
ProctoredExamStudentAttemptStatus
.
is_completed_status
(
attempt
[
'status'
]):
if
attempt
and
ProctoredExamStudentAttemptStatus
.
is_completed_status
(
attempt
[
'status'
]):
# don't touch any completed statuses
# don't touch any completed statuses
# we won't revoke those
continue
continue
if
not
attempt
:
if
not
attempt
:
create_exam_attempt
(
exam
.
id
,
user_id
,
taking_as_proctored
=
False
)
create_exam_attempt
(
exam
.
id
,
user_id
,
taking_as_proctored
=
False
)
# update any new or existing status to declined
# update any new or existing status to declined
update_attempt_status
(
update_attempt_status
(
exam
.
id
,
exam
.
id
,
user_id
,
user_id
,
ProctoredExamStudentAttemptStatus
.
declined
,
ProctoredExamStudentAttemptStatus
.
declined
,
cascade_effects
=
False
cascade_effects
=
False
)
)
if
to_status
==
ProctoredExamStudentAttemptStatus
.
submitted
:
if
to_status
==
ProctoredExamStudentAttemptStatus
.
submitted
:
# also mark the exam attempt completed_at timestamp
# also mark the exam attempt completed_at timestamp
...
...
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