From 3404011f16c9b5441922d0445ae2cc5d481fbda9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 29 Jan 2013 17:23:08 -0500 Subject: [PATCH] update front end to support selection and display of cohort ids --- lms/djangoapps/django_comment_client/forum/views.py | 3 ++- lms/templates/discussion/_new_post.html | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 2c1d3c68d5..29000a225f 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -16,7 +16,7 @@ from courseware.access import has_access from urllib import urlencode from operator import methodcaller -from django_comment_client.permissions import check_permissions_by_view +from django_comment_client.permissions import check_permissions_by_view, cached_has_permission from django_comment_client.utils import (merge_dict, extract, strip_none, strip_blank, get_courseware_context) @@ -165,6 +165,7 @@ def forum_form_discussion(request, course_id): 'course_id': course.id, 'category_map': category_map, 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), + 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), } # print "start rendering.." return render_to_response('discussion/index.html', context) diff --git a/lms/templates/discussion/_new_post.html b/lms/templates/discussion/_new_post.html index 7a0fa46e4a..26c886c6ac 100644 --- a/lms/templates/discussion/_new_post.html +++ b/lms/templates/discussion/_new_post.html @@ -45,6 +45,7 @@ %elif course.metadata.get("allow_anonymous_to_peers", False): %endif + % if true:
Make visible to:
+ %endif