コード例 #1
0
ファイル: hidden_content.py プロジェクト: gopinath81/vmss
 def _is_block_hidden(self, block_structure, block_key):
     """
     Returns whether the block with the given block_key should
     be hidden, given the current time.
     """
     due = self._get_merged_due_date(block_structure, block_key)
     hide_after_due = self._get_merged_hide_after_due(block_structure, block_key)
     return not SequenceModule.verify_current_content_visibility(due, hide_after_due)
コード例 #2
0
 def _is_block_hidden(self, block_structure, block_key):
     """
     Returns whether the block with the given block_key should
     be hidden, given the current time.
     """
     hide_after_due = self._get_merged_hide_after_due(block_structure, block_key)
     self_paced = block_structure[block_structure.root_block_usage_key].self_paced
     if self_paced:
         hidden_date = block_structure[block_structure.root_block_usage_key].end
     else:
         hidden_date = self._get_merged_due_date(block_structure, block_key)
     return not SequenceModule.verify_current_content_visibility(hidden_date, hide_after_due)
コード例 #3
0
 def test_student_view_init(self):
     seq_module = SequenceModule(runtime=Mock(position=2),
                                 descriptor=Mock(),
                                 scope_ids=Mock())
     self.assertEquals(seq_module.position,
                       2)  # matches position set in the runtime
コード例 #4
0
ファイル: test_sequence.py プロジェクト: rmulder/edx-platform
 def test_student_view_init(self):
     seq_module = SequenceModule(runtime=Mock(position=2),
                                 descriptor=Mock(),
                                 scope_ids=Mock())
     assert seq_module.position == 2