Commit 102fb523 by jsa Committed by E. Kolpakov

Add topic selection to inline thread editing, fixing errors

Co-Authored-By: Brian Talbot <btalbot@edx.org>

TNL-549

Conflicts:
	common/static/coffee/spec/discussion/view/discussion_thread_edit_view_spec.js
	common/static/coffee/src/discussion/discussion_module_view.coffee
	common/static/coffee/src/discussion/views/discussion_thread_edit_view.js
	lms/djangoapps/django_comment_client/forum/views.py
parent cb6bc3b0
......@@ -36,7 +36,7 @@ def _attr_safe_json(obj):
return saxutils.escape(json.dumps(obj), {'"': '&quot;'})
@newrelic.agent.function_trace()
def make_course_settings(course, include_category_map=False):
def make_course_settings(course):
"""
Generate a JSON-serializable model for course settings, which will be used to initialize a
DiscussionCourseSettings object on the client.
......@@ -47,11 +47,9 @@ def make_course_settings(course, include_category_map=False):
'allow_anonymous': course.allow_anonymous,
'allow_anonymous_to_peers': course.allow_anonymous_to_peers,
'cohorts': [{"id": str(g.id), "name": g.name} for g in get_course_cohorts(course.id)],
'category_map': utils.get_discussion_category_map(course)
}
if include_category_map:
obj['category_map'] = utils.get_discussion_category_map(course)
return obj
@newrelic.agent.function_trace()
......@@ -183,7 +181,7 @@ def forum_form_discussion(request, course_id):
nr_transaction = newrelic.agent.current_transaction()
course = get_course_with_access(request.user, 'load_forum', course_id)
course_settings = make_course_settings(course, include_category_map=True)
course_settings = make_course_settings(course)
try:
unsafethreads, query_params = get_threads(request, course_id) # This might process a search query
......@@ -246,7 +244,7 @@ def single_thread(request, course_id, discussion_id, thread_id):
nr_transaction = newrelic.agent.current_transaction()
course = get_course_with_access(request.user, 'load_forum', course_id)
course_settings = make_course_settings(course, include_category_map=True)
course_settings = make_course_settings(course)
cc_user = cc.User.from_django_user(request.user)
user_info = cc_user.to_dict()
......
......@@ -256,3 +256,19 @@ footer .references {
.dashboard {
padding-top: 60px;
}
// ====================
// poor definition/scope on ul elements inside .vert-mod element in courseware - override needed for inline discussion editing
.course-content .discussion-post.edit-post-form .topic-menu {
padding-left: 0;
list-style: none;
.topic-menu-item {
margin-bottom: 0;
}
}
.course-content .discussion-post.edit-post-form .topic-submenu {
list-style: none;
}
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