summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authorankitjavalkar2020-06-08 11:20:48 +0530
committerankitjavalkar2020-06-08 11:20:48 +0530
commitfe70769afcdf239577d59e330e32306d14107a48 (patch)
treee7881a8a40786ccd6273cdb3d882bf2e2a9eabbe /yaksh/views.py
parent0b72c7dd886707b6e9366fd4b4f012dd03fe799c (diff)
downloadonline_test-fe70769afcdf239577d59e330e32306d14107a48.tar.gz
online_test-fe70769afcdf239577d59e330e32306d14107a48.tar.bz2
online_test-fe70769afcdf239577d59e330e32306d14107a48.zip
- Remove Copy Of in Module, Lesson and Quiz names when duplicating courses
- Prevent student users from accessing Questions
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 3adb536..1544508 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -224,6 +224,9 @@ def results_user(request):
@email_verified
def add_question(request, question_id=None):
user = request.user
+ if not is_moderator(user):
+ raise Http404('You are not allowed to view this page !')
+
test_case_type = None
if question_id is not None: