An @contextmanager will raise an exception from its yield statement if
an exception happens in the with-block that uses it. If the context
manager needs to do clean up, it should do it even if an exception is
raised, so it needs to be done in a finally clause.
Original Commit Messages:
use edx's own get_parent method, rather than our own.
add field to unique constraint to avoid MultipleObjectsReturned in case of multiple browser clicks on submit
fix 0011 migration, inherit from TimeStampedField and add composite index (migration only)
fix bug where adding an already registered user to a ccx would cause a crash due to an undefined variable
add assertNumQueries tests to test modules where override field providers are used
remove unnecessary teardown
implement recommended style for checking empty list
import utility methods rather than use duplicate code
added comment explaining date conversion to string for json
add logging for invalid users or emails when enrolling students
add comment about xmodule user state
avoid using get_or_create, which seems to be causing a race condition on schedule change save
relocate badly placed edvent handlers to fix multiple submit problem
Use client's session to set POC for test, now that we have the capability to do that.
Use a middleware to set the current POC one time per request, and avoid having to look up the stack for the current request in 'get_current_poc'.
Fetch all overrides for a block at one time.
Speed up the lineage computation by doing some caching.
Unused import.
Get field overrides once per user per block.
Streamline configuration.
Fix poc config tuples
individual students, and a reimplementation of the individual due date
feature.
This work introduces an architecture, used with the 'authored_data'
portion of LmsFieldData, which allows arbitrary field overrides to be
made for fields that are part of the course content or settings (Mongo
data). The basic architecture is extensible by means of writing and
configuring arbitrary field override providers.
One concrete implementation of a field override provider is provided
which allows for overrides to be for individual students. This provider
is then used as a basis for reimplementing the individual due date
extensions feature as a proof of concept for the design.
One can imagine writing override providers that provide overrides based
on a student's membership in a cohort or other similar idea. This work
is being done, in fact, to pave the way for the Personal Online Courses
feature being developed by MIT, which will use an override provider very
much long those lines.