The goal of this project is to provide a common interface for creating scorable XBlocks. The idea is to clearly specify what a (potentially third-party) block type needs to implement in order to work properly with the grading service. Additionally, we would like to create a shared implementation for common behaviors. Rescoring problems and resetting attempts are two particular instructor management tasks we would like to create a common implementation for.
Phase 1: ScorableXBlockMixin and SXBM.rescore_problem()
Create a ScorableXBlockMixin that implements rescore_problem(), providing hook methods for specific block types to marshall and unmarshall their scoring data to and from a common format (dict or namedtuple, perhaps).
Blocks should be able to opt-out of rescorability, either as a whole or depending on configuration. (Survey-type questions, for instance)
only_if_higher functionality needs to be preserved.
Implement mixin and hooks for specific block types. (Start with D&D and ORA)
Refactor CapaBase to use the mixin. (Optional)
Document process for 3rd party xblocks to take advantage of this implementation.
Phase 2: SXBM.reset_attempts()
Create shared reset_attempts() method, ensuring that necessary.
Include any additional hooks in specific block types that want to implement reset_attempts.
Refactor CapaBase to marshall the data needed for reset_attempts
Phase 3: Rescore container blocks
Implement a rescore task that traverses down from a container block to contained problem blocks