From a1c0773c4de37bcc7f1bb72f401b30dd9a600d4c Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 28 Apr 2015 15:33:04 -0400 Subject: [PATCH] Move entry_point down into XModule/XModuleDescriptor so that 'xmodule.v1' only applies to XModules, not pure XBlocks with the XModuleMixin --- common/lib/xmodule/xmodule/x_module.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/x_module.py b/common/lib/xmodule/xmodule/x_module.py index 437000d8ad..cd30b56258 100644 --- a/common/lib/xmodule/xmodule/x_module.py +++ b/common/lib/xmodule/xmodule/x_module.py @@ -269,9 +269,6 @@ class XModuleMixin(XModuleFields, XBlockMixin): Adding this Mixin to an :class:`XBlock` allows it to cooperate with old-style :class:`XModules` """ - - entry_point = "xmodule.v1" - # Attributes for inspection of the descriptor # This indicates whether the xmodule is a problem-type. @@ -728,6 +725,8 @@ class XModule(XModuleMixin, HTMLSnippet, XBlock): # pylint: disable=abstract-me See the HTML module for a simple example. """ + entry_point = "xmodule.v1" + has_score = descriptor_attr('has_score') _field_data_cache = descriptor_attr('_field_data_cache') _field_data = descriptor_attr('_field_data') @@ -923,6 +922,9 @@ class XModuleDescriptor(XModuleMixin, HTMLSnippet, ResourceTemplates, XBlock): create a problem, and can generate XModules (which do know about student state). """ + + entry_point = "xmodule.v1" + module_class = XModule # VS[compat]. Backwards compatibility code that can go away after