summaryrefslogtreecommitdiff
path: root/testapp/templates/exam/question.html
diff options
context:
space:
mode:
authorhardythe12013-07-01 11:56:32 +0530
committerhardythe12013-07-01 11:56:32 +0530
commitf5ef323d03dd80e1ae00f306ac44f5ee3efb3e7c (patch)
treee957b93691515c5ab50db5ed0365658263809460 /testapp/templates/exam/question.html
parent5ce91d1f2b2f2434bc51ddeeaf4f9f27305d1145 (diff)
downloadonline_test-f5ef323d03dd80e1ae00f306ac44f5ee3efb3e7c.tar.gz
online_test-f5ef323d03dd80e1ae00f306ac44f5ee3efb3e7c.tar.bz2
online_test-f5ef323d03dd80e1ae00f306ac44f5ee3efb3e7c.zip
edited JS to give a msg when the answer is correct
Diffstat (limited to 'testapp/templates/exam/question.html')
-rw-r--r--testapp/templates/exam/question.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html
index 1d801b0..1282130 100644
--- a/testapp/templates/exam/question.html
+++ b/testapp/templates/exam/question.html
@@ -78,6 +78,11 @@ function update_time()
<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 success_msg %}
+ <script type="text/javascript">
+ alert("Congratulations, that's correct. Let's go to next question");
+ </script>
+ {% endif %}
<p id="status"></p>
<form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.question_paper.id }}/" method="post">
{% csrf_token %}
@@ -87,9 +92,9 @@ 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 %} #To avoid errors use tabs for indentation for Python questions &#13;&#10; {{ question.snippet }}{% 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>
+ <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}}{% else %}{% if question.type == "bash" %}{% else %}{% endif %}{% endif %}</textarea>
<br>
<script type="text/javascript">