List of Block Transformers

Current Transformers

TransformerDescriptionJIRA"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

MA-1027 - Getting issue details... STATUS

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


MA-1010 - Getting issue details... STATUS

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


MA-1012 - Getting issue details... STATUS
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 TestOnly 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.
MA-1015 - Getting issue details... STATUS

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.  

RandomizeOnly one of a Randomize Module's children is accessible to the user, stored as a child index in the block's user_state scope.
MA-1014 - Getting issue details... STATUS

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 ContentOnly 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.
MA-1016 - Getting issue details... STATUS
required fields: block's typeFor 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 APIFeature-specific transformer that collects information for the endpoint and transforms the block tree with additionally required data for each block.
MA-1013 - Getting issue details... STATUS

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:

  • Metadata inheritance of fields
  • Individual due date extensions
  • User Scope fields
  • Milestones, if they are ever used to restrict access to blocks (not just courses).