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
5a023e43
Commit
5a023e43
authored
Jun 30, 2015
by
Muhammad Shoaib
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added the footer html
parent
7f1a0a5d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
11 deletions
+29
-11
edx_proctoring/templates/proctoring/seq_timed_exam_completed.html
+3
-2
edx_proctoring/templates/proctoring/seq_timed_exam_entrance.html
+2
-1
edx_proctoring/templates/proctoring/seq_timed_exam_expired.html
+4
-1
edx_proctoring/templates/proctoring/seq_timed_exam_footer.html
+12
-0
edx_proctoring/utils.py
+8
-7
No files found.
edx_proctoring/templates/proctoring/seq_timed_exam_completed.html
View file @
5a023e43
{% load i18n %}
<div
class=
"sequence"
>
<div
class=
"sequence"
>
<div
class=
"gated-sequence"
>
<div
class=
"gated-sequence"
>
All done!
{% trans "All done!" %}
</div>
</div>
</div>
</div>
{% include 'proctoring/seq_timed_exam_footer.html' %}
edx_proctoring/templates/proctoring/seq_timed_exam_entrance.html
View file @
5a023e43
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<strong>
<strong>
{% trans "In order to successfully pass this exam you will have to answer the following questions and problems in the time allotted." %}
{% trans "In order to successfully pass this exam you will have to answer the following questions and problems in the time allotted." %}
</strong>
</strong>
Once you proceed, you'll start both the exam and the
total time {{total_time}} gives
to you.
Once you proceed, you'll start both the exam and the
{{total_time}} given
to you.
</p>
</p>
<div
class=
"gated-sequence"
>
<div
class=
"gated-sequence"
>
{% blocktrans %}
{% blocktrans %}
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
{% endblocktrans %}
{% endblocktrans %}
</div>
</div>
</div>
</div>
{% include 'proctoring/seq_timed_exam_footer.html' %}
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
'.start-timed-exam'
).
click
(
$
(
'.start-timed-exam'
).
click
(
...
...
edx_proctoring/templates/proctoring/seq_timed_exam_expired.html
View file @
5a023e43
{% load i18n %}
<div
class=
"sequence"
>
<div
class=
"sequence"
>
<div
class=
"gated-sequence"
>
<div
class=
"gated-sequence"
>
You have run out of time!
{% trans "You have run out of time!" %}
</div>
</div>
</div>
</div>
{% include 'proctoring/seq_timed_exam_footer.html' %}
\ No newline at end of file
edx_proctoring/templates/proctoring/seq_timed_exam_footer.html
0 → 100644
View file @
5a023e43
{% load i18n %}
<div
class=
"footer-sequence"
>
<h4>
{% trans "What if i need more time " %}?
</h4>
<p>
{% trans "edX ocassionally grants more time for students with disabilities and difficult conditions. " %}
{% blocktrans %}
Please see
<a
href=
"#"
>
our frequently asked questions about timed exams and more policies.
</a>
{% endblocktrans %}
</p>
</div>
\ No newline at end of file
edx_proctoring/utils.py
View file @
5a023e43
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
Helpers for the HTTP APIs
Helpers for the HTTP APIs
"""
"""
from
django.utils.translation
import
ugettext
as
_
from
rest_framework.views
import
APIView
from
rest_framework.views
import
APIView
from
rest_framework.authentication
import
SessionAuthentication
from
rest_framework.authentication
import
SessionAuthentication
from
rest_framework.permissions
import
IsAuthenticated
from
rest_framework.permissions
import
IsAuthenticated
...
@@ -33,25 +34,25 @@ def humanized_time(time_in_minutes):
...
@@ -33,25 +34,25 @@ def humanized_time(time_in_minutes):
if
hours
==
0
:
if
hours
==
0
:
hours_present
=
False
hours_present
=
False
elif
hours
==
1
:
elif
hours
==
1
:
template
=
"{num_of_hours} Hour"
template
=
_
(
"{num_of_hours} Hour"
)
hours_present
=
True
hours_present
=
True
elif
hours
>=
2
:
elif
hours
>=
2
:
template
=
"{num_of_hours} Hours"
template
=
_
(
"{num_of_hours} Hours"
)
hours_present
=
True
hours_present
=
True
if
minutes
==
0
:
if
minutes
==
0
:
if
not
hours_present
:
if
not
hours_present
:
template
=
"{num_of_minutes} Minutes"
template
=
_
(
"{num_of_minutes} Minutes"
)
elif
minutes
==
1
:
elif
minutes
==
1
:
if
hours_present
:
if
hours_present
:
template
+=
" and {num_of_minutes} Minute"
template
+=
_
(
" and {num_of_minutes} Minute"
)
else
:
else
:
template
+=
"{num_of_minutes} Minute"
template
+=
_
(
"{num_of_minutes} Minute"
)
elif
minutes
>=
2
:
elif
minutes
>=
2
:
if
hours_present
:
if
hours_present
:
template
+=
" and {num_of_minutes} Minutes"
template
+=
_
(
" and {num_of_minutes} Minutes"
)
else
:
else
:
template
+=
"{num_of_minutes} Minutes"
template
+=
_
(
"{num_of_minutes} Minutes"
)
human_time
=
template
.
format
(
num_of_hours
=
hours
,
num_of_minutes
=
minutes
)
human_time
=
template
.
format
(
num_of_hours
=
hours
,
num_of_minutes
=
minutes
)
return
human_time
return
human_time
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