Currently, the sidebar relies only on the XBlock's `category` class attribute
(called `type` in the transformers). This behavior is inconsistent with the
legacy subsection navigation, which relies on the `XModuleMixin.get_icon_class`
method. This commit adds the `icon_class` to the fields collected by the
transformers and uses it to determine whether the "problem" or "video" icon
should be displayed for a unit in the sidebar.
It is possible to create a completable XBlock with children.
An example is the Library Content Block with the
`MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW` feature toggle.
The sidebar should use the same mechanism as the `BlockCompletionTransformer`
and the `edx-completion` library. It means that we should treat:
1. An aggregator XBlock as completed only when all its children are completed.
2. A completable XBlock as completed when it is directly marked as completed
(without checking the completion of its children).
* test: Test for publish section/subsection
* test: published_by is now None for unpublished containers
* test: adds TODO comments to the tests
in anticipation of publishing container children
* feat: adds api to retrieve library block/container hierarchy
* test: adds query counts for hierarchy API tests
These are really high, but highlight the need for future optimizations.
* perf: reduce hierarchy API query counts
* perf: cut query counts in half
Required a refactor of the approach to avoid using the Metadata classes.
* chore: trigger ci
* chore: update openedx-learning constraint
* chore: compile requirements
* test: updating query count
* style: Add missing comment in kernel.in
* fix: get_container_from_key param and comments
* docs: mark api as UNSTABLE and add comment about get_library_object_hierarchy implementation
---------
Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
- Refactor upstream links summary to add the top-level parent logic
- Update the `filter_links` function to annotate each result with `ready_to_sync_from_children`
* feat: return response merged from base config, mfe config and mfe overrides
* test: adjust existing tests
* test: add new test methods
* fix: add blank line
* fix: remove homepage_overlay_html
* fix: typo in a comment
* test: change dict merge order to follow the correct hierarchy
* fix: change response keys to uppercase
* fix: add enable_course_discovery
* fix: change COURSES_ARE_BROWSABLE to NON_BROWSABLE_COURSES
* fix: remove show_homepage_promo_video
* fix: use None as default for promo video youtube id
* docs: expand docstrings, rename method/variables
* fix: remove is_cosmetic_price_enabled field
- Adds the `top_level_parent_usage_key` to the `EntityLinkBase`
- This field is used to save the top-level parent of a component or container when it is imported into a course. Example: A unit with components imported into a course. The unit is the top-level parent of the components.
- Updates the `DownstreamListView` to return the top-level parents instead of downstream child, if this parent exists.
- Each time containers with children were synchronized, a new downstream block was created for each child instead of updating the existing one. This occurred because the `upstream_key` was incorrectly validated as an `Opaquekey` against a list of key strings. This was fixed by converting the `upstream_key` to a string before the verification. (see 34cd5a4781 and 29647831dc)
- Which edX user roles will this change impact? "Course Author", "Developer".
* feat: copy endpoint for Library Containers
* fix: make source_usage_key optional and removing upstram info for xblock olx
* test: add tests
* refactor: remove unecessary changes to reduce diff
* fix: change assert
* feat: add `write_upstream` field to ContainerSerializer
* fix: remove comment
* refactor: change `source_usage_key` type and more
* fix: try to infer the source version
* fix: InvalidKeyError while copying container with assets
* fix: read source_version from OLX
* fix: remove store check
* fix: change ident
Co-authored-by: Braden MacDonald <mail@bradenm.com>
* feat: fill source_version and make get_component_version_from_block public
* refactor: rename `source_key` to `copied_from_block`
* test: add test to `write_copied_from=false`
* fix: removing unused fallback elif
* fix: remove `copied_from_block` param
---------
Co-authored-by: Braden MacDonald <mail@bradenm.com>
It's unclear why this is pinned here in the first place. The only
changes since this version that the fs-s3fs package has had is that the
API has become stable and the underlying dependencies have been upgraded
to newer versions.
DRF was swallowing an underlying error string and providing its own
which was being checked for here.
See https://github.com/encode/django-rest-framework/pull/8051 for
details.
The new version fixes that underlying issue and so the test failed.
Rather than checking for the exact string of the 404 which is not
relevant, we now just verify that the error code associated with the
request matches the HTTP response. This should make the test more
resilient to future text changes in the underlying Django function
`get_object_or_404`
When linking a DRF serializer with a model, you need to link it to the
model class not an instance of the model.
The newer version of DRF tries to access the model_manager from the
model here and runs into issues if it's not defined correctly.
Previously we were doing the following query:
SELECT 1 AS "a" FROM "user_api_userpreference" WHERE ("user_api_userpreference"."key" = 'pref-lang' AND "user_api_userpreference"."user_id" = 1 AND NOT ("user_api_userpreference"."id" = 1)) LIMIT 1
Looking at the middleware, I don't see why this was previously
happening.
It's only used by botocore and requests in the actual retirement code
and those have been able to handle a newer version of the library for
quite some time.
urllib3 is directly used in the testing code but not in a way where we
need to constrain it from being upgraded.
Introduces temporary rollout toggle ENABLE_SAML_CONFIG_SIGNAL_HANDLERS
which controls whether SAML configuration signal handlers are active.
When enabled (True), signal handlers will automatically update SAMLProviderConfig
references when the associated SAMLConfiguration is updated.
When disabled (False), SAMLProviderConfigs point to outdated SAMLConfiguration.
Warning: Disabling this toggle may result in SAMLProviderConfig instances
pointing to outdated SAMLConfiguration records.
Use the management command 'saml --fix-references' to fix outdated references.
Add ResourceTemplates to XBLOCK_MIXINS so it’s applied to all CMS XBlocks at
runtime instead of being directly inherited. This keeps the Studio-only feature
in edx-platform (where it belongs), while still making it available to built-in
and extracted XBlocks.
When we extract built-in blocks from the platform, they will not be able to
inherit ResourcesTemplates directly; they will get it from XBLOCK_MIXINS. So,
we also needed to update a few template-related tests to use the mixed block
class (or an instance of it) rather than the unmixed base class, because the
unmixed base classes will soon be extracted and thus lack ResourceTemplates.
Related to https://github.com/openedx/edx-platform/issues/34827
fix: Added response received from XAPI in logs to debug the XAPI transmission issues.
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
Co-authored-by: zamanafzal <11922730+zamanafzal@users.noreply.github.com>
Co-authored-by: Zaman Afzal <zamanafzal@gmail.com>
Bump edx-enterprise to 6.2.16 for requirements upgrade.
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
Co-authored-by: brobro10000 <82611798+brobro10000@users.noreply.github.com>