We aren't ready to use XBlock.load_class, there are duplicate entry point names, and simply choosing the first one leads to unpredictability.

This commit is contained in:
Ned Batchelder
2013-10-01 13:53:59 -04:00
parent cdb80bb8ed
commit 0bb11335b2

View File

@@ -17,7 +17,7 @@ from xmodule.error_module import ErrorDescriptor
from xmodule.errortracker import make_error_tracker, exc_info_to_str
from xmodule.course_module import CourseDescriptor
from xmodule.mako_module import MakoDescriptorSystem
from xmodule.x_module import XMLParsingSystem
from xmodule.x_module import XMLParsingSystem, XModuleDescriptor
from xmodule.html_module import HtmlDescriptor
from xblock.core import XBlock
@@ -238,7 +238,7 @@ def create_block_from_xml(xml_data, system, org=None, course=None, default_class
"""
node = etree.fromstring(xml_data)
raw_class = XBlock.load_class(node.tag, default_class)
raw_class = XModuleDescriptor.load_class(node.tag, default_class)
xblock_class = system.mixologist.mix(raw_class)
# leave next line commented out - useful for low-level debugging