-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Test failure] < TC_AUTHOR_146 >: Cannot request course creator permission #428
Comments
I could reproduce this in the sandbox with a brand-new user. This endpoint is raising a 500 error: https://studio.sumac.demo.edly.io/api/contentstore/v2/home/courses?page=1&order=display_name I already asked the sandbox maintainer for server logs so we can know more. EDIT: @DawoudSheraz, if you can, please paste the logs in this thread. Thank you! |
I know what’s wrong because I implemented the feature that’s failing. I’m working on fixing it now, and thankfully, it’s easy to solve. I'll let you know once I have a PR. |
Stack trace
|
Here's the PR that fixes this issue: openedx/edx-platform#35942 |
This change addresses an issue reported while testing Sumac, where the API V2 is on by default in the authoring MFE: openedx/wg-build-test-release#428. It fails when retrieving an empty list of courses with the queryparams api/contentstore/v2/home/courses?page=1&order=display_name. When this was implemented, the course authoring MFE rendered the empty lists only with page=1 query param (didn't do any filtering/ordering by default), which was later changed to page=1&order=display_name which now ordered by default. This issue occurs because all the filtering and ordering are done under the assumption that course_overviews is always a query set. However, that's only true when there are courses available and CourseOverview.get_all_courses is used. When not, an empty list is returned instead, raising a 500 error in Studio.
Reopening this since I still need to backport the changes. |
This change addresses an issue reported while testing Sumac, where the API V2 is on by default in the authoring MFE: openedx/wg-build-test-release#428. It fails when retrieving an empty list of courses with the queryparams api/contentstore/v2/home/courses?page=1&order=display_name. When this was implemented, the course authoring MFE rendered the empty lists only with page=1 query param (didn't do any filtering/ordering by default), which was later changed to page=1&order=display_name which now ordered by default. This issue occurs because all the filtering and ordering are done under the assumption that course_overviews is always a query set. However, that's only true when there are courses available and CourseOverview.get_all_courses is used. When not, an empty list is returned instead, raising a 500 error in Studio.
This change addresses an issue reported while testing Sumac, where the API V2 is on by default in the authoring MFE: openedx/wg-build-test-release#428. It fails when retrieving an empty list of courses with the queryparams api/contentstore/v2/home/courses?page=1&order=display_name. When this was implemented, the course authoring MFE rendered the empty lists only with page=1 query param (didn't do any filtering/ordering by default), which was later changed to page=1&order=display_name which now ordered by default. This issue occurs because all the filtering and ordering are done under the assumption that course_overviews is always a query set. However, that's only true when there are courses available and CourseOverview.get_all_courses is used. When not, an empty list is returned instead, raising a 500 error in Studio.
This change addresses an issue reported while testing Sumac, where the API V2 is on by default in the authoring MFE: openedx/wg-build-test-release#428. It fails when retrieving an empty list of courses with the queryparams api/contentstore/v2/home/courses?page=1&order=display_name. When this was implemented, the course authoring MFE rendered the empty lists only with page=1 query param (didn't do any filtering/ordering by default), which was later changed to page=1&order=display_name which now ordered by default. This issue occurs because all the filtering and ordering are done under the assumption that course_overviews is always a query set. However, that's only true when there are courses available and CourseOverview.get_all_courses is used. When not, an empty list is returned instead, raising a 500 error in Studio.
Fixed in the sandbox! @angonz: could you help me retest please? Thank you! |
Test passed! |
Release
Sumac
Expected behavior
A regular user (non staff, non superuser) should be able to request course creator permission after logging into Studio.
Actual behavior
Studio home page displays "Failed to fetch courses. Please try again later." No button to request course creator permission is shown.
Steps to reproduce
Go to https://studio.sumac.demo.edly
Login with "student" user
You should be redirected to https://apps.sumac.demo.edly.io/authoring/home
Additional information
No response
The text was updated successfully, but these errors were encountered: