Commit 8a953241 by Your Name

first pass

parent 32e5f72c
......@@ -147,17 +147,18 @@ def inline_discussion(request, course_id, discussion_id):
else:
#otherwise, just make a dictionary of two
user_cohort = get_cohort(cc_user, course_id)
if user_cohort:
user_cohort_name = user_cohort.name
user_cohort_id = user_cohort.id
else:
user_cohort_name = user_cohort_id = None
#user_cohort = get_cohort(cc_user, course_id)
#if user_cohort:
# user_cohort_name = user_cohort.name
# user_cohort_id = user_cohort.id
#else:
# user_cohort_name = user_cohort_id = None
cohorts_list = None
if user_cohort:
cohorts_list.append({'name':user_cohort_name, 'id':user_cohort_id})
else:
cohorts_list = None
#if user_cohort:
# cohorts_list.append({'name':user_cohort_name, 'id':user_cohort_id})
#else:
# cohorts_list = None
return utils.JsonResponse({
......
......@@ -46,21 +46,18 @@
%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>
%endif
%if is_course_cohorted:
%if is_course_cohorted and is_moderator:
<div class="form-group-label choose-cohort">
Make visible to:
<select class="group-filter-select new-post-group" name = "group_id">
<option value="">All Groups</option>
%if is_moderator:
%for c in cohorts:
<option value="${c.id}">${c.name}</option>
%endfor
%else:
%if user_cohort:
<option value="${user_cohort}">My Cohort</option>
%for c in cohorts:
<option value="${c.id}"
%if user_cohort and user_cohort == c.id
selected
%endif
%endif
>${c.name}</option>
%endfor
</select>
</div>
%endif
......
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