summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authorprathamesh2016-08-31 02:07:15 +0530
committerprathamesh2016-08-31 02:07:15 +0530
commit18cbf091f991cd205a07c87db0ddde980bef34e2 (patch)
tree5107b580ad56199f021bdaeac04af71a7921f490 /yaksh
parent24593514378e86cd2f0ef62e11e8a4c9dee0f5ad (diff)
downloadonline_test-18cbf091f991cd205a07c87db0ddde980bef34e2.tar.gz
online_test-18cbf091f991cd205a07c87db0ddde980bef34e2.tar.bz2
online_test-18cbf091f991cd205a07c87db0ddde980bef34e2.zip
Clean the template for student view answerpaper and monitor
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/templates/yaksh/user_data.html7
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html8
2 files changed, 10 insertions, 5 deletions
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 }}
<h3> Answers </h3>
{% for question, answers in paper.get_question_answers.items %}
<p><strong> Question: {{ question.id }}. {{ question.summary }} (Points: {{ question.points }})</strong> </p>
-{% if question.type == "mcq" %}
-<p> Choices:
-{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %}
+{% if question.type == "mcq" or question.type == "mcc" %}
+<p> Choices:
+{% for testcase in question.get_test_cases %} <br>{{ testcase.options }} {% endfor %}
</p>
<p>Student answer: {{ answers.0 }}</p>
+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 #}
<p>Student answer: </p>
+ {% for answer in answers %}
+ {% if not answer.skipped %}
<pre>
- {% for answer in answers %}################################################################################
+ ###############################################################################
{{ answer.answer.strip }}
# Autocheck: {{ answer.error }}
- {% endfor %}</pre>
+ </pre>
+ {% endif %}
+ {% endfor %}
{% endif %}
{% with answers|last as answer %}
<p><em>Obtained Marks: {{answer.marks}} </em> </p>