Commit 744652d7 by Calen Pennington

Start of changes for xmodule debugger app

parent 48720497
...@@ -10,6 +10,8 @@ setup( ...@@ -10,6 +10,8 @@ setup(
}, },
requires=[ requires=[
'capa', 'capa',
# TODO: This isn't actually forcing an install, for some reason
'fs (>= 0.4.0)',
], ],
# See http://guide.python-distribute.org/creation.html#entry-points # See http://guide.python-distribute.org/creation.html#entry-points
...@@ -35,6 +37,9 @@ setup( ...@@ -35,6 +37,9 @@ setup(
"videodev = xmodule.backcompat_module:TranslateCustomTagDescriptor", "videodev = xmodule.backcompat_module:TranslateCustomTagDescriptor",
"videosequence = xmodule.seq_module:SequenceDescriptor", "videosequence = xmodule.seq_module:SequenceDescriptor",
"discussion = xmodule.discussion_module:DiscussionDescriptor", "discussion = xmodule.discussion_module:DiscussionDescriptor",
],
'xmodule.v2': [
'vertical = xmodule.vertical_module:VerticalModule',
] ]
} }
) )
from x_module import XModuleDescriptor, DescriptorSystem from .xmodule import XModuleDescriptor, DescriptorSystem
import logging import logging
......
...@@ -3,11 +3,11 @@ import logging ...@@ -3,11 +3,11 @@ import logging
from lxml import etree from lxml import etree
from xmodule.mako_module import MakoModuleDescriptor from .mako_module import MakoModuleDescriptor
from xmodule.xml_module import XmlDescriptor from .xml_module import XmlDescriptor
from xmodule.x_module import XModule from .xmodule import XModule
from xmodule.progress import Progress from .progress import Progress
from xmodule.exceptions import NotFoundError from .exceptions import NotFoundError
from pkg_resources import resource_string from pkg_resources import resource_string
log = logging.getLogger("mitx.common.lib.seq_module") log = logging.getLogger("mitx.common.lib.seq_module")
......
from xmodule.x_module import XModule from .xmodule import XModule
from xmodule.seq_module import SequenceDescriptor from .seq_module import SequenceDescriptor
from xmodule.progress import Progress from .progress import Progress
# HACK: This shouldn't be hard-coded to two types # HACK: This shouldn't be hard-coded to two types
# OBSOLETE: This obsoletes 'type' # OBSOLETE: This obsoletes 'type'
......
from xmodule.x_module import (XModuleDescriptor, policy_key) from .xmodule import (XModuleDescriptor, policy_key)
from xmodule.modulestore import Location from .modulestore import Location
from lxml import etree from lxml import etree
import json import json
import copy import copy
......
...@@ -9,10 +9,10 @@ from pprint import pprint ...@@ -9,10 +9,10 @@ from pprint import pprint
from collections import namedtuple from collections import namedtuple
from pkg_resources import resource_listdir, resource_string, resource_isdir from pkg_resources import resource_listdir, resource_string, resource_isdir
from xmodule.modulestore import Location from .modulestore import Location
from xmodule.timeparse import parse_time from .timeparse import parse_time
from xmodule.contentstore.content import StaticContent, XASSET_SRCREF_PREFIX from .contentstore.content import StaticContent, XASSET_SRCREF_PREFIX
log = logging.getLogger('mitx.' + __name__) log = logging.getLogger('mitx.' + __name__)
...@@ -133,7 +133,7 @@ class HTMLSnippet(object): ...@@ -133,7 +133,7 @@ class HTMLSnippet(object):
.format(self.__class__)) .format(self.__class__))
class XModule(HTMLSnippet): class XModule(Plugin, HTMLSnippet):
''' 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
...@@ -150,6 +150,8 @@ class XModule(HTMLSnippet): ...@@ -150,6 +150,8 @@ class XModule(HTMLSnippet):
# in the module # in the module
icon_class = 'other' icon_class = 'other'
entry_point = "xmodule.v2"
def __init__(self, system, location, definition, descriptor, def __init__(self, system, location, definition, descriptor,
instance_state=None, shared_state=None, **kwargs): instance_state=None, shared_state=None, **kwargs):
''' '''
......
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