Skip to content

Conversation

@kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented Sep 14, 2021

Description

This PR includes two bugfixes. They are separate, but related in that they touch the "course_creators" CMS app.

The second commit (admin search) fixes a bug introduced by this community PR: https://github.com/edx/edx-platform/pull/26616. The first commit (creation rights notice) fixes a bug that was reported right around the same time, although I cannot find any code-level evidence that it is related to the community PR.

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".

Home page (with or without fix):
image

After clicking "Courses" tab (without fix):
image

After clicking "Courses" tab (with fix):
image

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.

Supporting information

Bug tix:

Testing instructions

Creation notice visibility:

Repro bug:

  • Check out master.
  • Start CMS in devstack.
  • Go to localhost:18010 and log in with a non-global-staff account.
  • Notice that "Become a course creator" expandable section is visible.
  • Click on the "Courses" tab, noticing that it adds #courses-tab to the URL.
  • Notice the bug: the "Become a course creator" section has become invisible.

Confirm fix:

  • Check out this branch.
  • If necessary -- Clear your browser's cache for localhost:18010 (or all sites)
  • Go to localhost:18010 and log in with a non-global-staff account.
  • Notice that "Become a course creator" expandable section is visible.
  • Click on the "Courses" tab, noticing that it adds #courses-tab to the URL.
  • Notice the fix: the "Become a course creator" section is still visible.
  • Click "Libraries" tab. Notice should disappear.
  • Click "Courses" tab. Notice should reappear.

Admin search:

Repro bug:

Confirm fix:

Deadline

For partner support's sake, would be good to have this in by end-of-week (2021-09-17).

Other information

None

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
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
@kdmccormick kdmccormick changed the title fix: course creation notice visibility and admin searcj fix: course creation notice visibility and admin search Sep 14, 2021
@kdmccormick kdmccormick marked this pull request as ready for review September 14, 2021 16:55
@kdmccormick kdmccormick merged commit d701b42 into master Sep 14, 2021
@kdmccormick kdmccormick deleted the kdmccormick/course-creators-bugfixes branch September 14, 2021 17:31
@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

@edx-status-bot
Copy link

Your PR has finished running tests. There were no failures.

farhaanbukhsh added a commit to open-craft/edx-platform that referenced this pull request Oct 4, 2021
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants