summaryrefslogtreecommitdiff
path: root/testapp/templates
diff options
context:
space:
mode:
Diffstat (limited to 'testapp/templates')
-rw-r--r--testapp/templates/exam/question.html10
-rw-r--r--testapp/templates/exam/quizzes_user.html2
-rw-r--r--testapp/templates/exam/results_user.html2
-rw-r--r--testapp/templates/exam/show_quiz.html1
-rw-r--r--testapp/templates/exam/showquestionpapers.html4
5 files changed, 16 insertions, 3 deletions
diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html
index 1203c0e..529b620 100644
--- a/testapp/templates/exam/question.html
+++ b/testapp/templates/exam/question.html
@@ -83,6 +83,12 @@ function update_time()
<br/>
{% endfor%}
</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 %}
@@ -92,9 +98,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 %}{{ 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="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&#13;&#10;{{ question.snippet }}{% else %}{{ 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">
diff --git a/testapp/templates/exam/quizzes_user.html b/testapp/templates/exam/quizzes_user.html
index af2d98a..b55d3e5 100644
--- a/testapp/templates/exam/quizzes_user.html
+++ b/testapp/templates/exam/quizzes_user.html
@@ -12,7 +12,7 @@
<center><h4>No active quizzes for you</h4></center>
{% endif %}
{% for paper in quizzes %}
- <a href="{{ URL_ROOT }}/exam/start/{{paper.id}}">{{ paper.quiz.description }}</a><br>
+ <a href="{{ URL_ROOT }}/exam/intro/{{paper.id}}">{{ paper.quiz.description }}</a><br>
{% endfor %}
{% endblock %}
diff --git a/testapp/templates/exam/results_user.html b/testapp/templates/exam/results_user.html
index bf847c0..2a2a309 100644
--- a/testapp/templates/exam/results_user.html
+++ b/testapp/templates/exam/results_user.html
@@ -13,6 +13,8 @@
<center><table class="span6">
<th>Quiz Description
<th>Obtained Marks
+ <th>Maximum Marks
+ <th>Percentage
{% for paper in papers %}
<tr>
{% for i in paper %}
diff --git a/testapp/templates/exam/show_quiz.html b/testapp/templates/exam/show_quiz.html
index 886a696..cf3f552 100644
--- a/testapp/templates/exam/show_quiz.html
+++ b/testapp/templates/exam/show_quiz.html
@@ -10,6 +10,7 @@
{% block manage %}
{% if not quizzes and not quiz %}
<center><h5> No quizzes available. </h5></center>
+<button class="btn" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/addquiz");'>Add New Quiz</button>&nbsp;&nbsp;
{% endif %}
{# ############################################################### #}
diff --git a/testapp/templates/exam/showquestionpapers.html b/testapp/templates/exam/showquestionpapers.html
index 26b756d..e511472 100644
--- a/testapp/templates/exam/showquestionpapers.html
+++ b/testapp/templates/exam/showquestionpapers.html
@@ -8,6 +8,7 @@
{% endblock %}
{% block manage %}
+{% if papers %}
<form name=frm action="" method="post">
{% csrf_token %}
{% for i in papers %}
@@ -16,4 +17,7 @@
<br>
<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button>
</form>
+{% else %}
+<center><h3>No Question Papers available</h3></center>
+{% endif %}
{% endblock %}