* refactor(certificates): replace direct model imports with data classes and APIs
* fix: use Certificates API to create certificates
* docs: update docstring for get_certificate_for_user
* fix: remove trailing whitespace
---------
Co-authored-by: coder1918 <ram.chandra@wgu.edu>
Co-authored-by: Deborah Kaplan <deborahgu@users.noreply.github.com>
refactor: move editor_saved to VideoConfigService (#37829)
* This moves edx-platform-specific logic out of the VideoBlock,
in preparation for the VideoBlock extraction
The "overview" and "about_sidebar_html" fields in the
CoursewareInformation view (/api/courseware/course/{courseId}) were
returning unsanitized HTML and relying on the client to sanitize it.
This commit shifts that work to the server side (clean_dangerous_html)
to remove potentially dangerous tags when generating the response. The
source of this data is modified in the "Settings and Details" section
of a course in Studio.
There is no way to resume either the backup or restore library actions,
i.e. if you navigate away from it, you have to do it again. This is a
limitation of the current UI because we wanted to get something quick
and simple in for Ulmo, but it also reflects the fact that library
backup/restore should be much faster than course import/export has
historically been.
In any case, sending an email for a 5-10 second task is unnecessary and
distracting, so this commit suppresses the email.
Note: I'm using local imports to get around the fact that the
content_libraries public API is used by content_libraries/tasks.py
which defines the tasks. I can't import from content_libraries/tasks.py
directly, because that would violate import linter rules forbidding
other apps from importing things outside of api.py. This isn't ideal,
but it keeps the fix small and it keeps the logic in the
content_libraries app.
- Document the types used in
COURSE_NOTIFICATION_TYPES and COURSE_NOTIFICATION_APPS.
- Port the wiki page on creating a new notification to the docs here.
- Add some miscellaneous docs and placeholder TODO notes.
- Add a data flow diagram.
- Add a short getting started guide for operators
(mainly for getting email notifications working).
Private-ref: https://tasks.opencraft.com/browse/BB-10065
* Updates `ModulestoreBlockMigration` table to allow storing `null` values in `target` field for blocks that failed to migrate/import.
* Adds `unsupported_reason` field to store reason for failure.
* Add number of children blocks in failed block `unsupported_reason` field.
* Fixes issue with blocks like `openassessment` where `url_name` field is not included in its olx during serialization.
As part of the ongoing effort to deprecate and eventually remove xmodule,
we’ve started gradually migrating the necessary code files from xmodule
to more appropriate locations within the codebase.
Ticket: https://github.com/openedx/public-engineering/issues/445
Also: this tweaks importlinter ignores & add follow-up issue links
Co-authored-by: Kyle McCormick <kyle@axim.org>
* feat: add the authz check to the library api function
feat: add the authz publish check in rest_api blocks and containers
feat: add the authz checks in libraries and refactor
feat: add collections checks
feat: update enforcement in serializer file
refactor: refactor the permission check functions
fix: fix value error
fix: calling the queries twice
* test: add structure for test and apply feedback
refactor: refactor the tests and apply feedback
fix: apply feedback
Revert "refactor: refactor the tests and apply feedback"
This reverts commit aa0bd527dd7bc7dec4a7ad7adb41a3c932f4a587.
refactor: use constants and avoid mapping
test: fix the test to have them in order
docs: about we rely on bridgekeeper and the old check for two cases
docs: update openedx/core/djangoapps/content_libraries/api/libraries.py
Co-authored-by: Maria Grimaldi (Majo) <maria.grimaldi@edunext.co>
refactor: use global scope wildcard instead of *
refactor: allow receiving PermissionData objects
refactor: do not inherit from BaseRolesTestCase to favor CL setup methods
If both BaseRolesTestCase and ContentLibrariesRestApiTest define a method
with the same name (e.g., setUp()), Python will use the one found first
in the MRO, which is the one in BaseRolesTestCase because it is
listed first in the class definition leading to unexpected behavior.
refactor: remove unnecessary imports and indent
* chore: bump openedx-authz version
This pulls in publishing dependency changes from:
https://github.com/openedx/openedx-learning/pull/369
This fixes a bug where publishing a Content Library v2 container would
publish only its direct children instead of publishing all ancestors.
Co-authored-by: Kyle McCormick <kyle@axim.org>
This setting was not actually not changing installation behavior, that
is being set by whether oauth_dispatch is in INSTALLED_APPS or not.
This flag was being used to:
* Hide enable/disable certain URL paths.
* We need these paths on all the time in the LMS because all other
services and MFE rely on oauth to authenticate with the LMS so we
just end up turning this on later in the settings stack.
* We use it to only run certain oauth_dispatch tests in the LMS test
environment because the oauth_dispatch app is not installed in the
CMS.
* We use the `skip_unless_lms` decorator now instead to do this or
just run the tests in both suites because they are valid tests in
both contexts.