summaryrefslogtreecommitdiff
path: root/exam
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-11-25 02:24:34 +0530
committerPrabhu Ramachandran2011-11-25 02:24:34 +0530
commitb4023e17d6f97e51ffde740c17d19630b5a9c2d1 (patch)
tree78b015a1d6e9ffa1d4fbf673b6ef21491833b564 /exam
parent3375839bfc531329adc45994659be382295038b6 (diff)
downloadonline_test-b4023e17d6f97e51ffde740c17d19630b5a9c2d1.tar.gz
online_test-b4023e17d6f97e51ffde740c17d19630b5a9c2d1.tar.bz2
online_test-b4023e17d6f97e51ffde740c17d19630b5a9c2d1.zip
ENH: First cut of CSS for pages.
This is largely taken from other sites and looks reasonable for now. Also added links to the admin page from the monitor/user_data/grade_user.
Diffstat (limited to 'exam')
-rw-r--r--exam/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/exam/views.py b/exam/views.py
index cd91ef8..ed73adf 100644
--- a/exam/views.py
+++ b/exam/views.py
@@ -124,7 +124,9 @@ def start(request):
try:
profile = user.get_profile()
except Profile.DoesNotExist:
- profile = None
+ msg = 'You do not have a profile and cannot take the quiz!'
+ raise Http404(msg)
+
new_paper = QuestionPaper(user=user, user_ip=ip, key=key,
quiz=quiz, profile=profile)
new_paper.start_time = datetime.datetime.now()