Merge pull request #908 from cpennington/reference-runtime
Replace references to .system
This commit is contained in:
@@ -107,7 +107,7 @@ def preview_module_system(request, preview_id, descriptor):
|
|||||||
ajax_url=reverse('preview_dispatch', args=[preview_id, descriptor.location.url(), '']).rstrip('/'),
|
ajax_url=reverse('preview_dispatch', args=[preview_id, descriptor.location.url(), '']).rstrip('/'),
|
||||||
# TODO (cpennington): Do we want to track how instructors are using the preview problems?
|
# TODO (cpennington): Do we want to track how instructors are using the preview problems?
|
||||||
track_function=lambda event_type, event: None,
|
track_function=lambda event_type, event: None,
|
||||||
filestore=descriptor.system.resources_fs,
|
filestore=descriptor.runtime.resources_fs,
|
||||||
get_module=partial(load_preview_module, request, preview_id),
|
get_module=partial(load_preview_module, request, preview_id),
|
||||||
render_template=render_from_lms,
|
render_template=render_from_lms,
|
||||||
debug=True,
|
debug=True,
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ class ErrorDescriptor(ErrorFields, XModuleDescriptor):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def from_descriptor(cls, descriptor, error_msg='Error not available'):
|
def from_descriptor(cls, descriptor, error_msg='Error not available'):
|
||||||
return cls._construct(
|
return cls._construct(
|
||||||
descriptor.system,
|
descriptor.runtime,
|
||||||
str(descriptor),
|
str(descriptor),
|
||||||
error_msg,
|
error_msg,
|
||||||
location=descriptor.location,
|
location=descriptor.location,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class TestErrorModule(unittest.TestCase, SetupTestErrorModules):
|
|||||||
|
|
||||||
def test_error_module_from_descriptor(self):
|
def test_error_module_from_descriptor(self):
|
||||||
descriptor = MagicMock([XModuleDescriptor],
|
descriptor = MagicMock([XModuleDescriptor],
|
||||||
system=self.system,
|
runtime=self.system,
|
||||||
location=self.location,
|
location=self.location,
|
||||||
_field_data=self.valid_xml)
|
_field_data=self.valid_xml)
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ class TestNonStaffErrorModule(unittest.TestCase, SetupTestErrorModules):
|
|||||||
|
|
||||||
def test_error_module_from_descriptor(self):
|
def test_error_module_from_descriptor(self):
|
||||||
descriptor = MagicMock([XModuleDescriptor],
|
descriptor = MagicMock([XModuleDescriptor],
|
||||||
system=self.system,
|
runtime=self.system,
|
||||||
location=self.location,
|
location=self.location,
|
||||||
_field_data=self.valid_xml)
|
_field_data=self.valid_xml)
|
||||||
|
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ def get_module_for_descriptor_internal(user, descriptor, field_data_cache, cours
|
|||||||
ajax_url=ajax_url,
|
ajax_url=ajax_url,
|
||||||
xqueue=xqueue,
|
xqueue=xqueue,
|
||||||
# TODO (cpennington): Figure out how to share info between systems
|
# TODO (cpennington): Figure out how to share info between systems
|
||||||
filestore=descriptor.system.resources_fs,
|
filestore=descriptor.runtime.resources_fs,
|
||||||
get_module=inner_get_module,
|
get_module=inner_get_module,
|
||||||
user=user,
|
user=user,
|
||||||
debug=settings.DEBUG,
|
debug=settings.DEBUG,
|
||||||
|
|||||||
Reference in New Issue
Block a user