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
fe865706
Commit
fe865706
authored
Jul 01, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some things
parent
dbdefa4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
edx_proctoring/api.py
+6
-1
edx_proctoring/models.py
+4
-1
edx_proctoring/static/proctoring/js/proctored_exam_model.js
+1
-1
No files found.
edx_proctoring/api.py
View file @
fe865706
...
@@ -166,7 +166,12 @@ def create_exam_attempt(exam_id, user_id, external_id):
...
@@ -166,7 +166,12 @@ def create_exam_attempt(exam_id, user_id, external_id):
raise
StudentExamAttemptAlreadyExistsException
(
err_msg
)
raise
StudentExamAttemptAlreadyExistsException
(
err_msg
)
attempt
=
ProctoredExamStudentAttempt
.
create_exam_attempt
(
exam_id
,
user_id
,
external_id
)
attempt
=
ProctoredExamStudentAttempt
.
create_exam_attempt
(
exam_id
,
user_id
,
''
,
# student name is TBD
external_id
)
return
attempt
.
id
return
attempt
.
id
...
...
edx_proctoring/models.py
View file @
fe865706
...
@@ -89,6 +89,8 @@ class ProctoredExamStudentAttempt(TimeStampedModel):
...
@@ -89,6 +89,8 @@ class ProctoredExamStudentAttempt(TimeStampedModel):
# in case there is an option to opt-out
# in case there is an option to opt-out
taking_as_proctored
=
models
.
BooleanField
()
taking_as_proctored
=
models
.
BooleanField
()
student_name
=
models
.
CharField
(
max_length
=
255
)
class
Meta
:
class
Meta
:
""" Meta class for this Django model """
""" Meta class for this Django model """
db_table
=
'proctoring_proctoredexamstudentattempt'
db_table
=
'proctoring_proctoredexamstudentattempt'
...
@@ -100,7 +102,7 @@ class ProctoredExamStudentAttempt(TimeStampedModel):
...
@@ -100,7 +102,7 @@ class ProctoredExamStudentAttempt(TimeStampedModel):
return
self
.
started_at
and
not
self
.
completed_at
return
self
.
started_at
and
not
self
.
completed_at
@classmethod
@classmethod
def
create_exam_attempt
(
cls
,
exam_id
,
user_id
,
external_id
):
def
create_exam_attempt
(
cls
,
exam_id
,
user_id
,
student_name
,
external_id
):
"""
"""
Create a new exam attempt entry for a given exam_id and
Create a new exam attempt entry for a given exam_id and
user_id.
user_id.
...
@@ -109,6 +111,7 @@ class ProctoredExamStudentAttempt(TimeStampedModel):
...
@@ -109,6 +111,7 @@ class ProctoredExamStudentAttempt(TimeStampedModel):
return
cls
.
objects
.
create
(
return
cls
.
objects
.
create
(
proctored_exam_id
=
exam_id
,
proctored_exam_id
=
exam_id
,
user_id
=
user_id
,
user_id
=
user_id
,
student_name
=
student_name
,
external_id
=
external_id
external_id
=
external_id
)
)
...
...
edx_proctoring/static/proctoring/js/proctored_exam_model.js
View file @
fe865706
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
var
currentTime
=
(
new
Date
()).
getTime
();
var
currentTime
=
(
new
Date
()).
getTime
();
var
lastFetched
=
this
.
get
(
'lastFetched'
).
getTime
();
var
lastFetched
=
this
.
get
(
'lastFetched'
).
getTime
();
var
totalSeconds
=
this
.
get
(
'time_remaining_seconds'
)
-
(
currentTime
-
lastFetched
)
/
1000
;
var
totalSeconds
=
this
.
get
(
'time_remaining_seconds'
)
-
(
currentTime
-
lastFetched
)
/
1000
;
return
(
totalSeconds
>
0
)
?
totalSeconds
:
0
;
return
totalSeconds
;
},
},
getFormattedRemainingTime
:
function
()
{
getFormattedRemainingTime
:
function
()
{
var
totalSeconds
=
this
.
getRemainingSeconds
();
var
totalSeconds
=
this
.
getRemainingSeconds
();
...
...
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