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
03ce17c9
Commit
03ce17c9
authored
Jun 07, 2016
by
Eric Fischer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #291 from edx/efischer/fix_language
Timed exam support burden alleviation
parents
15bbc340
acab455a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
2 deletions
+34
-2
edx_proctoring/api.py
+5
-0
edx_proctoring/templates/timed_exam/entrance.html
+3
-1
edx_proctoring/templates/timed_exam/footer.html
+1
-1
edx_proctoring/tests/test_api.py
+25
-0
No files found.
edx_proctoring/api.py
View file @
03ce17c9
...
@@ -1490,6 +1490,10 @@ def _get_timed_exam_view(exam, context, exam_id, user_id, course_id):
...
@@ -1490,6 +1490,10 @@ def _get_timed_exam_view(exam, context, exam_id, user_id, course_id):
)
)
total_time
=
humanized_time
(
allowed_time_limit_mins
)
total_time
=
humanized_time
(
allowed_time_limit_mins
)
# According to WCAG, there is no need to allow for extra time if > 20 hours allowed
hide_extra_time_footer
=
exam
[
'time_limit_mins'
]
>
20
*
60
progress_page_url
=
''
progress_page_url
=
''
try
:
try
:
progress_page_url
=
reverse
(
progress_page_url
=
reverse
(
...
@@ -1504,6 +1508,7 @@ def _get_timed_exam_view(exam, context, exam_id, user_id, course_id):
...
@@ -1504,6 +1508,7 @@ def _get_timed_exam_view(exam, context, exam_id, user_id, course_id):
django_context
.
update
({
django_context
.
update
({
'total_time'
:
total_time
,
'total_time'
:
total_time
,
'hide_extra_time_footer'
:
hide_extra_time_footer
,
'will_be_revealed'
:
has_due_date
and
not
exam
[
'hide_after_due'
],
'will_be_revealed'
:
has_due_date
and
not
exam
[
'hide_after_due'
],
'exam_id'
:
exam_id
,
'exam_id'
:
exam_id
,
'exam_name'
:
exam
[
'exam_name'
],
'exam_name'
:
exam
[
'exam_name'
],
...
...
edx_proctoring/templates/timed_exam/entrance.html
View file @
03ce17c9
...
@@ -25,7 +25,9 @@
...
@@ -25,7 +25,9 @@
</a>
</a>
</button>
</button>
</div>
</div>
{% include 'timed_exam/footer.html' %}
{% if not hide_extra_time_footer %}
{% include 'timed_exam/footer.html' %}
{% endif %}
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
...
...
edx_proctoring/templates/timed_exam/footer.html
View file @
03ce17c9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"footer-sequence"
>
<div
class=
"footer-sequence"
>
<h4>
{% trans "Can I request additional time to complete my exam?" %}
</h4>
<h4>
{% trans "Can I request additional time to complete my exam?" %}
</h4>
<p>
{% blocktrans %}
<p>
{% blocktrans %}
If you have disabilities
or are taking the exam in difficult conditions
,
If you have disabilities,
you might be eligible for an additional time allowance on timed exams.
you might be eligible for an additional time allowance on timed exams.
Ask your course team for information about additional time allowances.
Ask your course team for information about additional time allowances.
{% endblocktrans %}
{% endblocktrans %}
...
...
edx_proctoring/tests/test_api.py
View file @
03ce17c9
...
@@ -143,6 +143,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -143,6 +143,7 @@ class ProctoredExamApiTests(LoggedInTestCase):
self
.
proctored_exam_email_subject
=
'Proctoring Session Results Update'
self
.
proctored_exam_email_subject
=
'Proctoring Session Results Update'
self
.
proctored_exam_email_body
=
'the status of your proctoring session review'
self
.
proctored_exam_email_body
=
'the status of your proctoring session review'
self
.
footer_msg
=
'About Proctored Exams'
self
.
footer_msg
=
'About Proctored Exams'
self
.
timed_footer_msg
=
'Can I request additional time to complete my exam?'
set_runtime_service
(
'credit'
,
MockCreditService
())
set_runtime_service
(
'credit'
,
MockCreditService
())
set_runtime_service
(
'instructor'
,
MockInstructorService
(
is_user_course_staff
=
True
))
set_runtime_service
(
'instructor'
,
MockInstructorService
(
is_user_course_staff
=
True
))
...
@@ -1451,6 +1452,30 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -1451,6 +1452,30 @@ class ProctoredExamApiTests(LoggedInTestCase):
)
)
self
.
assertIsNone
(
rendered_response
)
self
.
assertIsNone
(
rendered_response
)
@ddt.data
(
True
,
False
)
def
test_get_studentview_long_limit
(
self
,
under_exception
):
"""
Test for hide_extra_time_footer on exams with > 20 hours time limit
"""
exam_id
=
self
.
_create_exam_with_due_time
(
is_proctored
=
False
,
)
if
under_exception
:
update_exam
(
exam_id
,
time_limit_mins
=
((
20
*
60
)))
# exactly 20 hours
else
:
update_exam
(
exam_id
,
time_limit_mins
=
((
20
*
60
)
+
1
))
# 1 minute greater than 20 hours
rendered_response
=
get_student_view
(
user_id
=
self
.
user_id
,
course_id
=
self
.
course_id
,
content_id
=
self
.
content_id_for_exam_with_due_date
,
context
=
{
'is_proctored'
:
False
,
'display_name'
:
self
.
exam_name
,
}
)
if
under_exception
:
self
.
assertIn
(
self
.
timed_footer_msg
,
rendered_response
)
else
:
self
.
assertNotIn
(
self
.
timed_footer_msg
,
rendered_response
)
@ddt.data
(
@ddt.data
(
(
datetime
.
now
(
pytz
.
UTC
)
+
timedelta
(
days
=
1
),
False
),
(
datetime
.
now
(
pytz
.
UTC
)
+
timedelta
(
days
=
1
),
False
),
(
datetime
.
now
(
pytz
.
UTC
)
-
timedelta
(
days
=
1
),
False
),
(
datetime
.
now
(
pytz
.
UTC
)
-
timedelta
(
days
=
1
),
False
),
...
...
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