diff options
author | ankitjavalkar | 2017-04-26 12:34:53 +0530 |
---|---|---|
committer | ankitjavalkar | 2017-04-28 17:16:45 +0530 |
commit | 976713c1cd2f7a74aaa6893ade275190c385198a (patch) | |
tree | 8d059e7c4f998159b59792cc969ba9ae569ef146 | |
parent | c6550fbdf7681a2d7d0ad1c893c13147d80405e3 (diff) | |
download | online_test-976713c1cd2f7a74aaa6893ade275190c385198a.tar.gz online_test-976713c1cd2f7a74aaa6893ade275190c385198a.tar.bz2 online_test-976713c1cd2f7a74aaa6893ade275190c385198a.zip |
Redirect users to error page if they are not allowed to clone a course
-rw-r--r-- | yaksh/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index bad91f8..6a4325e 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -1607,5 +1607,8 @@ def duplicate_course(request, course_id): if course.is_teacher(user) or course.is_creator(user): course.create_duplicate_course(user) - + else: + msg = 'You do not have permissions to clone this course, please contact your '\ + 'instructor/administrator.' + return complete(request, msg, attempt_num=None, questionpaper_id=None) return my_redirect('/exam/manage/courses/') |