Commit 7ce623d
fix: support AnnotatableBlock in the new content runtime (#268)
While extracting the Annotatable block from openedx-platform, we parted
ways with RawMixin, which contains the parse_xml_new_runtime method. That
method is still required by the extracted annotatable block to make it
compatible with the new content runtime, and it was missed during
extraction. So this change copies the method from RawMixin into the
extracted AnnotatableBlock.
Without this, loading an annotatable block in a Content Library crashed
with "XML Serialization is only supported with OpenedXContentRuntime",
because the base XBlock.parse_xml treats annotatable's nested OLX
(<instructions>, <p>, <annotation>) as child blocks and calls
runtime.add_node_as_child(), which the new runtime does not implement.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 892fb93 commit 7ce623d
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
249 | 271 | | |
250 | 272 | | |
251 | 273 | | |
| |||
0 commit comments