diff options
Diffstat (limited to 'testapp/templates/exam')
-rw-r--r-- | testapp/templates/exam/add_quiz.html | 8 | ||||
-rw-r--r-- | testapp/templates/exam/automatic_questionpaper.html | 2 | ||||
-rw-r--r-- | testapp/templates/exam/complete.html | 2 | ||||
-rw-r--r-- | testapp/templates/exam/intro.html | 2 | ||||
-rw-r--r-- | testapp/templates/exam/question.html | 6 | ||||
-rw-r--r-- | testapp/templates/exam/quit.html | 3 | ||||
-rw-r--r-- | testapp/templates/exam/quizzes_user.html | 18 | ||||
-rw-r--r-- | testapp/templates/exam/results_user.html | 23 |
8 files changed, 55 insertions, 9 deletions
diff --git a/testapp/templates/exam/add_quiz.html b/testapp/templates/exam/add_quiz.html index c8e1ac3..2667c0c 100644 --- a/testapp/templates/exam/add_quiz.html +++ b/testapp/templates/exam/add_quiz.html @@ -13,7 +13,11 @@ <script type='text/javascript'> function test() { - document.getElementById('id_description').onFocus="javascript:test2()"; + + if (document.getElementById("id_description").value != "") + { + document.getElementById("submit").innerHTML = "Save"; + } } </script> @@ -28,7 +32,7 @@ </table> </center> - <center><button class="btn" type="submit" name="questionpaper">Design Question Paper</button> + <center><button class="btn" type="submit" id="submit" name="questionpaper">Design Question Paper</button> <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/showquiz/");'>Cancel</button> </center> </form> {% endblock %} diff --git a/testapp/templates/exam/automatic_questionpaper.html b/testapp/templates/exam/automatic_questionpaper.html index b961711..b8f76b4 100644 --- a/testapp/templates/exam/automatic_questionpaper.html +++ b/testapp/templates/exam/automatic_questionpaper.html @@ -34,7 +34,7 @@ function load_data() {% endblock %} {% block manage %} -<center><b>Automotic mode to design the Question Paper</center><br> +<center><b>Automatic mode to design the Question Paper</center><br> <form action="" method="post" name=frm> {% csrf_token %} diff --git a/testapp/templates/exam/complete.html b/testapp/templates/exam/complete.html index a2e673b..1d5df3c 100644 --- a/testapp/templates/exam/complete.html +++ b/testapp/templates/exam/complete.html @@ -4,7 +4,7 @@ {% block pagetitle %}Online Test{% endblock %} {% block content %} - +{% csrf_token %} <center><h2> Good bye! </h2></center> <center><h4> {{message}} </h4></center> <center><h4>You may now close the browser.</h4></center><br> diff --git a/testapp/templates/exam/intro.html b/testapp/templates/exam/intro.html index afa596b..ec1888a 100644 --- a/testapp/templates/exam/intro.html +++ b/testapp/templates/exam/intro.html @@ -27,7 +27,7 @@ </ul> <p> We hope you enjoy taking this exam !!!</p> - <form action="{{URL_ROOT}}/exam/start/" method="post" align="center"> + <form action="{{URL_ROOT}}/exam/start/{{ 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/templates/exam/question.html b/testapp/templates/exam/question.html index 87ed40d..584ab72 100644 --- a/testapp/templates/exam/question.html +++ b/testapp/templates/exam/question.html @@ -70,9 +70,9 @@ <ul> <li> <h5><a> Hi {{user.first_name.title}} {{user.last_name.title}} </a></h5> </ul> - <form id="logout" action="{{URL_ROOT}}/exam/quit/" method="post" class="pull-right"> + <form id="logout" action="{{URL_ROOT}}/exam/quit/{{ paper.question_paper.id }}/" method="post" class="pull-right"> {% csrf_token %} - <button class="btn" type="submit" name="quit">Quit Exam and Logout</button> </li> + <button class="btn" type="submit" name="quit">Quit Exam</button> </li> </form> </div> @@ -85,7 +85,7 @@ {% if error_message %}<h5>ERROR:</h5><div class="alert alert-error">{{ error_message }}</div>{% endif %} <p id="status"></p> - <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/" method="post"> + <form id="code" action="{{URL_ROOT}}/exam/{{ question.id }}/check/{{ paper.question_paper.id }}/" method="post"> {% csrf_token %} {% if question.type == "mcq" %} {% for option in question.options.strip.splitlines %} diff --git a/testapp/templates/exam/quit.html b/testapp/templates/exam/quit.html index 40a0a92..3f7630d 100644 --- a/testapp/templates/exam/quit.html +++ b/testapp/templates/exam/quit.html @@ -6,7 +6,8 @@ <center><h4>Your current answers are saved.</h4></center> <center><h4> Are you sure you wish to quit the exam?</h4></center> - <form action="{{URL_ROOT}}/exam/complete/" method="post"> + <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"> {% csrf_token %} <center><button class="btn" type="submit" name="yes">Yes!</button> <button class="btn" type="submit" name="no">No!</button></center> </form> diff --git a/testapp/templates/exam/quizzes_user.html b/testapp/templates/exam/quizzes_user.html new file mode 100644 index 0000000..af2d98a --- /dev/null +++ b/testapp/templates/exam/quizzes_user.html @@ -0,0 +1,18 @@ +{% extends "user.html" %} + + +{% block subtitle %}Available Quizzes{% endblock %} + +{% block css %} +<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" /> +{% endblock %} + +{% block manage %} + {% if not quizzes %} + <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> + {% endfor %} +{% endblock %} + diff --git a/testapp/templates/exam/results_user.html b/testapp/templates/exam/results_user.html new file mode 100644 index 0000000..75d168d --- /dev/null +++ b/testapp/templates/exam/results_user.html @@ -0,0 +1,23 @@ +{% extends "user.html" %} + + +{% block subtitle %}Results for {{ papers.user.first_name }}{% endblock %} + +{% block css %} +<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" /> +{% endblock %} + +{% block manage %} +<form action="" method="post" name=frm> + {% csrf_token %} + <center> + {% for paper in papers %} + {% for i in paper %} + {{ i }} + {% endfor %} + <br> + {% endfor %} + </center> +</form> +{% endblock %} + |