From 48655c26e3d7b0dbed2793e3e492da76758b0a4d Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Tue, 14 Sep 2021 11:46:38 -0400 Subject: [PATCH 1/2] fix: show creation rights notice on studio "courses" tab There was a JS bug that made it so the course creation rights notice (the thing that invites new studio users to request access to create content) disappeared if the user selected the "Courses" or "Libraries" tab. This is because it was incorrectly comparing the #courses-tab URL frament against the string "courses" instead of "courses-tab". TNL-8718 --- cms/static/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/static/js/index.js b/cms/static/js/index.js index 432f99cd6690..09c7de843e1a 100644 --- a/cms/static/js/index.js +++ b/cms/static/js/index.js @@ -168,7 +168,7 @@ define(['domReady', 'jquery', 'underscore', 'js/utils/cancel_on_escape', 'js/vie $('.libraries-tab').toggleClass('active', tab === 'libraries-tab'); // Also toggle this course-related notice shown below the course tab, if it is present: - $('.wrapper-creationrights').toggleClass('is-hidden', tab !== 'courses'); + $('.wrapper-creationrights').toggleClass('is-hidden', tab !== 'courses-tab'); }; }; From a00a7318ba152f88b23e7ecbd46981bf9567b671 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Tue, 14 Sep 2021 11:59:11 -0400 Subject: [PATCH 2/2] fix: repair search of course creator statuses in django admin It was broken because "organizations" was erronously included in the `search_fields` admin option. Many-to-many fields may not be used for search. TNL-8722 --- cms/djangoapps/course_creators/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/course_creators/admin.py b/cms/djangoapps/course_creators/admin.py index 45ff82ec49cc..a1d34b3897fc 100644 --- a/cms/djangoapps/course_creators/admin.py +++ b/cms/djangoapps/course_creators/admin.py @@ -82,7 +82,7 @@ class CourseCreatorAdmin(admin.ModelAdmin): # Fields that filtering support list_filter = ['state', 'state_changed'] # Fields that search supports. - search_fields = ['user__username', 'user__email', 'state', 'note', 'organizations'] + search_fields = ['user__username', 'user__email', 'state', 'note'] # Turn off the action bar (we have no bulk actions) actions = None form = CourseCreatorForm