Commit 6af4af51 by Jonathan Piacenti

Fix inline discussion cohort display when no longer cohorted.

parent c6b36e78
...@@ -198,7 +198,7 @@ def _set_group_names(course_id, threads): ...@@ -198,7 +198,7 @@ def _set_group_names(course_id, threads):
""" Adds group name if the thread has a group id""" """ Adds group name if the thread has a group id"""
for thread in threads: for thread in threads:
if thread.get('group_id'): if thread.get('group_id') and is_course_cohorted(course_id):
thread['group_name'] = get_cohort_by_id(course_id, thread.get('group_id')).name thread['group_name'] = get_cohort_by_id(course_id, thread.get('group_id')).name
thread['group_string'] = "This post visible only to Group %s." % (thread['group_name']) thread['group_string'] = "This post visible only to Group %s." % (thread['group_name'])
else: else:
...@@ -364,6 +364,7 @@ def single_thread(request, course_key, discussion_id, thread_id): ...@@ -364,6 +364,7 @@ def single_thread(request, course_key, discussion_id, thread_id):
) )
except cc.utils.CommentClientRequestError as e: except cc.utils.CommentClientRequestError as e:
if e.status_code == 404: if e.status_code == 404:
print "Can't find it!"
raise Http404 raise Http404
raise raise
......
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