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
85160743
Commit
85160743
authored
Jul 01, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add proctoring start template
parent
49e8086b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
edx_proctoring/api.py
+11
-2
No files found.
edx_proctoring/api.py
View file @
85160743
...
@@ -222,18 +222,22 @@ def get_student_view(user_id, course_id, content_id, context):
...
@@ -222,18 +222,22 @@ def get_student_view(user_id, course_id, content_id, context):
has_started_exam
=
False
has_started_exam
=
False
has_finished_exam
=
False
has_finished_exam
=
False
has_time_expired
=
False
has_time_expired
=
False
is_proctored
=
False
student_view_template
=
None
student_view_template
=
None
exam_id
=
None
exam_id
=
None
try
:
try
:
exam
=
get_exam_by_content_id
(
course_id
,
content_id
)
exam
=
get_exam_by_content_id
(
course_id
,
content_id
)
exam_id
=
exam
[
'id'
]
exam_id
=
exam
[
'id'
]
is_proctored
=
exam
[
'is_proctored'
]
except
ProctoredExamNotFoundException
:
except
ProctoredExamNotFoundException
:
is_proctored
=
context
.
get
(
'is_proctored'
,
False
)
exam_id
=
create_exam
(
exam_id
=
create_exam
(
course_id
=
course_id
,
course_id
=
course_id
,
content_id
=
unicode
(
content_id
),
content_id
=
unicode
(
content_id
),
exam_name
=
context
[
'display_name'
],
exam_name
=
context
[
'display_name'
],
time_limit_mins
=
context
[
'default_time_limit_mins'
]
time_limit_mins
=
context
[
'default_time_limit_mins'
],
is_proctored
=
is_proctored
)
)
attempt
=
get_exam_attempt
(
exam_id
,
user_id
)
attempt
=
get_exam_attempt
(
exam_id
,
user_id
)
...
@@ -244,7 +248,12 @@ def get_student_view(user_id, course_id, content_id, context):
...
@@ -244,7 +248,12 @@ def get_student_view(user_id, course_id, content_id, context):
has_time_expired
=
now_utc
>
expires_at
has_time_expired
=
now_utc
>
expires_at
if
not
has_started_exam
:
if
not
has_started_exam
:
student_view_template
=
'proctoring/seq_timed_exam_entrance.html'
# determine whether to show a timed exam only entrace screen
# or a screen regarding proctoring
if
is_proctored
:
student_view_template
=
'proctoring/seq_proctored_exam_entrance.html'
else
:
student_view_template
=
'proctoring/seq_timed_exam_entrance.html'
elif
has_finished_exam
:
elif
has_finished_exam
:
student_view_template
=
'proctoring/seq_timed_exam_completed.html'
student_view_template
=
'proctoring/seq_timed_exam_completed.html'
elif
has_time_expired
:
elif
has_time_expired
:
...
...
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