summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authorCruiseDevice2020-04-15 22:15:53 +0530
committerCruiseDevice2020-04-15 22:15:53 +0530
commiteb9f6cb240268735e08ebc2a6d26d88c7e5097f7 (patch)
treead5eddc0fbdbd73c6b520edf1da3baabd960f30c /yaksh/views.py
parent169228186d8c9ad880ee33c5190e49203d2c5243 (diff)
downloadonline_test-eb9f6cb240268735e08ebc2a6d26d88c7e5097f7.tar.gz
online_test-eb9f6cb240268735e08ebc2a6d26d88c7e5097f7.tar.bz2
online_test-eb9f6cb240268735e08ebc2a6d26d88c7e5097f7.zip
Improve UI slightly
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index c154d4e..01d5f48 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -3252,6 +3252,7 @@ def post_comments(request, course_id, uuid):
@login_required
@email_verified
def hide_post(request, course_id, uuid):
+ user = request.user
course = get_object_or_404(Course, id=course_id)
if (not course.is_creator(user) and not course.is_teacher(user)
and not course.is_student(user)):
@@ -3263,7 +3264,10 @@ def hide_post(request, course_id, uuid):
return redirect('yaksh:course_forum', course_id)
+@login_required
+@email_verified
def hide_comment(request, course_id, uuid):
+ user = request.user
course = get_object_or_404(Course, id=course_id)
if (not course.is_creator(user) and not course.is_teacher(user)
and not course.is_student(user)):