From 89519c5d4c2ac07687b98911b7db9618e5204b86 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Wed, 14 Oct 2020 18:15:52 +0530 Subject: Allow added teachers to delete posts/comments --- yaksh/templates/yaksh/lessons_forum.html | 2 +- yaksh/templates/yaksh/post_comments.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/yaksh/templates/yaksh/lessons_forum.html b/yaksh/templates/yaksh/lessons_forum.html index 250536d..58fb360 100644 --- a/yaksh/templates/yaksh/lessons_forum.html +++ b/yaksh/templates/yaksh/lessons_forum.html @@ -61,7 +61,7 @@ {% endwith %} - {% if user == course.creator %} + {% if user == course.creator or user in course.get_teachers %} {% endif %} diff --git a/yaksh/templates/yaksh/post_comments.html b/yaksh/templates/yaksh/post_comments.html index bc452e0..70aac47 100644 --- a/yaksh/templates/yaksh/post_comments.html +++ b/yaksh/templates/yaksh/post_comments.html @@ -38,7 +38,7 @@ {% endif %} {{post.created_at}} - {% if user == course.creator %}{% endif %} + {% if user == course.creator or user in course.get_teachers %}{% endif %} @@ -77,7 +77,7 @@
- {{comment.created_at}} {% if user == course.creator %} {% endif %} + {{comment.created_at}} {% if user == course.creator or user in course.get_teachers %} {% endif %}

{{comment.description|safe}}

-- cgit From e6df6090835c3368b2623189fa6919ebe2270e9e Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Wed, 14 Oct 2020 18:23:55 +0530 Subject: Allow added teachers to delete course forum posts --- yaksh/templates/yaksh/course_forum.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaksh/templates/yaksh/course_forum.html b/yaksh/templates/yaksh/course_forum.html index acd6861..b98688b 100644 --- a/yaksh/templates/yaksh/course_forum.html +++ b/yaksh/templates/yaksh/course_forum.html @@ -129,7 +129,7 @@ {% endwith %} - {% if user == course.creator %} + {% if user == course.creator or user in course.get_teachers %} {% endif %} -- cgit