From 18288cbb0dadca66c71ec5abb854d726ca6e27d8 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Wed, 7 Sep 2016 15:35:20 +0530 Subject: students can view questions, beautified view_answerpaper.html --- yaksh/templates/yaksh/view_answerpaper.html | 62 +++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 16 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index ae70e69..a213d7b 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -1,4 +1,7 @@ {% extends "user.html" %} +{% block css %} + +{% endblock %} {% block title %} Answer Paper for {{ quiz.description }}{% endblock title %} @@ -6,7 +9,6 @@ {% block subtitle %} Answer Paper for {{ quiz.description }}{% endblock %} - {% if not data.papers %}

You have not attempted the quiz {{ quiz.description }}

{% else %} @@ -24,29 +26,57 @@

{% if paper.answers.count %} -

Answers

+

Answerpaper:

{% for question, answers in paper.get_question_answers.items %} -

Question: {{ question.id }}. {{ question.summary }} (Mark(s): {{ question.points }})

+ +
+
+ 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 %} + {%endif%} + +
+
{% if question.type == "mcq" or question.type == "mcc" %} -

Choices: - {% for testcase in question.get_test_cases %}
{{ testcase.options }} {% endfor %} -

-

Student answer: {{ answers.0 }}

- Autocheck: {{ answers.0.error }} - {% else %}{# non-mcq questions #} -

Student answer:

+ {% 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 %} -
-    ###############################################################################
-    {{ answer.answer.strip }}
-    # Autocheck: {{ answer.error }}
-    
+ {% if "Correct answer" in answer.error %} +
+ {% else %} +
+ {% endif %} +
Autocheck: {{ answer.error }}
+
{{ answer.answer.strip }}
+
{% endif %} {% endfor %} {% endif %} {% with answers|last as answer %} -

Obtained Marks: {{answer.marks}}

+

Obtained Marks: {{answer.marks}}

{% endwith %}
{% endfor %} {# for question, answers ... #} -- cgit From bd0ed17050159e4ca3ba4493bdc520f26d85120c Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Thu, 8 Sep 2016 08:17:25 +0530 Subject: changed template to add end_time and status details in answerpaper --- yaksh/templates/yaksh/view_answerpaper.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index a213d7b..9227561 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -23,6 +23,13 @@ Questions correctly answered: {{ paper.get_answered_str }}
Marks obtained: {{ paper.marks_obtained }}
Start time: {{ paper.start_time }}
+ End time : {{ paper.end_time }}
+ Percentage obtained: {{ paper.percent }}%
+ {% if paper.passed == 0 %} + Status : Failed
+ {% else %} + Status : Passed
+ {% endif %}

{% if paper.answers.count %} @@ -40,7 +47,7 @@ {% if question.type == "mcq" or question.type == "mcc" %}
Choices:
{% for testcase in question.get_test_cases %} -
{{ forloop.counter }}.  {{ testcase.options }} +
{{ forloop.counter }}. {{ testcase.options }} {% endfor %} {%endif%} -- cgit