summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index d12f2a2..acd5c62 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -1000,14 +1000,14 @@ def enroll_request(request, course_id):
'instructor/administrator.'
)
messages.warning(request, msg)
-
- course.request(user)
- messages.success(
- request,
- "Enrollment request sent for {0} by {1}".format(
- course.name, course.creator.get_full_name()
+ else:
+ course.request(user)
+ messages.success(
+ request,
+ "Enrollment request sent for {0} by {1}".format(
+ course.name, course.creator.get_full_name()
+ )
)
- )
if is_moderator(user):
return my_redirect('/exam/manage/courses')
else: