templates/quiz_intro.html
changeset 33 d28d0957a5ab
child 56 d8d4387b3281
equal deleted inserted replaced
32:5e1f3c46ef7f 33:d28d0957a5ab
       
     1 {% extends 'base.html' %}
       
     2 {% block script %}
       
     3 <script language="javascript">
       
     4 		var time_left = 300;
       
     5 		function dec_counter (){
       
     6 				time_left -= 1;
       
     7 				if (time_left) {
       
     8 						document.getElementById("time_left").value = "Time left: " + time_left + " secs";
       
     9 						setTimeout("dec_counter()", 1000);
       
    10 				}
       
    11 				else {
       
    12 						dopost();
       
    13 				}
       
    14 		}
       
    15         function dopost (){
       
    16             document.getElementById("queform").submit();
       
    17         }
       
    18 		setTimeout("dec_counter()", 1000);
       
    19     </script>
       
    20 {% endblock %}
       
    21 {% block content %}
       
    22 Welcome {{user.get_full_name}} <br />
       
    23 <br />
       
    24 <ul>
       
    25 		<li> You are about to start quiz in a while </li>
       
    26 		<li> There will be a box (as shown below) where you have to type the answer </li>
       
    27 		<li> Please use 4 spaces for indentation </li>
       
    28 		<li> Some questions are multiple choice type and hence will have options instead of textbox </li>
       
    29 		<br />
       
    30 <li> There will be a timer running at the bottom as shown in this page.</li>
       
    31 <li> The page will auto submit after the timer runs out </li>
       
    32 <li> You can also click the submit button to submit the answer before the timer ends </li>
       
    33 <br />
       
    34 <li> DO NOT refresh the page after the timer starts. If a question reloads, it is marked as incorrect </li>
       
    35 <br />
       
    36 The quiz starts after the timer runs out.<br />
       
    37 You can click on submit to start the quiz right away.<br />
       
    38 All the best.<br /><br />
       
    39 Answer:<br />
       
    40 <textarea></textarea>
       
    41 		<form id="queform" action="/quiz/answer/{{quiz.key}}" method="get">
       
    42 				<input type="submit" value="Submit"></form>
       
    43 <input type="button" value="Time left: 300 secs" id="time_left">
       
    44 {% endblock %}