diff options
author | Prabhu Ramachandran | 2011-11-08 02:10:03 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2011-11-08 02:10:03 +0530 |
commit | ec738bb79132a581a1778187a55632983d1fcb53 (patch) | |
tree | d9491ee26367bb504143f5b5bd3a392160c2dbbb /templates | |
download | online_test-ec738bb79132a581a1778187a55632983d1fcb53.tar.gz online_test-ec738bb79132a581a1778187a55632983d1fcb53.tar.bz2 online_test-ec738bb79132a581a1778187a55632983d1fcb53.zip |
NEW: First cut of exam app.
This application allows us to create questions via the admin interface.
The questions are proper programming questions and one enters test cases
for each question. The user logs in and submits the answer which is
checked. The app is rather simple now but does work.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/exam/complete.html | 3 | ||||
-rw-r--r-- | templates/exam/index.html | 12 | ||||
-rw-r--r-- | templates/exam/question.html | 20 | ||||
-rw-r--r-- | templates/exam/register.html | 7 |
4 files changed, 42 insertions, 0 deletions
diff --git a/templates/exam/complete.html b/templates/exam/complete.html new file mode 100644 index 0000000..e42704f --- /dev/null +++ b/templates/exam/complete.html @@ -0,0 +1,3 @@ +<p>Quiz is complete. Thank you. </p> +<br /> +<p>You may now close the browser.</p> diff --git a/templates/exam/index.html b/templates/exam/index.html new file mode 100644 index 0000000..5470cf5 --- /dev/null +++ b/templates/exam/index.html @@ -0,0 +1,12 @@ +<p> Welcome to the Examination. </p> +<br></br> + +{% if question_list %} + <ul> + {% for question in question_list %} + <li> <a href="/exam/{{ question.id }}/">{{ question.summary }} </a> </li> + {% endfor %} + </ul> +{% else %} + <p> Lucky you, no questions available.</p> +{% endif %} diff --git a/templates/exam/question.html b/templates/exam/question.html new file mode 100644 index 0000000..05e80a8 --- /dev/null +++ b/templates/exam/question.html @@ -0,0 +1,20 @@ +<h2> {{ question.summary }} </h2> + +<p>{{ question.question }} </p> + +{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %} + +<form action="/exam/{{ question.id }}/check/" method="post"> +{% csrf_token %} + +<textarea rows="20" cols="100" name="answer"> +# Enter your answer here. +</textarea> + +<br/> + +<input type="submit" name="check" value="Check Answer" /> +<input type="submit" name="skip" value="Skip question" /> +</form> + +<p> You have {{quiz.questions_left}} question(s) left. </p>
\ No newline at end of file diff --git a/templates/exam/register.html b/templates/exam/register.html new file mode 100644 index 0000000..414da72 --- /dev/null +++ b/templates/exam/register.html @@ -0,0 +1,7 @@ +Please provide the following details before you start the test. +<form action="" method="post"> +{% csrf_token %} + +{{ form.as_p }} +<input type="submit" value="submit"> +</form> |