Skip to content

Conversation

@irtazaakram
Copy link
Member

@irtazaakram irtazaakram commented Aug 12, 2025

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.

Related to #34827

Copy link
Member

@kdmccormick kdmccormick left a 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

@kdmccormick kdmccormick merged commit 472801b into master Aug 12, 2025
49 checks passed
@kdmccormick kdmccormick deleted the extracted-xblock-resourcetemplate branch August 12, 2025 13:04
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

awais786 pushed a commit that referenced this pull request Aug 13, 2025
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
awais786 pushed a commit that referenced this pull request Sep 8, 2025
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
salman2013 pushed a commit to salman2013/edx-platform that referenced this pull request Sep 10, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants