Commit a25f91da by Calen Pennington

Fix XBlock inheritance ordering. XBlockMixin and derivatives should always come…

Fix XBlock inheritance ordering. XBlockMixin and derivatives should always come after XBlock and derivatives
parent fdf81042
...@@ -919,7 +919,7 @@ class CourseModule(CourseFields, SequenceModule): # pylint: disable=abstract-me ...@@ -919,7 +919,7 @@ class CourseModule(CourseFields, SequenceModule): # pylint: disable=abstract-me
""" """
class CourseDescriptor(CourseFields, LicenseMixin, SequenceDescriptor): class CourseDescriptor(CourseFields, SequenceDescriptor, LicenseMixin):
""" """
The descriptor for the course XModule The descriptor for the course XModule
""" """
......
...@@ -60,7 +60,7 @@ DEFAULT_CLASS = 'xmodule.raw_module.RawDescriptor' ...@@ -60,7 +60,7 @@ DEFAULT_CLASS = 'xmodule.raw_module.RawDescriptor'
RENDER_TEMPLATE = lambda t_n, d, ctx=None, nsp='main': '' RENDER_TEMPLATE = lambda t_n, d, ctx=None, nsp='main': ''
class ReferenceTestXBlock(XBlock, XModuleMixin): class ReferenceTestXBlock(XModuleMixin):
""" """
Test xblock type to test the reference field types Test xblock type to test the reference field types
""" """
......
...@@ -101,7 +101,7 @@ def render_to_template_mock(*args): ...@@ -101,7 +101,7 @@ def render_to_template_mock(*args):
pass pass
class StubXBlock(XBlock, XModuleMixin, InheritanceMixin): class StubXBlock(XModuleMixin, InheritanceMixin):
""" """
Stub XBlock used for testing. Stub XBlock used for testing.
""" """
......
...@@ -86,7 +86,7 @@ log = logging.getLogger(__name__) ...@@ -86,7 +86,7 @@ log = logging.getLogger(__name__)
_ = lambda text: text _ = lambda text: text
class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers, XModule): class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers, XModule, LicenseMixin):
""" """
XML source example: XML source example:
<video show_captions="true" <video show_captions="true"
...@@ -332,7 +332,7 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers, ...@@ -332,7 +332,7 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers,
@XBlock.wants("request_cache") @XBlock.wants("request_cache")
@XBlock.wants("settings") @XBlock.wants("settings")
class VideoDescriptor(VideoFields, VideoTranscriptsMixin, VideoStudioViewHandlers, class VideoDescriptor(VideoFields, VideoTranscriptsMixin, VideoStudioViewHandlers,
TabsEditingDescriptor, EmptyDataRawDescriptor): TabsEditingDescriptor, EmptyDataRawDescriptor, LicenseMixin):
""" """
Descriptor for `VideoModule`. Descriptor for `VideoModule`.
""" """
......
...@@ -12,7 +12,7 @@ from xmodule.mixin import LicenseMixin ...@@ -12,7 +12,7 @@ from xmodule.mixin import LicenseMixin
_ = lambda text: text _ = lambda text: text
class VideoFields(LicenseMixin): class VideoFields(object):
"""Fields for `VideoModule` and `VideoDescriptor`.""" """Fields for `VideoModule` and `VideoDescriptor`."""
display_name = String( display_name = String(
help=_("The name students see. This name appears in the course ribbon and as a header for the video."), help=_("The name students see. This name appears in the course ribbon and as a header for the video."),
......
...@@ -20,7 +20,7 @@ from lazy import lazy ...@@ -20,7 +20,7 @@ from lazy import lazy
from xblock.core import XBlock, XBlockAside from xblock.core import XBlock, XBlockAside
from xblock.fields import ( from xblock.fields import (
Scope, Integer, Float, List, XBlockMixin, Scope, Integer, Float, List,
String, Dict, ScopeIds, Reference, ReferenceList, String, Dict, ScopeIds, Reference, ReferenceList,
ReferenceValueDict, UserScope ReferenceValueDict, UserScope
) )
...@@ -265,7 +265,7 @@ class XModuleFields(object): ...@@ -265,7 +265,7 @@ class XModuleFields(object):
) )
class XModuleMixin(XModuleFields, XBlockMixin): class XModuleMixin(XModuleFields, XBlock):
""" """
Fields and methods used by XModules internally. Fields and methods used by XModules internally.
...@@ -742,7 +742,7 @@ module_runtime_attr = partial(ProxyAttribute, 'xmodule_runtime') # pylint: disa ...@@ -742,7 +742,7 @@ module_runtime_attr = partial(ProxyAttribute, 'xmodule_runtime') # pylint: disa
@XBlock.needs("i18n") @XBlock.needs("i18n")
class XModule(XModuleMixin, HTMLSnippet, XBlock): # pylint: disable=abstract-method class XModule(HTMLSnippet, XModuleMixin): # pylint: disable=abstract-method
""" Implements a generic learning module. """ Implements a generic learning module.
Subclasses must at a minimum provide a definition for get_html in order Subclasses must at a minimum provide a definition for get_html in order
...@@ -949,7 +949,7 @@ class ResourceTemplates(object): ...@@ -949,7 +949,7 @@ class ResourceTemplates(object):
@XBlock.needs("i18n") @XBlock.needs("i18n")
class XModuleDescriptor(XModuleMixin, HTMLSnippet, ResourceTemplates, XBlock): class XModuleDescriptor(HTMLSnippet, ResourceTemplates, XModuleMixin):
""" """
An XModuleDescriptor is a specification for an element of a course. This An XModuleDescriptor is a specification for an element of a course. This
could be a problem, an organizational element (a group of content), or a could be a problem, an organizational element (a group of content), or a
......
...@@ -32,7 +32,7 @@ git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c ...@@ -32,7 +32,7 @@ git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c
-e git+https://github.com/jazkarta/ccx-keys.git@e6b03704b1bb97c1d2f31301ecb4e3a687c536ea#egg=ccx-keys -e git+https://github.com/jazkarta/ccx-keys.git@e6b03704b1bb97c1d2f31301ecb4e3a687c536ea#egg=ccx-keys
# Our libraries: # Our libraries:
-e git+https://github.com/cpennington/XBlock.git@64f6bdaf6c987cdea4798d8b1a1fa8e471c20a21#egg=XBlock -e git+https://github.com/edx/XBlock.git@74fdc5a361f48e5596acf3846ca3790a33a05253#egg=XBlock
-e git+https://github.com/edx/codejail.git@6b17c33a89bef0ac510926b1d7fea2748b73aadd#egg=codejail -e git+https://github.com/edx/codejail.git@6b17c33a89bef0ac510926b1d7fea2748b73aadd#egg=codejail
-e git+https://github.com/edx/js-test-tool.git@v0.1.6#egg=js_test_tool -e git+https://github.com/edx/js-test-tool.git@v0.1.6#egg=js_test_tool
-e git+https://github.com/edx/event-tracking.git@0.2.0#egg=event-tracking -e git+https://github.com/edx/event-tracking.git@0.2.0#egg=event-tracking
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment