fix: Allow tests for Extracted & Builtin Annotatable XBlock (#36246)
Test Annotatable XBlock in both built-in and extracted modes to keep them in sync. Related to: https://github.com/openedx/edx-platform/issues/34841
This commit is contained in:
@@ -202,8 +202,17 @@ class _BuiltInAnnotatableBlock(
|
||||
return fragment
|
||||
|
||||
|
||||
AnnotatableBlock = (
|
||||
_ExtractedAnnotatableBlock if settings.USE_EXTRACTED_ANNOTATABLE_BLOCK
|
||||
else _BuiltInAnnotatableBlock
|
||||
)
|
||||
AnnotatableBlock = None
|
||||
|
||||
|
||||
def reset_class():
|
||||
"""Reset class as per django settings flag"""
|
||||
global AnnotatableBlock
|
||||
AnnotatableBlock = (
|
||||
_ExtractedAnnotatableBlock if settings.USE_EXTRACTED_ANNOTATABLE_BLOCK else _BuiltInAnnotatableBlock
|
||||
)
|
||||
return AnnotatableBlock
|
||||
|
||||
|
||||
reset_class()
|
||||
AnnotatableBlock.__name__ = "AnnotatableBlock"
|
||||
|
||||
Reference in New Issue
Block a user