From d047d826c7556225a97d1020be4da45ddd02d1f4 Mon Sep 17 00:00:00 2001 From: Kevin Chugh Date: Wed, 6 Feb 2013 22:00:03 -0500 Subject: [PATCH 01/22] update coffeescript to hide cohort choice if first commmentable is not cohorted --- .../static/coffee/src/discussion/views/new_post_view.coffee | 5 +++++ lms/djangoapps/django_comment_client/forum/views.py | 2 +- lms/templates/discussion/_new_post.html | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/static/coffee/src/discussion/views/new_post_view.coffee b/common/static/coffee/src/discussion/views/new_post_view.coffee index be146587df..606e4f30d7 100644 --- a/common/static/coffee/src/discussion/views/new_post_view.coffee +++ b/common/static/coffee/src/discussion/views/new_post_view.coffee @@ -17,6 +17,11 @@ if Backbone? @$(".new-post-tags").tagsInput DiscussionUtil.tagsInputOptions() + if @$($(".topic_menu li a")[0]).attr('cohorted') != "True" + $('.choose-cohort').hide(); + + + events: "submit .new-post-form": "createPost" "click .topic_dropdown_button": "toggleTopicDropdown" diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 4bfecd5d6e..1cea627bc0 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -229,9 +229,9 @@ def forum_form_discussion(request, course_id): 'is_course_cohorted': is_course_cohorted(course_id) } # print "start rendering.." + return render_to_response('discussion/index.html', context) - @login_required def single_thread(request, course_id, discussion_id, thread_id): course = get_course_with_access(request.user, course_id, 'load') diff --git a/lms/templates/discussion/_new_post.html b/lms/templates/discussion/_new_post.html index 4c37c347ba..223b593368 100644 --- a/lms/templates/discussion/_new_post.html +++ b/lms/templates/discussion/_new_post.html @@ -47,7 +47,7 @@ %endif %if is_course_cohorted: -