|
75 | 75 | from path import Path as path |
76 | 76 | from xblock.core import XBlock |
77 | 77 | from xblock.fields import Reference, ReferenceList, ReferenceValueDict, Scope |
| 78 | +from xblock.runtime import Mixologist |
| 79 | + |
| 80 | +from openedx.core.djangoapps.xblock.utils import filter_mixins_for_standard_xblocks |
78 | 81 |
|
79 | 82 | from xmodule.assetstore import AssetMetadata |
80 | 83 | from xmodule.course_block import CourseSummary |
@@ -2925,7 +2928,8 @@ def robust_usage_key(block_key): |
2925 | 2928 | except KeyError: |
2926 | 2929 | return course_key.make_usage_key('unknown', block_key.id) |
2927 | 2930 |
|
2928 | | - xblock_class = self.mixologist.mix(xblock_class) |
| 2931 | + mixins = filter_mixins_for_standard_xblocks(xblock_class, mixologist=self.mixologist) |
| 2932 | + xblock_class = Mixologist(mixins).mix(xblock_class) |
2929 | 2933 | # Make a shallow copy, so that we aren't manipulating a cached field dictionary |
2930 | 2934 | output_fields = dict(jsonfields) |
2931 | 2935 | for field_name, value in output_fields.items(): |
@@ -3030,7 +3034,8 @@ def _serialize_fields(self, category, fields): |
3030 | 3034 | """ |
3031 | 3035 | assert isinstance(fields, dict) |
3032 | 3036 | xblock_class = XBlock.load_class(category, self.default_class) |
3033 | | - xblock_class = self.mixologist.mix(xblock_class) |
| 3037 | + mixins = filter_mixins_for_standard_xblocks(xblock_class, mixologist=self.mixologist) |
| 3038 | + xblock_class = Mixologist(mixins).mix(xblock_class) |
3034 | 3039 |
|
3035 | 3040 | def reference_block_id(reference): |
3036 | 3041 | """ |
|
0 commit comments