From 147ea612d071659f5a00c8c47652788e9ed13f23 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 28 Jul 2021 19:51:28 +0100 Subject: [PATCH] . --- sbas/templates/sbas/available_exam_list.html | 19 ++++ sbas/templates/sbas/base.html | 14 +++ sbas/templates/sbas/exam_list.html | 34 ++++++ sbas/templates/sbas/exam_overview.html | 103 +++++++++++++++++++ sbas/templates/sbas/exam_scores.html | 65 ++++++++++++ sbas/templates/sbas/exam_scores_user.html | 23 +++++ sbas/templates/sbas/exams.html | 6 ++ sbas/templates/sbas/index.html | 10 ++ sbas/templates/sbas/question_list.html | 20 ++++ 9 files changed, 294 insertions(+) create mode 100644 sbas/templates/sbas/available_exam_list.html create mode 100644 sbas/templates/sbas/base.html create mode 100644 sbas/templates/sbas/exam_list.html create mode 100644 sbas/templates/sbas/exam_overview.html create mode 100644 sbas/templates/sbas/exam_scores.html create mode 100644 sbas/templates/sbas/exam_scores_user.html create mode 100644 sbas/templates/sbas/exams.html create mode 100644 sbas/templates/sbas/index.html create mode 100644 sbas/templates/sbas/question_list.html diff --git a/sbas/templates/sbas/available_exam_list.html b/sbas/templates/sbas/available_exam_list.html new file mode 100644 index 00000000..a3d85f7d --- /dev/null +++ b/sbas/templates/sbas/available_exam_list.html @@ -0,0 +1,19 @@ +{% extends 'sbas/base.html' %} + +{% block content %} +

Examinations

+
+ Active exams:
+ + + +
+{% endblock %} \ No newline at end of file diff --git a/sbas/templates/sbas/base.html b/sbas/templates/sbas/base.html new file mode 100644 index 00000000..98249dcf --- /dev/null +++ b/sbas/templates/sbas/base.html @@ -0,0 +1,14 @@ +{% extends 'base.html' %} + +{% block title %} +Sbas +{% endblock %} + +{% block navigation %} +Sbas: +{% if request.user.is_authenticated %} +Exams / +{% endif %} +{% endblock %} +{% block content %} +{% endblock %} \ No newline at end of file diff --git a/sbas/templates/sbas/exam_list.html b/sbas/templates/sbas/exam_list.html new file mode 100644 index 00000000..4169f3fd --- /dev/null +++ b/sbas/templates/sbas/exam_list.html @@ -0,0 +1,34 @@ +{% extends 'sbas/base.html' %} + +{% block content %} +

Examinations

+
+ Active exams:
+ + + Inactive exams:
+ + +

Active exams will be available to take at the below url: + Available exams +

+ + +
+{% endblock %} \ No newline at end of file diff --git a/sbas/templates/sbas/exam_overview.html b/sbas/templates/sbas/exam_overview.html new file mode 100644 index 00000000..ac5ccff2 --- /dev/null +++ b/sbas/templates/sbas/exam_overview.html @@ -0,0 +1,103 @@ +{% extends 'sbas/exams.html' %} + +{% block content %} + +{% load thumbnail %} +
+

Exam: {{ exam.name }}

+ This exam has {{question_number}} questions. + +
+ Exam active: [When checked the exam will be available to take in the test system] +
+
+ Publish results: [When checked the exam results will be available on this site] +
+ + This exam will be available to take here (when active). + + {% autoescape off %} +
    + {% for question in questions.all %} + +
  1. + {{ question.stem }} +
      +
    1. + {{ question.a }}: {{ question.a_answer }} +
    2. +
    3. + {{ question.b }}: {{ question.b_answer }} +
    4. +
    5. + {{ question.c }}: {{ question.c_answer }} +
    6. +
    7. + {{ question.d }}: {{ question.d_answer }} +
    8. +
    9. + {{ question.e }}: {{ question.e_answer }} +
    10. +
    + Category: {{ question.category }}, View Edit + +
  2. + {% endfor %} +
+ {% endautoescape %} + +
+ +{% endblock %} \ No newline at end of file diff --git a/sbas/templates/sbas/exam_scores.html b/sbas/templates/sbas/exam_scores.html new file mode 100644 index 00000000..3c8c5af6 --- /dev/null +++ b/sbas/templates/sbas/exam_scores.html @@ -0,0 +1,65 @@ +{% extends 'sbas/exams.html' %} + +{% block content %} +
+

{{ exam.name }}

+ +
+
+

Stats

+ Candidates: {{cids|length}}
+ Max score: {{max_score}}
+ Mean: {{mean}}, Median {{median}}, Mode {{mode}} + +
+

Distribution of results

{{plot|safe}} +
+
+
+ + + + + + {% for user, value in user_answers_marks.items %} + + + + + {% endfor %} +
Candidate IDScore
{{user}}{{user_scores|get_item:user}}
+
+
+

Answers as a table

+ + + + {% for cid in cids %} + + {% endfor %} + + + {% for question in questions %} + + + {% for zipped_answers in by_question|get_item:question %} + + {% endfor %} + + {% endfor %} + + + {% for score in user_scores_list %} + + {% endfor %} + +
Candidate{{cid}}
Question {{forloop.counter}} +
    + {% for ans, score in zipped_answers %} +
  1. {{ans}}
  2. + {% endfor %} +
+
Score:{{score}}
+ +
+{% endblock %} \ No newline at end of file diff --git a/sbas/templates/sbas/exam_scores_user.html b/sbas/templates/sbas/exam_scores_user.html new file mode 100644 index 00000000..e2003dd6 --- /dev/null +++ b/sbas/templates/sbas/exam_scores_user.html @@ -0,0 +1,23 @@ +{% extends 'sbas/base.html' %} + +{% block content %} +
+

Exam: {{ exam.name }}

+

Candidate: {{ cid }}

+ Answers: + +
Total mark: {{ total_score }} / {{max_score}} +
+ Other exams +
+
+{% endblock %} \ No newline at end of file diff --git a/sbas/templates/sbas/exams.html b/sbas/templates/sbas/exams.html new file mode 100644 index 00000000..d30b94f3 --- /dev/null +++ b/sbas/templates/sbas/exams.html @@ -0,0 +1,6 @@ +{% extends 'sbas/base.html' %} + +{% block navigation %} +
+Exams: {{exam.name}}-> Overview / Scores +{% endblock %} \ No newline at end of file diff --git a/sbas/templates/sbas/index.html b/sbas/templates/sbas/index.html new file mode 100644 index 00000000..2af12136 --- /dev/null +++ b/sbas/templates/sbas/index.html @@ -0,0 +1,10 @@ +{% extends 'sbas/base.html' %} + +{% block content %} +{% for exam in exams %} +
+

Exam: {{ exam.name }}

+ {% if request.user.is_staff %}Scores{% endif %} +
+{% endfor %} +{% endblock %} \ No newline at end of file diff --git a/sbas/templates/sbas/question_list.html b/sbas/templates/sbas/question_list.html new file mode 100644 index 00000000..f981a180 --- /dev/null +++ b/sbas/templates/sbas/question_list.html @@ -0,0 +1,20 @@ +{% extends 'anatomy/base.html' %} + +{% block content %} +{% for question in questions %} +
+
+ {{ question.created_date }} +
+

{% for answer in question.answers.all %} + {{ answer }}, + {% endfor %} +

+

{{ question.question_type.first|linebreaksbr }}

+ + ANSWER +
+{% endfor %} +{% endblock %} + +{$ black navigation %} \ No newline at end of file