Fixed the edX middleware to lazily create request
context for Mako templates, so that it is based on
any changes made to the request object.
Verified that with this fix the "Instructor" tab is
correctly hidden when a staff member is viewing
the course as a student.
Lots of plumbing to allow an asset named python_lib.zip to be imported
by jailed Python code.
This function can find the "python_lib.zip" asset, and is passed down
through ModuleSystem and LoncapaSystem so that capa problems have access
to the zipfile.
LTI grade callbacks for example, come in with an anonymous user. This causes a
stack trace in the psychometrics app that leads to the LTI service
getting a 404. This adds a check before that callback gets registered.
This commit updates lms/djangoapps/courseware.
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]
XBlocks can and should use the "publish" method provided by the runtime to emit analytical events. In theory we could now start replacing calls to track_function with calls to publish, however, that migration is not handled by this change.
Fixes: AN-789
This information will likely be used frequently for analytics purposes, so we would like to denormalize here to avoid having to join with the modulestore later.
Fixes: AN-594
To get all dates localized, we need all runtimes to have the i18n
service, and since runtimes are made by the modulestores, we need to
pass it to them.
Soon (fingers crossed), modulestores won't be involved in making
runtimes, and many of these changes will go away.
This requires fixing the javascript api implementation, and adding
an implementation of get_block to the ModuleSystem api.
However, the implementation is incomplete, due to mismatches between
the expectations of XModule and XBlock.
Also adds tests using the Acid block to make sure that the javascript
and python apis for children are working correctly.