If an error occurs while rendering an xmodule, the LMS chokes with the
following error if accessed by a non admin user.
In the admin user case the existing line that registers ErrorDescriptor
ensures that everything works. But for the non admin case we need this
additional directive.
Traceback (most recent call last):
File "/openedx/edx-platform/lms/djangoapps/courseware/views/index.py", line 153, in get
return self.render(request)
File "/openedx/edx-platform/lms/djangoapps/courseware/views/index.py", line 217, in render
return render_to_response('courseware/courseware.html', self._create_courseware_context(request))
File "/openedx/edx-platform/lms/djangoapps/courseware/views/index.py", line 468, in _create_courseware_context
courseware_context['fragment'] = self.section.render(self.view, section_context)
File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
return self.runtime.render(self, view, context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
return self.__getattr__('render')(block, view_name, context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
return super(MetricsMixin, self).render(block, view_name, context=context)
File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 831, in render
frag = view_fn(context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 262, in student_view
return self._student_or_public_view(context, prereq_met, prereq_meta_info, banner_text)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 343, in _student_or_public_view
items = self._render_student_view_for_items(context, display_items, fragment, view) if prereq_met else []
File "/openedx/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 485, in _render_student_view_for_items
rendered_item = item.render(view, context)
File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
return self.runtime.render(self, view, context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
return self.__getattr__('render')(block, view_name, context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
return super(MetricsMixin, self).render(block, view_name, context=context)
File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 831, in render
frag = view_fn(context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 118, in student_view
return self._student_or_public_view(context, STUDENT_VIEW)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 85, in _student_or_public_view
rendered_child = child.render(view, child_block_context)
File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
return self.runtime.render(self, view, context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
return self.__getattr__('render')(block, view_name, context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
return super(MetricsMixin, self).render(block, view_name, context=context)
File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 831, in render
frag = view_fn(context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/library_content_module.py", line 314, in student_view
rendered_child = displayable.render(STUDENT_VIEW, child_context)
File "/usr/local/lib/python2.7/site-packages/xblock/core.py", line 202, in render
return self.runtime.render(self, view, context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1914, in render
return self.__getattr__('render')(block, view_name, context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1335, in render
return super(MetricsMixin, self).render(block, view_name, context=context)
File "/usr/local/lib/python2.7/site-packages/xblock/runtime.py", line 835, in render
updated_frag = self.wrap_xblock(block, view_name, frag, context)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1287, in wrap_xblock
frag = wrapper(block, view, frag, context)
File "/openedx/edx-platform/openedx/core/lib/xblock_utils/__init__.py", line 155, in wrap_xblock
add_webpack_to_fragment(frag, class_name)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/util/xmodule_django.py", line 28, in add_webpack_to_fragment
for chunk in webpack_loader.utils.get_files(bundle_name, extension, config):
File "/usr/local/lib/python2.7/site-packages/webpack_loader/utils.py", line 31, in get_files
return list(_get_bundle(bundle_name, extension, config))
File "/usr/local/lib/python2.7/site-packages/webpack_loader/utils.py", line 23, in _get_bundle
bundle = get_loader(config).get_bundle(bundle_name)
File "/usr/local/lib/python2.7/site-packages/webpack_loader/loader.py", line 83, in get_bundle
raise WebpackBundleLookupError('Cannot resolve bundle {0}.'.format(bundle_name))
WebpackBundleLookupError: Cannot resolve bundle NonStaffErrorModule.
https://github.com/edx/edx-platform/pull/20645
This introduces:
* A new XBlock runtime that can read and write XBlocks that are persisted using
Blockstore instead of Modulestore. The new runtime is currently isolated so
that it can be tested without risk to the current courseware/runtime.
* Content Libraries v2, which store XBlocks in Blockstore not modulestore
* An API Client for Blockstore
* "Learning Context" plugin API. A learning context is a more abstract concept
than a course; it's a collection of XBlocks that serves some learning purpose.
Some deprecated functionality has been removed:
- Reading data field and transforms being applied in the init() method.
- The source field.
- The source_visible attribute.
* Minimum possible changes were made to merge CapaModule & CapaDescriptor into
one ProblemBlock class.
* There are no known changes in behavior.
* CapaModule and CapaDescriptor inherited from a number of classes which inherit
from XModule or XModuleDescriptor but did not depend on them. For all these
classes the methods were moved to mixins which did not inherit from either and
then these mixins were added to ProblemBlock in the order which maintains MRO.
There are other annotations features still in the platform but this one
is the one that works with an annotations server that was specialized
and not generally used by most instances of the platform.
The initial PR to remove this was made by 'lduarte1991' and can be found
here: https://github.com/edx/edx-platform/pull/17299
The work done based on the squashed commits:
removed advanced modules config for annotations
remove module files and config for annotations
remove js and css files related to annotations, under ova folders
removed js and css annotator file configs for cms and lms
remove template html files for annotations
removed annotations options from static html book
Added back some files that were originally marked "for OVA" but others used as per acceptance tests
Added back css file configs incorrectly marked as ova
Remove annotation related advanced settings from test.
Correct hls require.js pathing.
'distribute' is the ancestor of 'setuptools', and many packages require
setuptools to be installed.
Upgrade of MySQL-python from 1.2.4 to 1.2.5 is required because of an
incompatibility with setuptools>0.7.
This commit updates common/lib/xmodule.
These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).
For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.
Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>
[LMS-2370]