summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authormaheshgudi2017-01-25 16:51:45 +0530
committermaheshgudi2017-01-25 16:51:45 +0530
commit1d4d971cb3121b9168221dbb973caf65539447ef (patch)
treec45d0fc407f1f73d1595ea71d114de692787cde4 /yaksh/templates
parent35b610d92ca8bdd9a2f160f3ef41faadf9600d73 (diff)
downloadonline_test-1d4d971cb3121b9168221dbb973caf65539447ef.tar.gz
online_test-1d4d971cb3121b9168221dbb973caf65539447ef.tar.bz2
online_test-1d4d971cb3121b9168221dbb973caf65539447ef.zip
student selected answer is now rendered in html
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/grade_user.html2
-rw-r--r--yaksh/templates/yaksh/user_data.html2
-rw-r--r--yaksh/templates/yaksh/view_answerpaper.html6
3 files changed, 5 insertions, 5 deletions
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 : <b style="color: green;"> Passed </b><br/>
<div><pre>{{ err }}</pre></div>
{% endfor %}
</div>
- <div class="panel-body"><pre><code>{{ ans.answer.answer.strip }}</code></pre></div>
+ <div class="panel-body"><pre><code>{{ ans.answer.answer.strip|safe }}</code></pre></div>
</div>
{% 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 }}
</div>
<div class="panel-body">
<h5><u>Student answer:</u></h5>
- <pre><code>{{forloop.counter}}. {{ answers.0.answer }}</code></pre>
+ <pre><code>{{forloop.counter}}. {{ answers.0.answer|safe }}</code></pre>
</div>
</div>
{% 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 @@
</div>
</div>
{% if question.type == "mcq" or question.type == "mcc" %}
- {% if "Correct answer" in answers.0.error %}
+ {% if "Correct answer" in answers.0.error_list %}
<div class="panel panel-success">
{% else %}
<div class="panel panel-danger">
{% endif %}
<div class="panel-heading">
- Autocheck: {{ answers.0.error }}
+ Autocheck: {{ answers.0.error_list.0 }}
</div>
<div class="panel-body">
<h5><u>Student answer:</u></h5>
- <pre><code>{{forloop.counter}}. {{ answers.0 }}</code></pre>
+ <pre><code>{{forloop.counter}}. {{ answers.0.answer|safe }}</code></pre>
</div>
</div>
{% else %}