summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testapp/templates/exam/question.html60
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>&nbsp;&nbsp;
+<!--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>&nbsp;&nbsp;
+<!--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 %}