-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix: Add ResourceTemplates to XBLOCK_MIXINS #37184
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
Conversation
kdmccormick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Your fix in create_xblock.py makes me realize that we should have a proper XBlock API method for loading the mixed block type. There are a couple other places in edx-platform that also use mixologist this way, too. I've opened a PR in xblock and will update edx-platform later: openedx/XBlock#854
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
|
2U Release Notice: This PR has been deployed to the edX production environment. |
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 #34827
author Ram Chandra Bhavirisetty <[email protected]> 1752086075 +0000 committer awais qureshi <[email protected]> 1757311425 +0500 parent 42afa1b author Ram Chandra Bhavirisetty <[email protected]> 1752086075 +0000 committer awais qureshi <[email protected]> 1757311409 +0500 parent 42afa1b author Ram Chandra Bhavirisetty <[email protected]> 1752086075 +0000 committer awais qureshi <[email protected]> 1757311371 +0500 chore: remove deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings chore: checking Django 5.2 fix: fix pylint quality warnings (#37187) fix: add resourcetemplate to xblock_mixins (#37184) 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 #34827 chore: Handle forbidden username exceptions on registration (#37185) chore: bump xblocks-contrib to 0.6.0 (#37196) fix: Fix signal test failures in Django 5.2. (#37193) fix: Fix signal test failures after Django 5.2. fix: Fix signal test failures after Django 5.2. fix: Fix signal test failures after Django 5.2. fix: Fix signal test failures after Django 5.2. chore: Update unit-tests.yml feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. chore: Delete cms/djangoapps/import_from_modulestore/data.py chore: Update test_db.py feat!: Upgrade to django5.2. chore: Update test_import.py
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 openedx#34827
Add
ResourceTemplatestoXBLOCK_MIXINSso 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.
Related to #34827