show human readable time on exam overview page
This commit is contained in:
+1
-1
@@ -903,7 +903,7 @@ class ExamBase(ExamOrCollectionGenericBase):
|
|||||||
h, m, s = str(datetime.timedelta(seconds=self.time_limit)).split(":")
|
h, m, s = str(datetime.timedelta(seconds=self.time_limit)).split(":")
|
||||||
|
|
||||||
time_limit = ""
|
time_limit = ""
|
||||||
if s != "0":
|
if s != "0" and s != "00":
|
||||||
time_limit = f" {s} second(s)"
|
time_limit = f" {s} second(s)"
|
||||||
if m != "0":
|
if m != "0":
|
||||||
time_limit = f"{m} minute(s) {time_limit}"
|
time_limit = f"{m} minute(s) {time_limit}"
|
||||||
|
|||||||
@@ -27,7 +27,10 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
This exam has {{question_number}} questions. <span title="Time per question: {% widthratio exam.time_limit question_number 1 %} seconds">Time limit: {{exam.time_limit}} seconds</span>.
|
This exam has {{question_number}} questions.
|
||||||
|
<span title="Time per question: {% widthratio exam.time_limit question_number 1 %} seconds">Time limit: {{exam.time_limit}} seconds [{{exam.get_time_limit}}]
|
||||||
|
<i class="bi bi-info-circle"></i>
|
||||||
|
</span>.
|
||||||
Exam mode: {{ exam.exam_mode }}<br />
|
Exam mode: {{ exam.exam_mode }}<br />
|
||||||
|
|
||||||
{% if exam.exam_mode %}
|
{% if exam.exam_mode %}
|
||||||
|
|||||||
Reference in New Issue
Block a user