summaryrefslogtreecommitdiff
path: root/testapp/exam/templates
diff options
context:
space:
mode:
authorprathamesh2014-09-23 14:44:47 +0530
committerprathamesh2014-09-23 14:44:47 +0530
commit0808861705c08aede6c0dc9e07ac891911a7bbfb (patch)
tree729d56c50370070b9e08f44f68a3ce91f9235534 /testapp/exam/templates
parent962cee1705509bb595cda51d104ef1ef7cf0b4fd (diff)
downloadonline_test-0808861705c08aede6c0dc9e07ac891911a7bbfb.tar.gz
online_test-0808861705c08aede6c0dc9e07ac891911a7bbfb.tar.bz2
online_test-0808861705c08aede6c0dc9e07ac891911a7bbfb.zip
Models and views modified.
Added number of attempts option for quiz. Also days lag between two attempts. added test status and attempt number for the test. Removed profile foreign key from answer paper models since user foreign key is present in the answer paper model. Urls slightly modified to include attemt number for a given quiz.
Diffstat (limited to 'testapp/exam/templates')
-rw-r--r--testapp/exam/templates/exam/intro.html2
-rw-r--r--testapp/exam/templates/exam/question.html9
-rw-r--r--testapp/exam/templates/exam/quit.html4
3 files changed, 5 insertions, 10 deletions
diff --git a/testapp/exam/templates/exam/intro.html b/testapp/exam/templates/exam/intro.html
index ec1888a..58068ed 100644
--- a/testapp/exam/templates/exam/intro.html
+++ b/testapp/exam/templates/exam/intro.html
@@ -27,7 +27,7 @@
</ul>
<p> We hope you enjoy taking this exam !!!</p>
- <form action="{{URL_ROOT}}/exam/start/{{ paper_id }}/" method="post" align="center">
+ <form action="{{URL_ROOT}}/exam/start/{{ attempt_no }}/{{ paper_id }}/" method="post" align="center">
{% csrf_token %}
<center><button class="btn" type="submit" name="start">Start Exam!</button></center>
</form>
diff --git a/testapp/exam/templates/exam/question.html b/testapp/exam/templates/exam/question.html
index a3e8629..855a29e 100644
--- a/testapp/exam/templates/exam/question.html
+++ b/testapp/exam/templates/exam/question.html
@@ -74,7 +74,7 @@ function setSnippetHeight()
<ul>
<li> <h5><a> Hi {{user.first_name.title}} {{user.last_name.title}} </a></h5>
</ul>
- <form id="logout" action="{{URL_ROOT}}/exam/quit/{{ paper.question_paper.id }}/" method="post" class="pull-right">
+ <form id="logout" action="{{URL_ROOT}}/exam/quit/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post" class="pull-right">
{% csrf_token %}
<button class="btn" type="submit" name="quit">Quit Exam</button> </li>
@@ -94,13 +94,8 @@ function setSnippetHeight()
{% 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">
+ <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.attempt_number }}/{{ paper.question_paper.id }}/" method="post">
{% csrf_token %}
{% if question.type == "mcq" %}
{% for option in question.options.strip.splitlines %}
diff --git a/testapp/exam/templates/exam/quit.html b/testapp/exam/templates/exam/quit.html
index fee11ed..2c347cb 100644
--- a/testapp/exam/templates/exam/quit.html
+++ b/testapp/exam/templates/exam/quit.html
@@ -7,8 +7,8 @@
<center><h4>Your current answers are saved.</h4></center>
<center><h4> Are you sure you wish to quit the exam?</h4></center>
<center><h4> Be sure, as you won't be able to restart this exam.</h4></center>
- <form action="{{URL_ROOT}}/exam/complete/{{ id }}/" method="post">
+ <form action="{{URL_ROOT}}/exam/complete/{{ attempt_no }}/{{ id }}/" method="post">
{% csrf_token %}
- <center><button class="btn" type="submit" name="yes">Yes!</button>&nbsp;<button class="btn" type="button" name="no" onClick="window.location='{{ URL_ROOT }}/exam/start/{{ id }}/'">No!</button></center>
+ <center><button class="btn" type="submit" name="yes">Yes!</button>&nbsp;<button class="btn" type="button" name="no" onClick="window.location='{{ URL_ROOT }}/exam/start/{{ attempt_no }}/{{ id }}/'">No!</button></center>
</form>
{% endblock content %}