In the serializer, return an empty string if there is no request object.
In content_tagging, just update the type declaration to match the
expectation since it can obviously be a None type.
Fix lack of the permissions for course staff/instructor roles.
Allows course staff/admin users use cohorts API, e.g. for
cohort filters in the Gradebook MFE.
In the context of edx-platform django settings,
devstack_docker is an alias to devstack. Both
are deprecated, technically, but we currently
want to remove all devstack-related settings files
except devstack.py (which tutor still uses). So,
in order to remove devstack_docker.py, we update
its references to devstack.py
* feat: fixing swagger doc for user accounts
user API docstrings reformatted so that the generated openAPI
documentation automatically picks up the documentation and formatted
correctly.
Still some work to do, since these endpoints don't use serializers and
we should use drg_yasg Schema declarations to make the generated
openAPI correctly understand the request and response formats, but this
is already a big improvement.
Fixed some restructured text markup
FIXES: APER-4065
Both 'provider' and 'provider_type' have been used for storing the discussion provider type in course 'discussions_settings' field, there are some places in the code checking for 'provider' and others checking for 'provider_type', in some cases this can cause a bug where it doesn't detect the correct provider which causes discussion settings not being copied correctly when a course is cloned.
This change prioritises the `provider_type` setting over `provider` and reads `provider` only as a fallback. The `provider` setting is now made read-only just for backwards-compatibility, to avoid confusion.
Returns HTTP 400 for disallowed enrollments instead of HTTP 500.
Prevents infinite loading spinners on the enrollment page.
Displays clear error messages to users before redirection.
Ensures consistent and meaningful responses from enrollment API endpoints.
* fix: commerce and enrollment apis return 403 when enrollment not allowed
* fix: now both apis send the right message and http code when enrollment fails
* fix: InvalidEnrollmentAtribute as final exception to catch and HTTP 400 returned
* style: the message is displayed as a popup instead of creating a div at the end
* fix: import not used removed for pylint checks
* style: popup now use utility classes
* refactor: use const instead of let for existing const
* refactor: textContent const structure changed due check failed
* refactor: SetTimeout settled as arrow function
* feat: button incorporated to bring users enough time to read the message
* refactor: ErrorStatuses defined at the top of the file to use it in conditionals
* style: typo fixed
Co-authored-by: Diana Olarte <dcoa@live.com>
* refactor: double validation of redirectUrl eliminated and better styling of the message
Co-authored-by: Diana Olarte <dcoa@live.com>
* refactor: redirectUrl param eliminated in showmessage function, close button redirects to dashboard always
* docs: remove unused redirectUrl param from JSDoc and explain hardcoded URL
* style: endline added
* feat: enrollmentNotAllowed exception added in views and the js
* docs: comment added to especify exception
* style: endline added
* refactor: error statuses velidation changed to one single validation instead of two
* refactor: function added to handle enrollment errors
* feat: enrollmentNotAllowed exception added for API coherence and consistency
* style: empty line added
* style: pylint check line too long disabled
---------
Co-authored-by: Diana Olarte <dcoa@live.com>
feat: added account level pref model in notification task
feat: added handler for preference creation on user signup
feat: added unit tests for account level preferences
* fix: removed app level check in notifications
* fix: updated flaky test
The CookieNameChange middleware has been removed. Originally a temporary
measure slated for removal by October 1, 2021, it facilitated a transitional cookie
migration pattern that is no longer required.
This action addresses DEPR:
https://github.com/openedx/edx-platform/issues/36834
This PR fixes following filter on the discussions module by replacing forum api to api since we only need threads that are subscribed/followed by the requesting user.
* fix: redirect to account MFE when using any legacy account URL
Redirect to the account MFE URL configured each time a legacy
account URL like http(s)://lms/account/ or http(s)://lms/account/settings
is used to avoid 404 errors while linking SSO accounts or simply
trying to access the account view via URLs.
The api/courseware/course fails for all the verified enrollments if you
are not using Account MFE, which means that you probably won't set
ACCOUNT_MICROFRONTEND_URL in your settings/configurations.
So this PR adds a check safely try to do rstrip.
Fixes a bug in https://github.com/openedx/edx-platform/pull/36870