From 1d4d971cb3121b9168221dbb973caf65539447ef Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Wed, 25 Jan 2017 16:51:45 +0530 Subject: student selected answer is now rendered in html --- yaksh/templates/yaksh/grade_user.html | 2 +- yaksh/templates/yaksh/user_data.html | 2 +- yaksh/templates/yaksh/view_answerpaper.html | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html index 1de9420..63ff5eb 100644 --- a/yaksh/templates/yaksh/grade_user.html +++ b/yaksh/templates/yaksh/grade_user.html @@ -160,7 +160,7 @@ Status : Passed
{{ err }}
{% endfor %} -
{{ ans.answer.answer.strip }}
+
{{ ans.answer.answer.strip|safe }}
{% endfor %} {% with answers|last as answer %} diff --git a/yaksh/templates/yaksh/user_data.html b/yaksh/templates/yaksh/user_data.html index e4b3767..9be28fb 100644 --- a/yaksh/templates/yaksh/user_data.html +++ b/yaksh/templates/yaksh/user_data.html @@ -94,7 +94,7 @@ User IP address: {{ paper.user_ip }}
Student answer:
-
{{forloop.counter}}. {{ answers.0.answer }}
+
{{forloop.counter}}. {{ answers.0.answer|safe }}
{% else %} diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html index 5240278..5eb55df 100644 --- a/yaksh/templates/yaksh/view_answerpaper.html +++ b/yaksh/templates/yaksh/view_answerpaper.html @@ -61,17 +61,17 @@ {% if question.type == "mcq" or question.type == "mcc" %} - {% if "Correct answer" in answers.0.error %} + {% if "Correct answer" in answers.0.error_list %}
{% else %}
{% endif %}
- Autocheck: {{ answers.0.error }} + Autocheck: {{ answers.0.error_list.0 }}
Student answer:
-
{{forloop.counter}}. {{ answers.0 }}
+
{{forloop.counter}}. {{ answers.0.answer|safe }}
{% else %} -- cgit