diff --git a/.redcar/lucene/_66.cfs.REMOVED.git-id b/.redcar/lucene/_66.cfs.REMOVED.git-id new file mode 100644 index 0000000000..59b04d4289 --- /dev/null +++ b/.redcar/lucene/_66.cfs.REMOVED.git-id @@ -0,0 +1 @@ +0f446e9d6cbcb18b0982ff31a746ea770332324b \ No newline at end of file diff --git a/.redcar/lucene/_66_2.del b/.redcar/lucene/_66_2.del new file mode 100644 index 0000000000..7e256391af Binary files /dev/null and b/.redcar/lucene/_66_2.del differ diff --git a/.redcar/lucene/_67.cfs b/.redcar/lucene/_67.cfs new file mode 100644 index 0000000000..8fd1a8cf61 Binary files /dev/null and b/.redcar/lucene/_67.cfs differ diff --git a/.redcar/lucene/_67_1.del b/.redcar/lucene/_67_1.del new file mode 100644 index 0000000000..1b473bd5a7 Binary files /dev/null and b/.redcar/lucene/_67_1.del differ diff --git a/.redcar/lucene/_68.cfs b/.redcar/lucene/_68.cfs new file mode 100644 index 0000000000..3433701c95 Binary files /dev/null and b/.redcar/lucene/_68.cfs differ diff --git a/.redcar/lucene/_68_1.del b/.redcar/lucene/_68_1.del new file mode 100644 index 0000000000..1b473bd5a7 Binary files /dev/null and b/.redcar/lucene/_68_1.del differ diff --git a/.redcar/lucene/_69.cfs b/.redcar/lucene/_69.cfs new file mode 100644 index 0000000000..4fb6483b82 Binary files /dev/null and b/.redcar/lucene/_69.cfs differ diff --git a/.redcar/lucene/_69_1.del b/.redcar/lucene/_69_1.del new file mode 100644 index 0000000000..c92162a59c Binary files /dev/null and b/.redcar/lucene/_69_1.del differ diff --git a/.redcar/lucene/_6a.cfs b/.redcar/lucene/_6a.cfs new file mode 100644 index 0000000000..5553a9eac2 Binary files /dev/null and b/.redcar/lucene/_6a.cfs differ diff --git a/.redcar/lucene/_u.cfs.REMOVED.git-id b/.redcar/lucene/_u.cfs.REMOVED.git-id new file mode 100644 index 0000000000..526c5a3294 --- /dev/null +++ b/.redcar/lucene/_u.cfs.REMOVED.git-id @@ -0,0 +1 @@ +5fe5d57a2b8cb1229d5b41de5a604c405c911249 \ No newline at end of file diff --git a/.redcar/lucene/_u_4.del b/.redcar/lucene/_u_4.del new file mode 100644 index 0000000000..fca1d92502 Binary files /dev/null and b/.redcar/lucene/_u_4.del differ diff --git a/.redcar/lucene/_v.cfs b/.redcar/lucene/_v.cfs new file mode 100644 index 0000000000..c4bcafe6c3 Binary files /dev/null and b/.redcar/lucene/_v.cfs differ diff --git a/.redcar/lucene/_v_4.del b/.redcar/lucene/_v_4.del new file mode 100644 index 0000000000..853a15c70e Binary files /dev/null and b/.redcar/lucene/_v_4.del differ diff --git a/.redcar/lucene/segments.gen b/.redcar/lucene/segments.gen new file mode 100644 index 0000000000..2316df7a89 Binary files /dev/null and b/.redcar/lucene/segments.gen differ diff --git a/.redcar/lucene/segments_5q b/.redcar/lucene/segments_5q new file mode 100644 index 0000000000..876dfddfe5 Binary files /dev/null and b/.redcar/lucene/segments_5q differ diff --git a/.redcar/lucene_last_updated b/.redcar/lucene_last_updated new file mode 100644 index 0000000000..1825f8b1e5 --- /dev/null +++ b/.redcar/lucene_last_updated @@ -0,0 +1 @@ +1360351700 diff --git a/.redcar/redcar.lock b/.redcar/redcar.lock new file mode 100644 index 0000000000..1f9bb34080 --- /dev/null +++ b/.redcar/redcar.lock @@ -0,0 +1 @@ +28751: Locked by 28751 at Fri Feb 08 14:14:21 -0500 2013 diff --git a/.redcar/storage/cursor_saver.yaml b/.redcar/storage/cursor_saver.yaml new file mode 100644 index 0000000000..0c6b3f4a14 --- /dev/null +++ b/.redcar/storage/cursor_saver.yaml @@ -0,0 +1,44 @@ +--- +cursor_positions: + - :path: common/static/coffee/src/discussion/views/discussion_content_view.coffee + :cursor_offset: 0 + :timestamp: 2013-01-29 15:05:38 -05:00 + - :path: common/static/coffee/src/discussion/views/discussion_thread_view.coffee + :cursor_offset: 1383 + :timestamp: 2013-01-29 15:05:38 -05:00 + - :path: common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee + :cursor_offset: 766 + :timestamp: 2013-01-29 15:05:38 -05:00 + - :path: lms/djangoapps/django_comment_client/base/views.py + :cursor_offset: 0 + :timestamp: 2013-02-07 10:06:26 -05:00 + - :path: common/static/coffee/src/discussion/models/discussion_user.coffee + :cursor_offset: 0 + :timestamp: 2013-01-29 15:05:38 -05:00 + - :path: lms/djangoapps/django_comment_client/utils.py + :cursor_offset: 811 + :timestamp: 2013-02-07 10:06:27 -05:00 + - :path: lms/templates/discussion/mustache/_new_post.mustache + :cursor_offset: 0 + :timestamp: 2013-02-08 10:34:14 -05:00 + - :path: common/static/coffee/src/discussion/views/new_post_inline_vew.coffee + :cursor_offset: 0 + :timestamp: 2013-02-05 12:00:15 -05:00 + - :path: lms/templates/discussion/mustache/_inline_discussion.mustache + :cursor_offset: 278 + :timestamp: 2013-02-08 10:34:44 -05:00 + - :path: common/static/coffee/src/discussion/discussion_module_view.coffee + :cursor_offset: 2546 + :timestamp: 2013-02-08 12:47:34 -05:00 + - :path: lms/templates/discussion/_new_post.html + :cursor_offset: 3183 + :timestamp: 2013-02-07 10:06:27 -05:00 + :selection_offset: 2424 + :block_selection_mode: false + - :path: lms/templates/discussion/mustache/_inline_discussion_cohorted.mustache + :cursor_offset: 1099 + :timestamp: 2013-02-08 12:44:34 -05:00 + - :path: lms/djangoapps/django_comment_client/forum/views.py + :cursor_offset: 5507 + :timestamp: 2013-02-08 12:42:07 -05:00 +files_to_retain: 0 diff --git a/.redcar/storage/project_loader.yaml b/.redcar/storage/project_loader.yaml new file mode 100644 index 0000000000..94aede81b6 --- /dev/null +++ b/.redcar/storage/project_loader.yaml @@ -0,0 +1,7 @@ +--- +open_files: + - lms/templates/discussion/mustache/_inline_discussion.mustache + - common/static/coffee/src/discussion/discussion_module_view.coffee + - lms/templates/discussion/_new_post.html + - lms/templates/discussion/mustache/_inline_discussion_cohorted.mustache + - lms/djangoapps/django_comment_client/forum/views.py diff --git a/.redcar/storage/sessions.yaml b/.redcar/storage/sessions.yaml new file mode 100644 index 0000000000..25f350b988 --- /dev/null +++ b/.redcar/storage/sessions.yaml @@ -0,0 +1,7 @@ +--- +bounds: + x: 65 + y: 24 + width: 1857 + height: 1085 +tree_width: 667 diff --git a/.redcar/tags.REMOVED.git-id b/.redcar/tags.REMOVED.git-id new file mode 100644 index 0000000000..1b8922dea3 --- /dev/null +++ b/.redcar/tags.REMOVED.git-id @@ -0,0 +1 @@ +91fb8f5bb1f34326b4cb90f3d3770affcd1d7d58 \ No newline at end of file diff --git a/common/static/coffee/src/discussion/discussion_module_view.coffee b/common/static/coffee/src/discussion/discussion_module_view.coffee index 077210bc4f..4e4c2d1e7a 100644 --- a/common/static/coffee/src/discussion/discussion_module_view.coffee +++ b/common/static/coffee/src/discussion/discussion_module_view.coffee @@ -70,6 +70,7 @@ if Backbone? DiscussionUtil.loadRoles(response.roles) allow_anonymous = response.allow_anonymous allow_anonymous_to_peers = response.allow_anonymous_to_peers + cohorts = response.cohorts # $elem.html("Hide Discussion") @discussion = new Discussion() @discussion.reset(response.discussion_data, {silent: false}) @@ -78,8 +79,12 @@ if Backbone? #determined in the coffeescript based on whether or not there's a #group id - $discussion = $(Mustache.render $("script#_inline_discussion").html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous}) + if response.is_cohorted + source = "script#_inline_discussion_cohorted" + else + source = "script#_inline_discussion" + $discussion = $(Mustache.render $(source).html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous, 'cohorts':cohorts}) if @$('section.discussion').length @$('section.discussion').replaceWith($discussion) else diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 8b0b2c9c2d..efacbc1b4e 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -132,11 +132,12 @@ def inline_discussion(request, course_id, discussion_id): #since inline is all one commentable, only show or allow the choice of cohorts #if the commentable is cohorted, otherwise everything is not cohorted #and no one has the option of choosing a cohort - is_cohorted = is_course_cohorted(course_id) and is_commentable_cohorted(course_id, discussion_id) + is_cohorted = is_course_cohorted(course_id) and is_commentable_cohorted(course_id, discussion_id) cohorts_list = list() if is_cohorted: + cohorts_list.append({'name':'All Groups','id':None}) #if you're a mod, send all cohorts and let you pick if cached_has_permission(request.user, "see_all_cohorts", course_id): @@ -152,9 +153,7 @@ def inline_discussion(request, course_id, discussion_id): user_cohort_id = user_cohort.id else: user_cohort_name = user_cohort_id = None - - - cohorts_list.append({'name':'All Groups','id':None}) + if user_cohort: cohorts_list.append({'name':user_cohort_name, 'id':user_cohort_id}) else: diff --git a/lms/templates/discussion/mustache/_inline_discussion.mustache b/lms/templates/discussion/mustache/_inline_discussion.mustache index aa2f27062d..6c57fa9dfe 100644 --- a/lms/templates/discussion/mustache/_inline_discussion.mustache +++ b/lms/templates/discussion/mustache/_inline_discussion.mustache @@ -4,7 +4,6 @@