Ejemplo n.º 1
0
 def _create_block_record_list(self, blocks, user_id=None):
     """
     Creates and returns a BlockRecordList for the given blocks.
     """
     block_record_list = BlockRecordList.from_list(blocks, self.course_key)
     return VisibleBlocks.cached_get_or_create(user_id or self.user_id,
                                               block_record_list)
Ejemplo n.º 2
0
def prefetch_grade_overrides_and_visible_blocks(user, course_key):
    _PersistentSubsectionGradeOverride.prefetch(user.id, course_key)
    _VisibleBlocks.bulk_read(user.id, course_key)
Ejemplo n.º 3
0
 def _create_block_record_list(self, blocks, user_id=None):
     """
     Creates and returns a BlockRecordList for the given blocks.
     """
     block_record_list = BlockRecordList.from_list(blocks, self.course_key)
     return VisibleBlocks.cached_get_or_create(user_id or self.user_id, block_record_list)
Ejemplo n.º 4
0
 def _create_block_record_list(self, blocks):
     """
     Creates and returns a BlockRecordList for the given blocks.
     """
     return VisibleBlocks.cached_get_or_create(
         BlockRecordList.from_list(blocks, self.course_key))
Ejemplo n.º 5
0
 def _create_block_record_list(self, blocks):
     """
     Creates and returns a BlockRecordList for the given blocks.
     """
     return VisibleBlocks.cached_get_or_create(BlockRecordList.from_list(blocks, self.course_key))