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]
Adds a feature to the edX platform which allows instructors to set
individual due dates for students on particular coursework. This code is
meant primarily for on-campus use--it is not intended that this feature
would be used for MOOCs. It adds a new tab, "Extensions", to the beta
instructor dashboard which allows changing due dates per student. This
feature is enabled by setting FEATURES['INDIVIDUAL_DUE_DATES'] = True.
Fixes [BLD-456] and [LMS-1392], but making sure that we're always asking
XModules about their course_id (since the ModuleSystem has access to
that data).
By transparently proxying between the XModuleDescriptor and the XModule,
and between their runtimes, we can make them act as a single class, so
that we can swap in an actual XBlock instead.
Squashed commits to facilitate cherry-picking. Committers and
original commit messages are:
- ==> @caesar2164, * ==> @jrbl, ~ ==> @jbau
- Added boolean to OE problem CMS settings to turn on ICE track changes
- Added ICE init and tracking start/stop to HTML
- Conditional in Peer Grading HTML for ICE container
- CSS styling for ICE container and insertion/deletion elements
- Added class to track changes HTML
- Added ice.min.js as well as included it in the js requirements for peer grading
- Use track_changes in peer_grading_problem
* Refactor peer_grading_problem to lookup track_changes variable by problem location.
* Whitelist ICE insert, delete tags
* Adds ICE multi-user-editor insert and delete tags to the peer grading sanitize_html whitelist.
- add reset button
* Introduction ICE means we need its inline tags to get passed through
to the feedback target, but we don't want malicious peer feedback
providers introducing <script>, etc, so we use lxml.html.clean to
scrub peer grading input.
* Adds feedback URL autoheating.
* Allows ICE <insert> and <delete> tags but not others.
~ add helptext re: EXPERIMENTAL FEATURES
~ address a bunch of @VikParuchuri review comments on ICE for OEE
~ remove extraneous code
~ change to new xmodule accessors
~ refactor filtering
~ fix broken test test_peer_grading_problem
~ Create track_changes.coffee and remove <script> from
peer_grading_problem.html
~ Remove all reliance on id in favor of local scoping and classes
~ bring up test coverage somewhat
~ remove superflous $.scrollTo
~ TODO: Filtering
As documented in Jira LMS-806:
Steps to reproduce:
* as one user, for a peer evaluated problem, enter something that needs
peer grading
* as another user, log in and fire up the peer grading panel. You should
see something that needs attention, a yellow exclamation badge
* clicking on the "do grading" panel will fail with a 500, stacktrace
attached.
* it's possible that the question where this is being done must first have
professor calibration done in order for peers to be able to actually get
work to grade.
Don Mitchell debugged this with me and saw some problems in the ways
that the peer_evaluation xmodule code was accessing dates. Instead of
using the normal lms accessors, by going straight into the _module_data
it would be bypassing some important code (caching?). Fixing this to be
more standard did the trick.
Instead, we use XModule field default values when creating an empty
XModule. Driven by this use case, we also allow for XModules to be
created in memory without being persisted to the database at all. This
necessitates a change to the Modulestore api, replacing clone_item with
create_draft and save_xmodule.