diff options
author | jayparikh111 | 2012-01-31 19:08:00 +0530 |
---|---|---|
committer | jayparikh111 | 2012-01-31 19:08:00 +0530 |
commit | 1a3ce22d9397a1fc95dcf99fc424a47f3fc660f7 (patch) | |
tree | 8c0949dd830e6d507598c2aec5857bab27dbbe70 /testapp/templates | |
parent | cfe90f043d387fbca3d2312f14819133d668a59b (diff) | |
download | online_test-1a3ce22d9397a1fc95dcf99fc424a47f3fc660f7.tar.gz online_test-1a3ce22d9397a1fc95dcf99fc424a47f3fc660f7.tar.bz2 online_test-1a3ce22d9397a1fc95dcf99fc424a47f3fc660f7.zip |
Updated Question.html with new looks
Diffstat (limited to 'testapp/templates')
-rw-r--r-- | testapp/templates/exam/question.html | 60 |
1 files changed, 37 insertions, 23 deletions
diff --git a/testapp/templates/exam/question.html b/testapp/templates/exam/question.html index 8b589b6..eeb78c3 100644 --- a/testapp/templates/exam/question.html +++ b/testapp/templates/exam/question.html @@ -1,10 +1,12 @@ {% extends "base.html" %} - -{% block title %} Answer question {% endblock %} +<!DOCTYPE html> +<html lang="en"> + <head> + {% block title %} Answer question {% endblock %} {% block script %} <script type="text/javascript"> -<!-- + var time_left = {{ time_left }}; function submitCode() @@ -34,27 +36,37 @@ function update_time() if (time_left) { var elem = document.getElementById("time_left"); var t_str = secs_to_time(time_left); - elem.innerHTML = "<strong> Time left: " + t_str + "</strong>"; + elem.innerHTML = "<strong> Time left: " + t_str + "<strong>" ; setTimeout("update_time()", 1000); } else { document.forms["code"].submit(); } } -//--> + </script> {% endblock script %} - -{% block onload %} onload="update_time()" {% endblock %} +</head> +<body> +{% block onload %} onload="update_time()" {% endblock onload %} {% block content %} -<h3> {{ question.summary }} </h3> -<p>{{ question.description|safe }} -<br/> -(Marks: {{ question.points }}) </p> +<div class="container"> + + <div class="content"> + <div class="page-header"> + <center><h1>Online Test </h1></center> + </div> + <div class="row"> + <div class="span14"> -{% if error_message %}<p><strong>ERROR:</strong></p><pre>{{ error_message }}</pre>{% endif %} + <h4><u> {{ question.summary }} </u></h4> + <h5>{{ question.description|safe }} </h5> + <h5>(Marks : {{ question.points }}) </h5> + + +{% if error_message %}<h5>ERROR:<h5><pre>{{ error_message }}</pre>{% endif %} <p id="status"></p> @@ -65,27 +77,29 @@ function update_time() <input name="answer" type="radio" value="{{option}}" />{{option}} <br/> {% endfor %} {% else %} -<textarea rows="20" cols="100" name="answer">{% if last_attempt %}{{last_attempt.strip}}{% else %}{% if question.type == "bash" %}#!/bin/bash{% else %}# Enter your answer here.{% endif %}{% endif %}</textarea> +<textarea rows="15" style="width:700px;" name="answer">{% if last_attempt %}{{last_attempt.strip}}{% else %}{% if question.type == "bash" %}#!/bin/bash{% else %}# Enter your answer here.{% endif %}{% endif %}</textarea> {% endif %} -<br/> + {% if question.type == "mcq" %} -<input id="check" type="submit" name="check" value="Submit answer"/> +<br><button class="btn" type="submit" name="check" id="check">Submit Answer</button> +<!--input id="check" type="submit" name="check" value="Submit answer"/--> {% else %} -<input id="check" type="submit" name="check" value="Check Answer" -onclick="submitCode();"/> +<button class="btn" type="submit" name="check" id="check" onClick="submitCode();">Check Answer</button> +<!--input id="check" type="submit" name="check" value="Check Answer" onclick="submitCode();"/--> {% endif %} -<input id="skip" type="submit" name="skip" value="Skip question" /> +<button class="btn" type="submit" name="skip" id="skip">Skip Question</button> +<!--input id="skip" type="submit" name="skip" value="Skip question" /--> </form> -<p> {{ user.first_name.title }} {{ user.last_name.title }}, -you have {{ paper.questions_left }} question(s) left in {{ quiz_name }}.</p> +<h5> {{ user.first_name.title }} {{ user.last_name.title }}, You have {{ paper.questions_left }} question(s) left in {{ quiz_name }} </h5> -<p id="time_left"> <strong> Time left: </strong> </p> +<p id="time_left"><strong> Time left: </strong></p> <hr/> <form id="logout" action="{{URL_ROOT}}/exam/quit/" method="post"> {% csrf_token %} -<input type="submit" name="quit" value="Quit exam and logout" /> +<button class="btn" type="submit" name="quit">Quit Exam and Logout</button> +<!--input type="submit" name="quit" value="Quit exam and logout" /--> </form> - +</body> {% endblock content %} |