openedx.features.effort_estimation package#
Submodules#
openedx.features.effort_estimation.api module#
API entry point to the effort_estimation app.
openedx.features.effort_estimation.apps module#
Define the effort_estimation Django App.
openedx.features.effort_estimation.block_transformers module#
Effort Estimation Transformer implementation. Adds effort estimations for block types it recognizes.
- class openedx.features.effort_estimation.block_transformers.EffortEstimationTransformer#
Bases:
BlockStructureTransformerA transformer that adds effort estimation to the block tree.
There are two fields added by this transformer: - effort_activities: The number of “activities” at this block or lower. Note that verticals count as a single
activity at most. Activities are basically anything that isn’t text or video.
- effort_time: Our best guess at how long the block and lower will take, in seconds. We use an estimated reading
speed and video duration to calculate this. Just a rough guide.
If there is any missing data (like no video duration), we don’t provide any estimates at all for the course. We’d rather provide no estimate than a misleading estimate.
This transformer requires data gathered during the collection phase (from a course publish), so it won’t work on a course until the next publish.
- CACHE_VIDEO_DURATIONS = 'video.durations'#
- DEFAULT_WPM = 265#
- DISABLE_ESTIMATION = 'disable_estimation'#
- EFFORT_ACTIVITIES = 'effort_activities'#
- EFFORT_TIME = 'effort_time'#
- HTML_WORD_COUNT = 'html_word_count'#
- exception MissingEstimationData#
Bases:
Exception
- READ_VERSION = 1#
- VIDEO_CLIP_DURATION = 'video_clip_duration'#
- VIDEO_DURATION = 'video_duration'#
- WRITE_VERSION = 1#
- classmethod collect(block_structure)#
Grabs raw estimates for leaf content.
Pooling leaf estimates higher up the tree (e.g. in verticals, then sequentials, then chapters) is done by transform() below at run time, because which blocks each user sees can be different.
- classmethod name()#
Unique identifier for the transformer’s class. This must match the entry point name in the package configuration.
- transform(usage_info, block_structure)#
Transforms the given block_structure for the given usage_info, assuming the block_structure contains cached data from a prior call to the collect method of the latest version of the Transformer.
No access to the modulestore nor instantiation of xBlocks should be performed during the execution of this method. However, accesses to user-specific data (outside of the modulestore and not via xBlocks) is permitted in order to apply the transform for the given usage_info.
Note: The root of the given block_structure is not necessarily the same as the root of the block_structure passed to the prior collect method. The collect method is given the top-most root of the structure, while the transform method may be called upon any sub-structure or even a single block within the originally collected structure.
A Transformer may choose to remove entire sub-structures during the transform method and may do so using the remove_block and filter_with_removal methods.
Amongst the many methods available for a block_structure, the following methods are commonly used during transforms:
get_xblock_field get_transformer_data get_transformer_block_field remove_block_traversal filter_with_removal filter_topological_traversal topological_traversal post_order_traversal
- Parameters:
usage_info (any negotiated type) – that is passed to the block_structure and forwarded to all requested Transformers in order to apply a usage-specific transform. For example, an instance of usage_info would contain a user object for which the transform should be applied.
block_structure (BlockStructureBlockData) – block structure, with already collected data for the transformer, that is to be transformed in place.
openedx.features.effort_estimation.toggles module#
Feature toggles used for effort estimation.