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
edx
edx-proctoring
Commits
381bf940
Commit
381bf940
authored
Sep 11, 2015
by
Will Daly
Committed by
Chris Dodge
Sep 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix coverage issue
parent
cd2ad3b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
edx_proctoring/serializers.py
+3
-19
No files found.
edx_proctoring/serializers.py
View file @
381bf940
...
@@ -5,22 +5,6 @@ from django.contrib.auth.models import User
...
@@ -5,22 +5,6 @@ from django.contrib.auth.models import User
from
edx_proctoring.models
import
ProctoredExam
,
ProctoredExamStudentAttempt
,
ProctoredExamStudentAllowance
from
edx_proctoring.models
import
ProctoredExam
,
ProctoredExamStudentAttempt
,
ProctoredExamStudentAllowance
class
StrictBooleanField
(
serializers
.
BooleanField
):
"""
Boolean field serializer to cater for a bug in DRF BooleanField serializer
where required=True is ignored.
"""
def
from_native
(
self
,
value
):
"""
Convert representations of a boolean to a Python `boolean`.
"""
if
value
in
(
'true'
,
't'
,
'True'
,
'1'
):
return
True
if
value
in
(
'false'
,
'f'
,
'False'
,
'0'
):
return
False
return
None
class
ProctoredExamSerializer
(
serializers
.
ModelSerializer
):
class
ProctoredExamSerializer
(
serializers
.
ModelSerializer
):
"""
"""
Serializer for the ProctoredExam Model.
Serializer for the ProctoredExam Model.
...
@@ -32,9 +16,9 @@ class ProctoredExamSerializer(serializers.ModelSerializer):
...
@@ -32,9 +16,9 @@ class ProctoredExamSerializer(serializers.ModelSerializer):
exam_name
=
serializers
.
CharField
(
required
=
True
)
exam_name
=
serializers
.
CharField
(
required
=
True
)
time_limit_mins
=
serializers
.
IntegerField
(
required
=
True
)
time_limit_mins
=
serializers
.
IntegerField
(
required
=
True
)
is_active
=
Strict
BooleanField
(
required
=
True
)
is_active
=
serializers
.
BooleanField
(
required
=
True
)
is_practice_exam
=
Strict
BooleanField
(
required
=
True
)
is_practice_exam
=
serializers
.
BooleanField
(
required
=
True
)
is_proctored
=
Strict
BooleanField
(
required
=
True
)
is_proctored
=
serializers
.
BooleanField
(
required
=
True
)
class
Meta
:
class
Meta
:
"""
"""
...
...
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