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
be001340
Commit
be001340
authored
Jul 30, 2015
by
Afzal Wali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHX-70 added fields to schema
parent
29c4c4b5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
edx_proctoring/api.py
+5
-2
edx_proctoring/migrations/0007_auto__add_field_proctoredexam_is_practice_exam.py
+0
-0
edx_proctoring/models.py
+3
-0
No files found.
edx_proctoring/api.py
View file @
be001340
...
@@ -45,7 +45,7 @@ def is_feature_enabled():
...
@@ -45,7 +45,7 @@ def is_feature_enabled():
def
create_exam
(
course_id
,
content_id
,
exam_name
,
time_limit_mins
,
def
create_exam
(
course_id
,
content_id
,
exam_name
,
time_limit_mins
,
is_proctored
=
True
,
external_id
=
None
,
is_active
=
True
):
is_proctored
=
True
,
is_practice_exam
=
False
,
external_id
=
None
,
is_active
=
True
):
"""
"""
Creates a new ProctoredExam entity, if the course_id/content_id pair do not already exist.
Creates a new ProctoredExam entity, if the course_id/content_id pair do not already exist.
If that pair already exists, then raise exception.
If that pair already exists, then raise exception.
...
@@ -62,13 +62,14 @@ def create_exam(course_id, content_id, exam_name, time_limit_mins,
...
@@ -62,13 +62,14 @@ def create_exam(course_id, content_id, exam_name, time_limit_mins,
exam_name
=
exam_name
,
exam_name
=
exam_name
,
time_limit_mins
=
time_limit_mins
,
time_limit_mins
=
time_limit_mins
,
is_proctored
=
is_proctored
,
is_proctored
=
is_proctored
,
is_practice_exam
=
is_practice_exam
,
is_active
=
is_active
is_active
=
is_active
)
)
return
proctored_exam
.
id
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
,
is_proctored
=
None
,
external_id
=
None
,
is_active
=
None
):
is_proctored
=
None
,
is_practice_exam
=
None
,
external_id
=
None
,
is_active
=
None
):
"""
"""
Given a Django ORM id, update the existing record, otherwise raise exception if not found.
Given a Django ORM id, update the existing record, otherwise raise exception if not found.
If an argument is not passed in, then do not change it's current value.
If an argument is not passed in, then do not change it's current value.
...
@@ -85,6 +86,8 @@ def update_exam(exam_id, exam_name=None, time_limit_mins=None,
...
@@ -85,6 +86,8 @@ def update_exam(exam_id, exam_name=None, time_limit_mins=None,
proctored_exam
.
time_limit_mins
=
time_limit_mins
proctored_exam
.
time_limit_mins
=
time_limit_mins
if
is_proctored
is
not
None
:
if
is_proctored
is
not
None
:
proctored_exam
.
is_proctored
=
is_proctored
proctored_exam
.
is_proctored
=
is_proctored
if
is_practice_exam
is
not
None
:
proctored_exam
.
is_practice_exam
=
is_practice_exam
,
if
external_id
is
not
None
:
if
external_id
is
not
None
:
proctored_exam
.
external_id
=
external_id
proctored_exam
.
external_id
=
external_id
if
is_active
is
not
None
:
if
is_active
is
not
None
:
...
...
edx_proctoring/migrations/0007_auto__add_field_proctoredexam_is_practice_exam.py
0 → 100644
View file @
be001340
This diff is collapsed.
Click to expand it.
edx_proctoring/models.py
View file @
be001340
...
@@ -37,6 +37,9 @@ class ProctoredExam(TimeStampedModel):
...
@@ -37,6 +37,9 @@ class ProctoredExam(TimeStampedModel):
# Whether this exam actually is proctored or not.
# Whether this exam actually is proctored or not.
is_proctored
=
models
.
BooleanField
()
is_proctored
=
models
.
BooleanField
()
# Whether this exam is for practice only.
is_practice_exam
=
models
.
BooleanField
()
# Whether this exam will be active.
# Whether this exam will be active.
is_active
=
models
.
BooleanField
()
is_active
=
models
.
BooleanField
()
...
...
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