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
38bcaeb7
Commit
38bcaeb7
authored
Jun 25, 2015
by
Afzal Wali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some integration changes.
parent
015c4c23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
edx_proctoring/api.py
+4
-4
edx_proctoring/views.py
+2
-2
No files found.
edx_proctoring/api.py
View file @
38bcaeb7
...
@@ -36,7 +36,7 @@ def create_exam(course_id, content_id, exam_name, time_limit_mins,
...
@@ -36,7 +36,7 @@ def create_exam(course_id, content_id, exam_name, time_limit_mins,
is_proctored
=
is_proctored
,
is_proctored
=
is_proctored
,
is_active
=
is_active
is_active
=
is_active
)
)
return
proctored_exam
return
proctored_exam
.
id
def
update_exam
(
exam_id
,
exam_name
=
None
,
time_limit_mins
=
None
,
def
update_exam
(
exam_id
,
exam_name
=
None
,
time_limit_mins
=
None
,
...
@@ -62,7 +62,7 @@ def update_exam(exam_id, exam_name=None, time_limit_mins=None,
...
@@ -62,7 +62,7 @@ def update_exam(exam_id, exam_name=None, time_limit_mins=None,
if
is_active
is
not
None
:
if
is_active
is
not
None
:
proctored_exam
.
is_active
=
is_active
proctored_exam
.
is_active
=
is_active
proctored_exam
.
save
()
proctored_exam
.
save
()
return
proctored_exam
return
proctored_exam
.
id
def
get_exam_by_id
(
exam_id
):
def
get_exam_by_id
(
exam_id
):
...
@@ -118,7 +118,7 @@ def start_exam_attempt(exam_id, user_id, external_id):
...
@@ -118,7 +118,7 @@ def start_exam_attempt(exam_id, user_id, external_id):
if
exam_attempt_obj
is
None
:
if
exam_attempt_obj
is
None
:
raise
StudentExamAttemptAlreadyExistException
raise
StudentExamAttemptAlreadyExistException
else
:
else
:
return
exam_attempt_obj
return
exam_attempt_obj
.
id
def
stop_exam_attempt
(
exam_id
,
user_id
):
def
stop_exam_attempt
(
exam_id
,
user_id
):
...
@@ -131,7 +131,7 @@ def stop_exam_attempt(exam_id, user_id):
...
@@ -131,7 +131,7 @@ def stop_exam_attempt(exam_id, user_id):
else
:
else
:
exam_attempt_obj
.
completed_at
=
datetime
.
now
(
pytz
.
UTC
)
exam_attempt_obj
.
completed_at
=
datetime
.
now
(
pytz
.
UTC
)
exam_attempt_obj
.
save
()
exam_attempt_obj
.
save
()
return
exam_attempt_obj
return
exam_attempt_obj
.
id
def
get_active_exams_for_user
(
user_id
,
course_id
=
None
):
def
get_active_exams_for_user
(
user_id
,
course_id
=
None
):
...
...
edx_proctoring/views.py
View file @
38bcaeb7
...
@@ -217,9 +217,9 @@ class StudentProctoredExamAttempt(AuthenticatedAPIView):
...
@@ -217,9 +217,9 @@ class StudentProctoredExamAttempt(AuthenticatedAPIView):
try
:
try
:
exam_attempt_id
=
stop_exam_attempt
(
exam_attempt_id
=
stop_exam_attempt
(
exam_id
=
request
.
DATA
.
get
(
'exam_id'
,
""
),
exam_id
=
request
.
DATA
.
get
(
'exam_id'
,
""
),
user
=
request
.
DATA
.
get
(
'user_id'
,
""
)
user
_id
=
request
.
DATA
.
get
(
'user_id'
,
""
)
)
)
return
Response
()
return
Response
(
{
"exam_attempt_id"
:
exam_attempt_id
}
)
except
Exception
:
except
Exception
:
return
Response
(
return
Response
(
...
...
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