Block Transformers: distinguish between READ and WRITE versions

TNL-6522
This commit is contained in:
Nimisha Asthagiri
2017-02-11 11:47:51 -05:00
parent 85ff8a62a2
commit 71cce9bb73
25 changed files with 155 additions and 71 deletions

View File

@@ -8,7 +8,8 @@ class BlockCountsTransformer(BlockStructureTransformer):
"""
Keep a count of descendant blocks of the requested types
"""
VERSION = 1
WRITE_VERSION = 1
READ_VERSION = 1
BLOCK_COUNTS = 'block_counts'
def __init__(self, block_types_to_count):

View File

@@ -9,7 +9,8 @@ class BlockDepthTransformer(BlockStructureTransformer):
Keep track of the depth of each block within the block structure. In case
of multiple paths to a given node (in a DAG), use the shallowest depth.
"""
VERSION = 1
WRITE_VERSION = 1
READ_VERSION = 1
BLOCK_DEPTH = 'block_depth'
def __init__(self, requested_depth=None):

View File

@@ -22,7 +22,8 @@ class BlocksAPITransformer(BlockStructureTransformer):
Note: BlockDepthTransformer must be executed before BlockNavigationTransformer.
"""
VERSION = 1
WRITE_VERSION = 1
READ_VERSION = 1
STUDENT_VIEW_DATA = 'student_view_data'
STUDENT_VIEW_MULTI_DEVICE = 'student_view_multi_device'

View File

@@ -13,7 +13,8 @@ class MilestonesTransformer(FilteringTransformerMixin, BlockStructureTransformer
Excludes all special exams (timed, proctored, practice proctored) from the student view.
Excludes all blocks with unfulfilled milestones from the student view.
"""
VERSION = 1
WRITE_VERSION = 1
READ_VERSION = 1
@classmethod
def name(cls):

View File

@@ -20,7 +20,8 @@ class BlockNavigationTransformer(BlockStructureTransformer):
Prerequisites: BlockDepthTransformer must be run before this in the
transform phase.
"""
VERSION = 1
WRITE_VERSION = 1
READ_VERSION = 1
BLOCK_NAVIGATION = 'block_nav'
BLOCK_NAVIGATION_FOR_CHILDREN = 'children_block_nav'

View File

@@ -8,7 +8,8 @@ class StudentViewTransformer(BlockStructureTransformer):
"""
Only show information that is appropriate for a learner
"""
VERSION = 1
WRITE_VERSION = 1
READ_VERSION = 1
STUDENT_VIEW_DATA = 'student_view_data'
STUDENT_VIEW_MULTI_DEVICE = 'student_view_multi_device'