From 4b08c830a1d76874bfdbb0880256eb47056ef60e Mon Sep 17 00:00:00 2001 From: viveksantayana Date: Thu, 16 Jun 2022 10:44:48 +0100 Subject: [PATCH] Finished quiz and debugging --- .../admin/components/certificate.html | 20 +++++------ .../templates/admin/components/navbar.html | 35 ++++++++++++++++-- .../components/secondary-navs/tests.html | 2 +- ref-test/app/admin/templates/admin/index.html | 6 ++-- .../admin/templates/admin/result-detail.html | 34 +++++++++--------- .../app/admin/templates/admin/results.html | 22 ++++++------ ref-test/app/admin/views.py | 15 ++++---- ref-test/app/api/views.py | 4 +-- ref-test/app/models/dataset.py | 1 + ref-test/app/models/entry.py | 13 +++++-- ref-test/app/quiz/templates/quiz/index.html | 2 +- .../app/quiz/templates/quiz/instructions.html | 2 +- ref-test/app/quiz/templates/quiz/result.html | 4 +-- ref-test/app/quiz/views.py | 34 +++++++++--------- ref-test/app/tools/test.py | 36 ++++++++++++++++--- 15 files changed, 148 insertions(+), 82 deletions(-) diff --git a/ref-test/app/admin/templates/admin/components/certificate.html b/ref-test/app/admin/templates/admin/components/certificate.html index 2a4bcdd..ad49efd 100644 --- a/ref-test/app/admin/templates/admin/components/certificate.html +++ b/ref-test/app/admin/templates/admin/components/certificate.html @@ -15,30 +15,30 @@
Candidate

- {{ entry.name.surname}}, {{ entry.name.first_name }} + {{ entry.get_surname()}}, {{ entry.get_first_name() }}

  • Email Address
    - {{ entry.email }} + {{ entry.get_email() }}
  • - {% if entry['club'] %} + {% if entry.club %}
  • Club
    - {{ entry.club }} + {{ entry.get_club() }}
  • {% endif %}
  • Exam Code
    - {{ '—'.join([entry.test_code[:4], entry.test_code[4:8], entry.test_code[8:]]) }} + {{ entry.test.get_code() }}
  • - {% if entry['user_code'] %} + {% if entry.user_code %}
  • User Code
    @@ -59,19 +59,19 @@ Late {% endif %}
    - {{ entry.submission_time.strftime('%d %b %Y %H:%M:%S') }} + {{ entry.end_time.strftime('%d %b %Y %H:%M:%S') }}
  • Score
    - {{ entry.results.score }}% + {{ entry.result.score }}%
  • -
  • +
  • Grade
    - {{ entry.results.grade[0]|upper }}{{ entry.results.grade[1:]}} + {{ entry.result.grade[0]|upper }}{{ entry.result.grade[1:]}}