feat: allow overriding unit icons (#21433)
This: 1. Introduces a new override using the `pluggable_override` decorator. It is now possible to specify a custom way of getting XBlock's icon by defining `GET_UNIT_ICON_IMPL` in settings. 2. Introduces a way to add custom `XBLOCK_MIXINS` by defining `XBLOCK_EXTRA_MIXINS` in settings. This allows, e.g. to add new fields to XBlocks.
This commit is contained in:
@@ -134,6 +134,9 @@ Here are the different integration points that python plugins can use:
|
||||
* - XBlock unit tests (``xblock.test.v0``)
|
||||
- Assess, Limited
|
||||
- XBlocks can also install test code that will then be run alongside the platform's usual python unit tests. It's unclear how well-supported this is at the moment.
|
||||
* - Pluggable override (``edx_django_utils.plugins.pluggable_override.pluggable_override``)
|
||||
- Trial, Stable
|
||||
- This decorator allows overriding any function or method by pointing to an alternative implementation in settings. Read the |pluggable_override docstring|_ to learn more.
|
||||
|
||||
.. _Application: https://docs.djangoproject.com/en/3.0/ref/applications/
|
||||
.. _Django app plugin documentation: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/plugins/README.rst
|
||||
@@ -146,6 +149,8 @@ Here are the different integration points that python plugins can use:
|
||||
.. _learning_context.py: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/xblock/learning_context/learning_context.py
|
||||
.. |UserPartition docstring| replace:: ``UserPartition`` docstring
|
||||
.. _UserPartition docstring: https://github.com/edx/edx-platform/blob/f8cc58618a39c9f7b8e9e1001eb2d7a10395797e/common/lib/xmodule/xmodule/partitions/partitions.py#L105-L120
|
||||
.. |pluggable_override docstring| replace:: ``pluggable_override`` docstring
|
||||
.. _pluggable_override docstring: https://github.com/edx/edx-django-utils/blob/master/edx_django_utils/plugins/pluggable_override.py
|
||||
|
||||
Platform Look & Feel
|
||||
====================
|
||||
|
||||
Reference in New Issue
Block a user