summaryrefslogtreecommitdiff
path: root/testapp/templates/exam
diff options
context:
space:
mode:
authorPrabhu Ramachandran2013-07-03 04:26:40 -0700
committerPrabhu Ramachandran2013-07-03 04:26:40 -0700
commitee64cfe58c42540d0736cc32d3acd36ab7a6d31d (patch)
tree6104cea3d6682e8d101da7f44ad645e7e00fc4f1 /testapp/templates/exam
parentfe868c043487af8ea390165325309ad29daacc8e (diff)
parent7b18a329a2692d3f85fbe71fa99ceee9838b85c8 (diff)
downloadonline_test-ee64cfe58c42540d0736cc32d3acd36ab7a6d31d.tar.gz
online_test-ee64cfe58c42540d0736cc32d3acd36ab7a6d31d.tar.bz2
online_test-ee64cfe58c42540d0736cc32d3acd36ab7a6d31d.zip
Merge pull request #12 from prathamesh920/fresh_C_Cpp
Fresh c cpp
Diffstat (limited to 'testapp/templates/exam')
-rw-r--r--testapp/templates/exam/question.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html
index 1d801b0..1203c0e 100644
--- a/testapp/templates/exam/question.html
+++ b/testapp/templates/exam/question.html
@@ -76,8 +76,13 @@ function update_time()
<h4><u> {{ question.summary }} </u><font class=pull-right>(Marks : {{ question.points }}) </font></h4><br>
<font size=3 face=arial> {{ question.description|safe }} </font>
-
- {% if error_message %}<h5>ERROR:</h5><div class="alert alert-error">{{ error_message }}</div>{% endif %}
+ {% if error_message %}
+ <div class="alert alert-error">
+ {% for e in error_message.splitlines %}
+ {{ e|join:"" }}
+ <br/>
+ {% endfor%}
+ </div>{% endif %}
<p id="status"></p>
<form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.question_paper.id }}/" method="post">
{% csrf_token %}
@@ -87,7 +92,7 @@ function update_time()
{% endfor %}
{% else %}
- <textarea tabindex=1 rows="3" style="width:750px;margin-bottom:15px;height:auto;" readonly=yes name="snippet" id="snippet" wrap="off">{% if last_attempt %}{% else %}{% if question.type == "bash" %} #!/bin/bash{% else %} #To avoid errors use tabs for indentation for Python questions &#13;&#10; {{ question.snippet }}{% endif %}{% endif %}</textarea>
+ <textarea tabindex=1 rows="3" style="width:750px;margin-bottom:15px;height:auto;" readonly=yes name="snippet" id="snippet" wrap="off">{% if last_attempt %}{{ question.snippet }}{% else %}{% if question.type == "bash" %} #!/bin/bash{% else %}{% if question.type == "python "%} #To avoid errors use tabs for indentation for Python questions &#13;&#10; {{ question.snippet }} {% else %} {{ question.snippet }} {% endif %}{% endif %}{% endif %}</textarea>
<textarea tabindex=1 rows="10" style="width:750px;margin-bottom:10px;" name="answer" id="answer" wrap="off" onkeydown="return catchTab(this,event)">{% if last_attempt %}{{last_attempt.strip}}{% else %}{% if question.type == "bash" %}{% else %}{% endif %}{% endif %}</textarea>
<br>