Commit 1fc26de9 by Your Name

merge master

parent 66e443ae
...@@ -21,7 +21,8 @@ def is_course_cohorted(course_id): ...@@ -21,7 +21,8 @@ def is_course_cohorted(course_id):
Raises: Raises:
Http404 if the course doesn't exist. Http404 if the course doesn't exist.
""" """
return courses.get_course_by_id(course_id).is_cohorted #return courses.get_course_by_id(course_id).is_cohorted
return True
def get_cohort_id(user, course_id): def get_cohort_id(user, course_id):
......
...@@ -117,6 +117,8 @@ def forum_form_discussion(request, course_id): ...@@ -117,6 +117,8 @@ def forum_form_discussion(request, course_id):
Renders the main Discussion page, potentially filtered by a search query Renders the main Discussion page, potentially filtered by a search query
""" """
course = get_course_with_access(request.user, course_id, 'load') course = get_course_with_access(request.user, course_id, 'load')
print "\n\n\n\n\n****************************"
print course
category_map = utils.get_discussion_category_map(course) category_map = utils.get_discussion_category_map(course)
try: try:
...@@ -165,10 +167,13 @@ def forum_form_discussion(request, course_id): ...@@ -165,10 +167,13 @@ 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), #'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id),
'cohorts': get_course_cohorts 'is_moderator': True,
'cohorts': get_course_cohorts(course_id)
} }
# print "start rendering.." # print "start rendering.."
print "\n\n\n\n\n\n*************************************"
print context
return render_to_response('discussion/index.html', context) return render_to_response('discussion/index.html', context)
@login_required @login_required
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +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 is_moderator: %if is_moderator:
<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">
......
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