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
"""
class CourseDescriptor(CourseFields, LicenseMixin, SequenceDescriptor):
class CourseDescriptor(CourseFields, SequenceDescriptor, LicenseMixin):
"""
The descriptor for the course XModule
"""
......
......@@ -60,7 +60,7 @@ DEFAULT_CLASS = 'xmodule.raw_module.RawDescriptor'
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
"""
......
......@@ -101,7 +101,7 @@ def render_to_template_mock(*args):
pass
class StubXBlock(XBlock, XModuleMixin, InheritanceMixin):
class StubXBlock(XModuleMixin, InheritanceMixin):
"""
Stub XBlock used for testing.
"""
......
......@@ -86,7 +86,7 @@ log = logging.getLogger(__name__)
_ = lambda text: text
class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers, XModule):
class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers, XModule, LicenseMixin):
"""
XML source example:
<video show_captions="true"
......@@ -332,7 +332,7 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers,
@XBlock.wants("request_cache")
@XBlock.wants("settings")
class VideoDescriptor(VideoFields, VideoTranscriptsMixin, VideoStudioViewHandlers,
TabsEditingDescriptor, EmptyDataRawDescriptor):
TabsEditingDescriptor, EmptyDataRawDescriptor, LicenseMixin):
"""
Descriptor for `VideoModule`.
"""
......
......@@ -12,7 +12,7 @@ from xmodule.mixin import LicenseMixin
_ = lambda text: text
class VideoFields(LicenseMixin):
class VideoFields(object):
"""Fields for `VideoModule` and `VideoDescriptor`."""
display_name = String(
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
from xblock.core import XBlock, XBlockAside
from xblock.fields import (
Scope, Integer, Float, List, XBlockMixin,
Scope, Integer, Float, List,
String, Dict, ScopeIds, Reference, ReferenceList,
ReferenceValueDict, UserScope
)
......@@ -265,7 +265,7 @@ class XModuleFields(object):
)
class XModuleMixin(XModuleFields, XBlockMixin):
class XModuleMixin(XModuleFields, XBlock):
"""
Fields and methods used by XModules internally.
......@@ -742,7 +742,7 @@ module_runtime_attr = partial(ProxyAttribute, 'xmodule_runtime') # pylint: disa
@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.
Subclasses must at a minimum provide a definition for get_html in order
......@@ -949,7 +949,7 @@ class ResourceTemplates(object):
@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
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
-e git+https://github.com/jazkarta/ccx-keys.git@e6b03704b1bb97c1d2f31301ecb4e3a687c536ea#egg=ccx-keys
# 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/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
......
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