Current Transformers
Transformer | Description | JIRA | "Collect" phase (given entire course block structure) | "Transform" phase (given a sub block tree) | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Visibility | Restrict access to blocks that are visible to staff only |
| Percolate .visible_to_staff_only down the hierarchy, while honoring MultiParentAccessRule | If user isn't staff, remove all blocks that only staff can see. | ||||||||
Start Date | Restrict access to blocks based on start date and, if relevant, beta testing period |
| Percolate .start and beta_user_start (computed from .days_early_for_beta) as separate fields down the hierarchy, taking the minimum of each along the way. | If user isn't staff, remove blocks that user can't see based on start or beta_user_start depending on the user's role. | ||||||||
User Partitions | Restrict access to blocks based on group affiliation |
| Percolate group intersection logic down the tree using the group_access xBlock field - a more performant reimplementation of merged_group_access. | If user isn't staff, remove blocks that user can't see based on group membership requirements | ||||||||||
Split Test | Only one of a Split Test Module's children is accessible to the user, as specified by the user_partition_id and group_id_to_child configuration settings. |
| cache fields: group_id_to_child and user_partition_id ? Further investigation of the code is required to see whether we can percolate the fields down the hierarchy. | If percolated in the collect phase, remove blocks whose associated group_id is not accessible by the user. If not percolated, traverse the block tree and remove subtrees whose root is not accessible by the user. | ||||||||
Randomize | Only one of a Randomize Module's children is accessible to the user, stored as a child index in the block's user_state scope. |
| required fields: block's type | For each Randomize block encountered in the block tree, get/set the "choice" field value for the user and remove all other children of the block. | ||||||||
Library Content | Only a subset of a Library Content Module's children is accessible to the user, stored as a list of block ids and block types in the block's user_state scope. |
| required fields: block's type | For each Library Content module encountered in the block tree, get/set the "selected" field value for the user and remove the subset of children that are not selected for the user. | ||||||||
Course Blocks API | Feature-specific transformer that collects information for the endpoint and transforms the block tree with additionally required data for each block. |
| required fields: graded, format, display_name, type cache fields: student_view_multi_device, student_view_data, olx_data (P2) | block_counts, lms_web_url, student_view_url |
Future Transformers
The following transformers will be implemented in the future, when needed by the platform:
...