diff --git a/ref-test/app/admin/templates/admin/components/certificate.html b/ref-test/app/admin/templates/admin/components/certificate.html index 1263357..6800e7c 100644 --- a/ref-test/app/admin/templates/admin/components/certificate.html +++ b/ref-test/app/admin/templates/admin/components/certificate.html @@ -50,7 +50,7 @@
Start Time
- {{ entry.start_time.strftime('%d %b %Y %H:%M:%S') }} + {{ entry.start_time.strftime('%d %b %Y %H:%M:%S') if entry.start_time else None }}
  • @@ -59,7 +59,7 @@ Late {% endif %}
    - {{ entry.end_time.strftime('%d %b %Y %H:%M:%S') }} + {{ entry.end_time.strftime('%d %b %Y %H:%M:%S') if entry.end_time else None }}
  • diff --git a/ref-test/app/admin/templates/admin/components/footer.html b/ref-test/app/admin/templates/admin/components/footer.html index e2cea14..83be05e 100644 --- a/ref-test/app/admin/templates/admin/components/footer.html +++ b/ref-test/app/admin/templates/admin/components/footer.html @@ -1,2 +1,2 @@ -

    This web app was developed by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at Vivek’s personal GIT repository under an MIT License.

    +

    This web app was developed and is maintained by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at Vivek’s personal GIT repository under an MIT License.

    All questions in the test are © The Scottish Korfball Association {{ now.year }}. All rights are reserved.

    \ No newline at end of file diff --git a/ref-test/app/admin/templates/admin/index.html b/ref-test/app/admin/templates/admin/index.html index 818aa2b..79e4990 100644 --- a/ref-test/app/admin/templates/admin/index.html +++ b/ref-test/app/admin/templates/admin/index.html @@ -28,7 +28,7 @@ {{ test.get_code() }} - {{ test.end_date.strftime('%d %b %Y') }} + {{ test.end_date.strftime('%d %b %Y') if test.end_date else None }} {% endfor %} @@ -72,10 +72,14 @@ {{ result.get_surname() }}, {{ result.get_first_name() }} - {{ result.end_time.strftime('%d %b %Y %H:%M') }} + {{ result.end_time.strftime('%d %b %Y %H:%M') if result.end_time else None }} - {{ (100*result.result['score']/result.result['max'])|round|int }}% ({{ result.result.grade }}) + {% if result.result %} + {{ (100*result.result['score']/result.result['max'])|round|int }}% ({{ result.result.grade }}) + {% else %} + Incomplete + {% endif %} {% endfor %} @@ -117,7 +121,7 @@ {{ test.get_code() }} - {{ test.end_date.strftime('%d %b %Y') }} + {{ test.end_date.strftime('%d %b %Y') if test.end_date else None }} {% endfor %} @@ -138,7 +142,7 @@
    Help
    -

    This web app was developed by Vivek Santayana. If there are any issues with the app, any bugs you need to report, or any features you would like to request, please feel free to open an issue at the Git Repository.

    +

    This web app was developed and is maintained by Vivek Santayana. If there are any issues with the app, any bugs you need to report, or any features you would like to request, please feel free to open an issue at the Git Repository.

    Open an Issue
    diff --git a/ref-test/app/admin/templates/admin/result-detail.html b/ref-test/app/admin/templates/admin/result-detail.html index 6a8bd6b..daffa8e 100644 --- a/ref-test/app/admin/templates/admin/result-detail.html +++ b/ref-test/app/admin/templates/admin/result-detail.html @@ -49,7 +49,7 @@
    Start Time
    - {{ entry.start_time.strftime('%d %b %Y %H:%M:%S') }} + {{ entry.start_time.strftime('%d %b %Y %H:%M:%S') if entry.start_time else None }}
  • {% endif %}
  • diff --git a/ref-test/app/admin/templates/admin/test.html b/ref-test/app/admin/templates/admin/test.html index a4cf407..6be88e2 100644 --- a/ref-test/app/admin/templates/admin/test.html +++ b/ref-test/app/admin/templates/admin/test.html @@ -32,13 +32,13 @@
    Start Date
    - {{ test.start_date.strftime('%d %b %Y %H:%M') }} + {{ test.start_date.strftime('%d %b %Y %H:%M') if test.start_date else None }}
  • Expiry Date
    - {{ test.end_date.strftime('%d %b %Y %H:%M') }} + {{ test.end_date.strftime('%d %b %Y %H:%M') if test.end_date else None }}
  • diff --git a/ref-test/app/admin/views.py b/ref-test/app/admin/views.py index ea66a53..45aeb1b 100644 --- a/ref-test/app/admin/views.py +++ b/ref-test/app/admin/views.py @@ -10,7 +10,7 @@ from flask import abort, Blueprint, jsonify, render_template, request, send_file from flask.helpers import abort, flash, redirect, url_for from flask_login import current_user, login_required -from datetime import date, datetime, timedelta +from datetime import date, datetime, MINYEAR, timedelta from json import loads from os import path import secrets @@ -34,11 +34,11 @@ def _home(): write('system.log', f'Database error when processing request \'{request.url}\': {exception}') return abort(500) current_tests = [ test for test in tests if test.end_date >= datetime.now() and test.start_date.date() <= date.today() ] - current_tests.sort(key= lambda x: x.end_date, reverse=True) + current_tests.sort(key= lambda x: x.end_date or datetime(MINYEAR,1,1), reverse=True) upcoming_tests = [ test for test in tests if test.start_date.date() > datetime.now().date()] - upcoming_tests.sort(key= lambda x: x.start_date) + upcoming_tests.sort(key= lambda x: x.start_date or datetime(MINYEAR,1,1)) recent_results = [result for result in results if not result.status == 'started' ] - recent_results.sort(key= lambda x: x.end_time, reverse=True) + recent_results.sort(key= lambda x: x.end_time or datetime(MINYEAR,1,1), reverse=True) return render_template('/admin/index.html', current_tests = current_tests, upcomimg_tests = upcoming_tests, recent_results = recent_results) @admin.route('/settings/') @@ -309,7 +309,7 @@ def _tests(filter:str=None): if filter in [None, '', 'active']: tests = [ test for test in _tests if test.end_date >= now and test.start_date <= now ] display_title = 'Active Exams' - error_none = 'There are no exams that are currently active. You can create one using the Creat Exam form.' + error_none = 'There are no exams that are currently active. You can create one using the Create Exam form.' if filter == 'expired': tests = [ test for test in _tests if test.end_date < now ] display_title = 'Expired Exams' diff --git a/ref-test/app/editor/templates/editor/components/footer.html b/ref-test/app/editor/templates/editor/components/footer.html index e2cea14..83be05e 100644 --- a/ref-test/app/editor/templates/editor/components/footer.html +++ b/ref-test/app/editor/templates/editor/components/footer.html @@ -1,2 +1,2 @@ -

    This web app was developed by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at Vivek’s personal GIT repository under an MIT License.

    +

    This web app was developed and is maintained by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at Vivek’s personal GIT repository under an MIT License.

    All questions in the test are © The Scottish Korfball Association {{ now.year }}. All rights are reserved.

    \ No newline at end of file diff --git a/ref-test/app/quiz/templates/quiz/components/footer.html b/ref-test/app/quiz/templates/quiz/components/footer.html index c4e6961..ef20355 100644 --- a/ref-test/app/quiz/templates/quiz/components/footer.html +++ b/ref-test/app/quiz/templates/quiz/components/footer.html @@ -1,3 +1,3 @@ -

    This web app was developed by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at Vivek’s personal GIT repository under an MIT License.

    +

    This web app was developed and is maintained by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at Vivek’s personal GIT repository under an MIT License.

    All questions in the test are © The Scottish Korfball Association {{ now.year }}. All rights are reserved.

    OpenDyslexic 3 is an open source typeface created by Abbie Gonzalez, licensed under a SIL-OFL. More information about OpenDyslexic is available on the project web site.

    \ No newline at end of file diff --git a/ref-test/app/templates/components/footer.html b/ref-test/app/templates/components/footer.html index c4e6961..ef20355 100644 --- a/ref-test/app/templates/components/footer.html +++ b/ref-test/app/templates/components/footer.html @@ -1,3 +1,3 @@ -

    This web app was developed by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at Vivek’s personal GIT repository under an MIT License.

    +

    This web app was developed and is maintained by Vivek Santayana. The source code for the web app, excluding any data pertaining to the questions in the quiz, is freely available at Vivek’s personal GIT repository under an MIT License.

    All questions in the test are © The Scottish Korfball Association {{ now.year }}. All rights are reserved.

    OpenDyslexic 3 is an open source typeface created by Abbie Gonzalez, licensed under a SIL-OFL. More information about OpenDyslexic is available on the project web site.

    \ No newline at end of file diff --git a/ref-test/app/templates/privacy.html b/ref-test/app/templates/privacy.html index 87fbff5..034870b 100644 --- a/ref-test/app/templates/privacy.html +++ b/ref-test/app/templates/privacy.html @@ -3,9 +3,19 @@ {% block content %}

    Privacy Policy

    - This web app stores data using cookies. The web site only stores the minimum information it needs to function. -
    Site Administrators
    + +
    Site Administrators