diff options
author | Prabhu Ramachandran | 2017-04-06 12:36:28 +0530 |
---|---|---|
committer | GitHub | 2017-04-06 12:36:28 +0530 |
commit | 969cccf998059e0a800276759535a36d3529b3c6 (patch) | |
tree | 387e80eb718e40ce5077c853eef1d2e89cd3693e /yaksh/views.py | |
parent | 734ad94d177be8ad400eb6f97e98612ce099e56a (diff) | |
parent | 09756c7db9341aace9e9ac25c9078c8cd4bf8399 (diff) | |
download | online_test-969cccf998059e0a800276759535a36d3529b3c6.tar.gz online_test-969cccf998059e0a800276759535a36d3529b3c6.tar.bz2 online_test-969cccf998059e0a800276759535a36d3529b3c6.zip |
Merge pull request #269 from adityacp/fix_question_paper
Allow teachers included in a course to add/edit questionpaper
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 2adc2c3..661d472 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -859,7 +859,9 @@ def design_questionpaper(request, quiz_id, questionpaper_id=None): if not is_moderator(user): raise Http404('You are not allowed to view this page!') - + quiz = Quiz.objects.get(id=quiz_id) + if not quiz.course.is_creator(user) and not quiz.course.is_teacher(user): + raise Http404('This course does not belong to you') filter_form = QuestionFilterForm(user=user) questions = None marks = None |