Commit 993c8e47 by chrisndodge

Merge pull request #47 from edx/cdodge/tweek-timeout-logic

Cdodge/tweek timeout logic
parents e7b91e39 0147a5e1
......@@ -533,8 +533,10 @@ def get_student_view(user_id, course_id, content_id,
has_time_expired = now_utc > expires_at
# make sure the attempt has been marked as timed_out, if need be
if has_time_expired and attempt['status'] != ProctoredExamStudentAttemptStatus.timed_out:
if has_time_expired and attempt['status'] == ProctoredExamStudentAttemptStatus.started:
mark_exam_attempt_timeout(exam_id, user_id)
# refetch since we are transitioning state
attempt = get_exam_attempt(exam_id, user_id)
if not has_started_exam:
# determine whether to show a timed exam only entrance screen
......@@ -552,7 +554,7 @@ def get_student_view(user_id, course_id, content_id,
})
else:
student_view_template = 'proctoring/seq_timed_exam_entrance.html'
elif has_time_expired:
elif attempt['status'] == ProctoredExamStudentAttemptStatus.timed_out:
student_view_template = 'proctoring/seq_timed_exam_expired.html'
elif attempt['status'] == ProctoredExamStudentAttemptStatus.submitted:
student_view_template = 'proctoring/seq_proctored_exam_submitted.html'
......
......@@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sample Progress Steps edX</title>
<style>
body {
background-color: #FAFAFA;
......
......@@ -18,7 +18,7 @@
</a>
<p>
{% blocktrans %}
You will be guided through installing edX-approved online proctoring software and
You will be guided through installing {{platform_name}} approved online proctoring software and
performing various checks to set up your proctored exam session. Have your photo ID
ready for the photo ID verification step.<br />
Immediately after you complete the set up, you will begin your timed and proctored exam.<br />
......
......@@ -15,7 +15,7 @@
<p>
{% blocktrans %}
In general sessions are reviewed in 24-48 hours of submission. If you have questions about
the status of this review after that timeframe, <a href="#">contact edX support</a>
the status of this review after that timeframe, <a href="#">contact {{platform_name}} support</a>
{% endblocktrans %}
</p>
<hr>
......
......@@ -42,6 +42,7 @@ from edx_proctoring.models import (
ProctoredExam,
ProctoredExamStudentAllowance,
ProctoredExamStudentAttempt,
ProctoredExamStudentAttemptStatus,
)
from .utils import (
......@@ -140,6 +141,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
user_id=self.user_id,
external_id=self.external_id,
started_at=started_at if started_at else datetime.now(pytz.UTC),
status=ProctoredExamStudentAttemptStatus.started,
allowed_time_limit_mins=10
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment