Commit 3404011f by Your Name

update front end to support selection and display of cohort ids

parent 15a28907
...@@ -16,7 +16,7 @@ from courseware.access import has_access ...@@ -16,7 +16,7 @@ from courseware.access import has_access
from urllib import urlencode from urllib import urlencode
from operator import methodcaller 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, from django_comment_client.utils import (merge_dict, extract, strip_none,
strip_blank, get_courseware_context) strip_blank, get_courseware_context)
...@@ -165,6 +165,7 @@ def forum_form_discussion(request, course_id): ...@@ -165,6 +165,7 @@ def forum_form_discussion(request, course_id):
'course_id': course.id, 'course_id': course.id,
'category_map': category_map, 'category_map': category_map,
'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), '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.." # print "start rendering.."
return render_to_response('discussion/index.html', context) return render_to_response('discussion/index.html', context)
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
%elif course.metadata.get("allow_anonymous_to_peers", False): %elif course.metadata.get("allow_anonymous_to_peers", False):
<input type="checkbox" name="anonymous_to_peers" class="discussion-anonymous-to-peers" id="new-post-anonymous-to-peers"><label for="new-post-anonymous-to-peers">post anonymously to classmates</label> <input type="checkbox" name="anonymous_to_peers" class="discussion-anonymous-to-peers" id="new-post-anonymous-to-peers"><label for="new-post-anonymous-to-peers">post anonymously to classmates</label>
%endif %endif
% if true:
<div class="form-group-label"> <div class="form-group-label">
Make visible to: Make visible to:
<select class="group-filter-select"> <select class="group-filter-select">
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
<option value="g2">Group 2</option> <option value="g2">Group 2</option>
</select> </select>
</div> </div>
%endif
</div> </div>
</div> </div>
<div class="right-column"> <div class="right-column">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment