Bug fix and data persistence
This commit is contained in:
parent
63f72e35d2
commit
b4c94a7ddb
@ -28,6 +28,7 @@ services:
|
|||||||
- 5000
|
- 5000
|
||||||
volumes:
|
volumes:
|
||||||
- ./.security:/ref-test/.security
|
- ./.security:/ref-test/.security
|
||||||
|
- ./ref-test/data:/ref-test/data
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
|
@ -44,12 +44,14 @@
|
|||||||
{{ entry.user_code }}
|
{{ entry.user_code }}
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if 'start_time' in entry %}
|
||||||
<li class="list-group-item list-group-item-action">
|
<li class="list-group-item list-group-item-action">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<h5 class="mb-1">Start Time</h5>
|
<h5 class="mb-1">Start Time</h5>
|
||||||
</div>
|
</div>
|
||||||
{{ entry.start_time.strftime('%d %b %Y %H:%M:%S') }}
|
{{ entry.start_time.strftime('%d %b %Y %H:%M:%S') }}
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
<li class="list-group-item list-group-item-action">
|
<li class="list-group-item list-group-item-action">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
<h5 class="mb-1">Submission Time</h5>
|
<h5 class="mb-1">Submission Time</h5>
|
||||||
|
@ -143,6 +143,7 @@ def submit_quiz():
|
|||||||
if not entry:
|
if not entry:
|
||||||
return jsonify('Unrecognised ID', 'error'), 400
|
return jsonify('Unrecognised ID', 'error'), 400
|
||||||
status = 'submitted'
|
status = 'submitted'
|
||||||
|
if 'end_time' in entry:
|
||||||
if entry['end_time']:
|
if entry['end_time']:
|
||||||
if datetime.utcnow() > entry['end_time'] + timedelta(minutes=2):
|
if datetime.utcnow() > entry['end_time'] + timedelta(minutes=2):
|
||||||
status = 'late'
|
status = 'late'
|
||||||
|
Loading…
Reference in New Issue
Block a user