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
c115ff36
Commit
c115ff36
authored
Mar 08, 2016
by
Douglas Hall
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #282 from edx/afzaledx/SOL-1653_course_due_date_for_self_paced
Afzaledx/sol 1653 course due date for self paced
parents
e7ca75c2
397b9a02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
edx_proctoring/api.py
+10
-0
edx_proctoring/tests/test_api.py
+10
-5
No files found.
edx_proctoring/api.py
View file @
c115ff36
...
@@ -1779,6 +1779,16 @@ def get_student_view(user_id, course_id, content_id,
...
@@ -1779,6 +1779,16 @@ def get_student_view(user_id, course_id, content_id,
# data
# data
return
None
return
None
# Just in case the due date has been changed because of the
# self-paced courses, use the due date from the context and
# update the local exam object if necessary.
if
exam
[
'due_date'
]
!=
context
.
get
(
'due_date'
,
None
):
update_exam
(
exam_id
=
exam
[
'id'
],
due_date
=
context
.
get
(
'due_date'
,
None
)
)
exam
[
'due_date'
]
=
context
.
get
(
'due_date'
,
None
)
exam_id
=
exam
[
'id'
]
exam_id
=
exam
[
'id'
]
except
ProctoredExamNotFoundException
:
except
ProctoredExamNotFoundException
:
# This really shouldn't happen
# This really shouldn't happen
...
...
edx_proctoring/tests/test_api.py
View file @
c115ff36
...
@@ -1385,7 +1385,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -1385,7 +1385,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
context
=
{
context
=
{
'is_proctored'
:
False
,
'is_proctored'
:
False
,
'display_name'
:
self
.
exam_name
,
'display_name'
:
self
.
exam_name
,
'default_time_limit_mins'
:
10
'default_time_limit_mins'
:
10
,
'due_date'
:
due_date
,
}
}
)
)
if
not
has_due_date_passed
:
if
not
has_due_date_passed
:
...
@@ -1414,7 +1415,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -1414,7 +1415,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
context
=
{
context
=
{
'is_proctored'
:
True
,
'is_proctored'
:
True
,
'display_name'
:
self
.
exam_name
,
'display_name'
:
self
.
exam_name
,
'default_time_limit_mins'
:
self
.
default_time_limit
'default_time_limit_mins'
:
self
.
default_time_limit
,
'due_date'
:
due_date
,
}
}
)
)
self
.
assertIn
(
self
.
exam_expired_msg
,
rendered_response
)
self
.
assertIn
(
self
.
exam_expired_msg
,
rendered_response
)
...
@@ -1429,7 +1431,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -1429,7 +1431,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
'is_proctored'
:
True
,
'is_proctored'
:
True
,
'is_practice_exam'
:
True
,
'is_practice_exam'
:
True
,
'display_name'
:
self
.
exam_name
,
'display_name'
:
self
.
exam_name
,
'default_time_limit_mins'
:
self
.
default_time_limit
'default_time_limit_mins'
:
self
.
default_time_limit
,
'due_date'
:
due_date
,
}
}
)
)
self
.
assertIn
(
self
.
exam_expired_msg
,
rendered_response
)
self
.
assertIn
(
self
.
exam_expired_msg
,
rendered_response
)
...
@@ -1458,7 +1461,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -1458,7 +1461,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
context
=
{
context
=
{
'is_proctored'
:
False
,
'is_proctored'
:
False
,
'display_name'
:
self
.
exam_name
,
'display_name'
:
self
.
exam_name
,
'default_time_limit_mins'
:
self
.
default_time_limit
'default_time_limit_mins'
:
self
.
default_time_limit
,
'due_date'
:
due_date
,
}
}
)
)
self
.
assertIn
(
self
.
exam_expired_msg
,
rendered_response
)
self
.
assertIn
(
self
.
exam_expired_msg
,
rendered_response
)
...
@@ -1473,7 +1477,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -1473,7 +1477,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
'is_proctored'
:
True
,
'is_proctored'
:
True
,
'is_practice_exam'
:
True
,
'is_practice_exam'
:
True
,
'display_name'
:
self
.
exam_name
,
'display_name'
:
self
.
exam_name
,
'default_time_limit_mins'
:
self
.
default_time_limit
'default_time_limit_mins'
:
self
.
default_time_limit
,
'due_date'
:
due_date
,
}
}
)
)
self
.
assertIn
(
self
.
exam_expired_msg
,
rendered_response
)
self
.
assertIn
(
self
.
exam_expired_msg
,
rendered_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