From 6b5422436697b01b4dbcd730d95f46424fedb344 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Thu, 15 Sep 2016 15:12:19 +0530 Subject: beautified grade user and monitor --- yaksh/templates/yaksh/grade_user.html | 96 +++++++++++++++++++++-------------- yaksh/templates/yaksh/user_data.html | 87 +++++++++++++++++++++++-------- 2 files changed, 122 insertions(+), 61 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 2c5403c..7b79373 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -5,11 +5,7 @@ {% block subtitle %} Grade User {% endblock %} {% block css %} - -{% endblock %} - -{% block script %} - + {% endblock %} {% block manage %} @@ -88,6 +84,7 @@ Attempt Number: {{paper.attempt_number}} Total attempts at questions: {{ paper.answers.count }}
Marks obtained: {{ paper.marks_obtained }}
Start time: {{ paper.start_time }}
+End time: {{ paper.end_time }}
{%if paper.percent%} Percentage obtained: {{paper.percent}}%
{% endif %} @@ -125,42 +122,63 @@ Status : Passed
method="post"> {% csrf_token %} {% for question, answers in paper.get_question_answers.items %} - -
-

- Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }}) - -Details

-
- -
-
- -{% if question.type == "mcq" %} -
-

Choices: -{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %} -

-

Student answer: {{ answers.0 }}

-{% else %}{# non-mcq questions #} -
-{% for answer in answers %}################################################################################
-{{ answer.answer.strip }}
-# Autocheck: {{ answer.error }}
-{% endfor %}
-{% endif %} {# if question.type #} -{% with answers|last as answer %} -Marks: +
+ Details: {{forloop.counter}}. {{ question.summary }} + Mark(s): {{ question.points }} + +
+
+
Question:
{{ question.description|safe }} + {% if question.type == "mcq" or question.type == "mcc" %} +
Choices:
+ {% for testcase in question.get_test_cases %} +
{{ forloop.counter }}. {{ testcase.options }} + {% endfor %} + {% else %} +
Test cases:
+ {% for testcase in question.get_test_cases %} +
{{ forloop.counter }}. {{ testcase.test_case }} + {% endfor %} + {%endif%} +
+
+ {% if question.type == "mcq" or question.type == "mcc" %} + {% if "Correct answer" in answers.0.error %} +
+ {% else %} +
+ {% endif %} +
+ Autocheck: {{ answers.0.error }} +
+
+
Student answer:
+
{{forloop.counter}}. {{ answers.0 }}
+
+
+ {% else %} +
Student answer:
+ {% for answer in answers %} + {% if not answer.skipped %} + {% if "Correct answer" in answer.error %} +
+ {% else %} +
+ {% endif %} +
Autocheck: {{ answer.error }}
+
{{ answer.answer.strip }}
+
+ {% endif %} + {% endfor %} + {% endif %} + {% with answers|last as answer %} + Marks:

-{% endwith %} -
-
-{% endfor %} {# for question, answers ... #} - + {% endwith %} +
+ {% endfor %} {# for question, answers ... #}

Teacher comments: