From 976713c1cd2f7a74aaa6893ade275190c385198a Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Wed, 26 Apr 2017 12:34:53 +0530 Subject: Redirect users to error page if they are not allowed to clone a course --- yaksh/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'yaksh/views.py') 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/') -- cgit