Commit 5a023e43 by Muhammad Shoaib

added the footer html

parent 7f1a0a5d
{% load i18n %}
<div class="sequence" >
<div class="gated-sequence">
All done!
{% trans "All done!" %}
</div>
</div>
{% include 'proctoring/seq_timed_exam_footer.html' %}
......@@ -10,7 +10,7 @@
<strong>
{% trans "In order to successfully pass this exam you will have to answer the following questions and problems in the time allotted." %}
</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>
<div class="gated-sequence">
{% blocktrans %}
......@@ -21,6 +21,7 @@
{% endblocktrans %}
</div>
</div>
{% include 'proctoring/seq_timed_exam_footer.html' %}
<script type="text/javascript">
$('.start-timed-exam').click(
......
{% load i18n %}
<div class="sequence">
<div class="gated-sequence">
You have run out of time!
{% trans "You have run out of time!" %}
</div>
</div>
{% include 'proctoring/seq_timed_exam_footer.html' %}
\ No newline at end of file
{% 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
......@@ -2,6 +2,7 @@
Helpers for the HTTP APIs
"""
from django.utils.translation import ugettext as _
from rest_framework.views import APIView
from rest_framework.authentication import SessionAuthentication
from rest_framework.permissions import IsAuthenticated
......@@ -33,25 +34,25 @@ def humanized_time(time_in_minutes):
if hours == 0:
hours_present = False
elif hours == 1:
template = "{num_of_hours} Hour"
template = _("{num_of_hours} Hour")
hours_present = True
elif hours >= 2:
template = "{num_of_hours} Hours"
template = _("{num_of_hours} Hours")
hours_present = True
if minutes == 0:
if not hours_present:
template = "{num_of_minutes} Minutes"
template = _("{num_of_minutes} Minutes")
elif minutes == 1:
if hours_present:
template += " and {num_of_minutes} Minute"
template += _(" and {num_of_minutes} Minute")
else:
template += "{num_of_minutes} Minute"
template += _("{num_of_minutes} Minute")
elif minutes >= 2:
if hours_present:
template += " and {num_of_minutes} Minutes"
template += _(" and {num_of_minutes} Minutes")
else:
template += "{num_of_minutes} Minutes"
template += _("{num_of_minutes} Minutes")
human_time = template.format(num_of_hours=hours, num_of_minutes=minutes)
return human_time
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment