From 67e1fa3bc43792028f78161e2c9d04ae97d1ac56 Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Mon, 14 Nov 2011 14:36:13 +0530 Subject: ENH: Adding an intro page for users This page provides instructions and rules to the users of the system. --- exam/views.py | 9 ++++++--- templates/exam/intro.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 templates/exam/intro.html diff --git a/exam/views.py b/exam/views.py index 560181a..e6c9b55 100644 --- a/exam/views.py +++ b/exam/views.py @@ -117,9 +117,12 @@ def start(request): new_quiz.questions = "|".join(questions) new_quiz.save() - q = new_quiz.current_question() - - return show_question(request, q) + + # Show the user the intro page. + context = {'user': user} + ci = RequestContext(request) + return render_to_response('exam/intro.html', context, + context_instance=ci) def question(request, q_id): user = request.user diff --git a/templates/exam/intro.html b/templates/exam/intro.html new file mode 100644 index 0000000..0d673b3 --- /dev/null +++ b/templates/exam/intro.html @@ -0,0 +1,46 @@ +

Important rules and instructions

+ +

Welcome {{user.first_name.title}} {{user.last_name.title}}, +to the programming quiz!

+ +

+This examination system has been developed with the intention of making you +learn programming and be assessed in an interactive and fun manner. +You will be presented with a series of programming questions and problems that +you will answer online and get immediate feedback for. +

+ +

Here are some important instructions and rules that you should understand +carefully. +

+ + + +

We hope you enjoy taking this exam.

+ +
+{% csrf_token %} + +
-- cgit