diff options
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 94335a2..2b3c891 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -1883,7 +1883,7 @@ def create_demo_course(request): user = request.user ci = RequestContext(request) if not is_moderator(user): - raise("You are not allowed to view this page") + raise Http404("You are not allowed to view this page") demo_course = Course() success = demo_course.create_demo(user) if success: @@ -2754,6 +2754,8 @@ def preview_questionpaper(request, questionpaper_id): if not is_moderator(user): raise Http404('You are not allowed to view this page!') paper = QuestionPaper.objects.get(id=questionpaper_id) + if not paper.quiz.creator == user: + raise Http404('This questionpaper does not belong to you') context = { 'questions': paper._get_questions_for_answerpaper(), 'paper': paper, |