From 18cbf091f991cd205a07c87db0ddde980bef34e2 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Wed, 31 Aug 2016 02:07:15 +0530 Subject: Clean the template for student view answerpaper and monitor --- yaksh/templates/yaksh/user_data.html | 7 ++++--- yaksh/templates/yaksh/view_answerpaper.html | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'yaksh') diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index 2e7db50..1060e2d 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -50,11 +50,12 @@ User IP address: {{ paper.user_ip }}

Answers

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

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

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

Choices: -{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %} +{% 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 #} {% for answer in answers %} {% if not answer.skipped %} diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index d8d6912..ae70e69 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -35,11 +35,15 @@ Autocheck: {{ answers.0.error }} {% else %}{# non-mcq questions #}

Student answer:

+ {% for answer in answers %} + {% if not answer.skipped %}
-    {% for answer in answers %}################################################################################
+    ###############################################################################
     {{ answer.answer.strip }}
     # Autocheck: {{ answer.error }}
-    {% endfor %}
+ + {% endif %} + {% endfor %} {% endif %} {% with answers|last as answer %}

Obtained Marks: {{answer.marks}}

-- cgit