diff --git a/rapids/templates/rapids/exam.html b/rapids/templates/rapids/exam.html new file mode 100644 index 00000000..fb8b66ec --- /dev/null +++ b/rapids/templates/rapids/exam.html @@ -0,0 +1,79 @@ +{% extends 'anatomy/base.html' %} + +{% block content %} + + +

Question {{question_details.current}} of {{question_details.total}}

+

{{ question.question_type.first }}

+ + + + + +
+
+
+ +
{% csrf_token %} + {{ form.as_p }} + {% if question_details.current > 1 %} + + {% endif %} + {% if question_details.current >= question_details.total %} + + {% else %} + + {% endif %} + +
+
+
+ +
+
+ + +{% endblock %} \ No newline at end of file diff --git a/rapids/templates/rapids/exam_list.html b/rapids/templates/rapids/exam_list.html new file mode 100644 index 00000000..04388808 --- /dev/null +++ b/rapids/templates/rapids/exam_list.html @@ -0,0 +1,30 @@ +{% extends 'anatomy/base.html' %} + +{% block content %} +

Examinations

+
+ Active exams:
+ + + Inactive exams:
+ + + +
+{% endblock %} \ No newline at end of file diff --git a/rapids/templates/rapids/exam_overview.html b/rapids/templates/rapids/exam_overview.html new file mode 100644 index 00000000..36e730d8 --- /dev/null +++ b/rapids/templates/rapids/exam_overview.html @@ -0,0 +1,136 @@ +{% extends 'anatomy/exams.html' %} + +{% block content %} + +{% load thumbnail %} +
+ Admin Edit +

Exam: {{ exam.name }}

+ This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds. + +
+ 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] +
+

+ + +
    + {% for question in questions.all %} + +
  1. + thumbail + {{ question.description }} +
    + {{ question.question_type }}: {{ question.GetPrimaryAnswer }} +
    + Modality: {{ question.modality }}, View, Mark +
  2. + {% endfor %} +
+ JSON + Refresh JSON cache + + + +
+ +{% endblock %} \ No newline at end of file diff --git a/rapids/templates/rapids/exam_scores.html b/rapids/templates/rapids/exam_scores.html new file mode 100644 index 00000000..8dd68c4a --- /dev/null +++ b/rapids/templates/rapids/exam_scores.html @@ -0,0 +1,65 @@ +{% extends 'anatomy/exams.html' %} + +{% block content %} +
+

{{ exam.name }}

+ + {% if unmarked %} + The following questions need marking + {% for exam_index in unmarked %} + {{ exam_index|add:1 }} + {% endfor %} + + {% endif %} + +
+
+

Stats

+ Candidates: {{cids|length}}
+ Max score: {{max_score}}
+ Mean: {{mean}}, Median {{median}}, Mode {{mode}} + +
{{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 ans, score in by_question|get_item:question %} + + {% endfor %} + + {% endfor %} + + + {% for score in user_scores_list %} + + {% endfor %} + +
Candidate{{cid}}
Question {{forloop.counter}}{{ans}}
Score:{{score}}
+ +
+{% endblock %} \ No newline at end of file diff --git a/rapids/templates/rapids/exam_scores_user.html b/rapids/templates/rapids/exam_scores_user.html new file mode 100644 index 00000000..b626baf3 --- /dev/null +++ b/rapids/templates/rapids/exam_scores_user.html @@ -0,0 +1,18 @@ +{% extends 'anatomy/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/rapids/templates/rapids/exams.html b/rapids/templates/rapids/exams.html new file mode 100644 index 00000000..8fb0af78 --- /dev/null +++ b/rapids/templates/rapids/exams.html @@ -0,0 +1,6 @@ +{% extends 'anatomy/base.html' %} + +{% block navigation %} +
+{{exam.name}}-> Overview / Mark / Scores +{% endblock %} \ No newline at end of file diff --git a/rapids/templates/rapids/index.html b/rapids/templates/rapids/index.html old mode 100755 new mode 100644 index 8bc76cd7..2cefa622 --- a/rapids/templates/rapids/index.html +++ b/rapids/templates/rapids/index.html @@ -1,23 +1,11 @@ -{% extends 'rapids/base.html' %} +{% extends 'anatomy/base.html' %} {% block content %} -My Questions: - - -Other Questions: - - +{% for exam in exams %} +
+

Exam: {{ exam.name }}

+ {% if request.user.is_staff %}Mark answers{% endif %} + {% if request.user.is_staff %}Scores{% endif %} +
+{% endfor %} {% endblock %} \ No newline at end of file diff --git a/rapids/templates/rapids/index_old.html b/rapids/templates/rapids/index_old.html new file mode 100755 index 00000000..8bc76cd7 --- /dev/null +++ b/rapids/templates/rapids/index_old.html @@ -0,0 +1,23 @@ +{% extends 'rapids/base.html' %} + +{% block content %} +My Questions: + + +Other Questions: + + +{% endblock %} \ No newline at end of file diff --git a/rapids/templates/rapids/mark.html b/rapids/templates/rapids/mark.html new file mode 100644 index 00000000..6aecbf83 --- /dev/null +++ b/rapids/templates/rapids/mark.html @@ -0,0 +1,49 @@ +{% extends 'anatomy/exams.html' %} + +{% block content %} +

Marking question {{question_details.current}} of {{question_details.total}}

+Edit Admin Edit +

{{ question.question_type }}

+ +
+
+
+
{% csrf_token %} + Click each answer to toggle through marks awarded (as per colour) +
+ Unmarked: +
    + {% for answer in user_answers %} +
  • {{ answer }}
  • + {% endfor %} +
+ Marked: +
    + {% for answer in correct_answers %} +
  • {{ answer }}
  • + {% endfor %} + {% for answer in half_mark_answers %} +
  • {{ answer }}
  • + {% endfor %} + {% for answer in incorrect_answers %} +
  • {{ answer }}
  • + {% endfor %} +
+
Key: 2 Marks, 1 + Mark, 0 Marks
+ {% if question_details.current > 1 %} + + {% endif %} + + {% if question_details.current >= question_details.total %} + {% else %} + + + {% endif %} +
+ + {{ form.as_p }} + +
+
+{% endblock %} \ No newline at end of file diff --git a/rapids/templates/rapids/mark_overview.html b/rapids/templates/rapids/mark_overview.html new file mode 100644 index 00000000..ed2619b4 --- /dev/null +++ b/rapids/templates/rapids/mark_overview.html @@ -0,0 +1,20 @@ +{% extends 'anatomy/exams.html' %} + +{% block content %} +
+

Marking exam: {{ exam.name }}

+ You can start marking from a particular question by clicking on it below. + +
+ +
+
+ + +
+{% endblock %} \ No newline at end of file diff --git a/rapids/views.py b/rapids/views.py index e04f1b5a..c97c8bcc 100755 --- a/rapids/views.py +++ b/rapids/views.py @@ -59,13 +59,16 @@ class AuthorOrCheckerRequiredMixin(object): @login_required def index(request): - other_rapids = Rapid.objects.exclude(author=request.user.pk) - user_rapids = Rapid.objects.filter(author=request.user.pk) - return render( - request, - "rapids/index.html", - {"other_rapids": other_rapids, "user_rapids": user_rapids}, - ) + exams = Exam.objects.all() + return render(request, "rapids/index.html", {"exams": exams}) +# def index(request): +# other_rapids = Rapid.objects.exclude(author=request.user.pk) +# user_rapids = Rapid.objects.filter(author=request.user.pk) +# return render( +# request, +# "rapids/index.html", +# {"other_rapids": other_rapids, "user_rapids": user_rapids}, +# ) @login_required