You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove legacy XModule mixins from xblocks-contrib XBlocks #197
@irtazaakram will start work on this epic for Problem XBlock and do the required changes on both xblocks-contrb/Problem Block and openedx-platform . Once it's done we will do the required work for the other blocks as well.
In openedx-platform we are possibly going to attach XModuleMixin for the ContentLibrary runtime as well.
@farhan , thanks for finding this and reverting quickly in order to keep the bug out of Verawood. I looked into this a little bit, here's what I found:
File "/mnt/xblocks-contrib/xblocks_contrib/video/video.py", line 1219, in editable_metadata_fields
editable_fields = super().editable_metadata_fields # pylint: disable=no-member
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'super' object has no attribute 'editable_metadata_fields'
VideoBlock has a property called editable_metadata_fields which is uses to compute the list of fields which should display for editing in Studio, used both in courses and in libraries. It calls super().editable_metadata_fields first, but since we removed XModuleMixin, there is no longer any base class implementation of this method.
I think the things we need to do are:
Remove the super().editable_metadata_fields call from VideoBlock.editable_metadata_fields
Ensure VideoBlock.editable_metadata_fields still works without that super call. It might need new code added to the method now that its base implementation is gone.
Add a unit test so that VideoBlock.editable_metadata_fields is covered--it must not be covered now if we didn't see this error on the PR.
VideoBlock has a property called editable_metadata_fields which is uses to compute the list of fields which should display for editing in Studio, used both in courses and in libraries. It calls super().editable_metadata_fields first, but since we removed XModuleMixin, there is no longer any base class implementation of this method.
That's correct,
For lms/studio, it will work fine as platform attach XModuleMixin at run time.
For content-library, it will not work as we are not attaching XModuleMixin.
Remove the super().editable_metadata_fields call from VideoBlock.editable_metadata_fields
Ensure VideoBlock.editable_metadata_fields still works without that super call. It might need new code added to the method now that its base implementation is gone.
Already done as references shared above. Code is well tested and has been shipped to verawood release.
Add a unit test so that VideoBlock.editable_metadata_fields is covered--it must not be covered now if we didn't see this error on the PR.
Good suggestion, I have created Vibe code generated WIP PR for it, will continue work on it. #248
Activity
XModuleMixinfor thexblocks-contribxblocks #223farhan commentedon Apr 1, 2026
As per discussion,
@irtazaakram will start work on this epic for Problem XBlock and do the required changes on both
xblocks-contrb/Problem Blockandopenedx-platform. Once it's done we will do the required work for the other blocks as well.In
openedx-platformwe are possibly going to attachXModuleMixinfor the ContentLibrary runtime as well.kdmccormick commentedon May 4, 2026
Reverted due to #243
Reopening this so that we remember to fix and re-merge.
kdmccormick commentedon May 4, 2026
@farhan , thanks for finding this and reverting quickly in order to keep the bug out of Verawood. I looked into this a little bit, here's what I found:
From #243 :
VideoBlock has a property called
editable_metadata_fieldswhich is uses to compute the list of fields which should display for editing in Studio, used both in courses and in libraries. It callssuper().editable_metadata_fieldsfirst, but since we removed XModuleMixin, there is no longer any base class implementation of this method.I think the things we need to do are:
super().editable_metadata_fieldscall fromVideoBlock.editable_metadata_fieldsVideoBlock.editable_metadata_fieldsstill works without that super call. It might need new code added to the method now that its base implementation is gone.VideoBlock.editable_metadata_fieldsis covered--it must not be covered now if we didn't see this error on the PR.farhan commentedon May 13, 2026
@kdmccormick Thanks for looking into it.
That's correct,
XModuleMixinat run time.XModuleMixin.Already done as references shared above. Code is well tested and has been shipped to verawood release.
Good suggestion, I have created Vibe code generated WIP PR for it, will continue work on it.
#248
farhan commentedon May 26, 2026
Tests cases PR has been merged, closing the story
#248