MDL-44070 Conditional availability enhancements (6): core changes

Changes core code to use new API instead of the old one when
checking user access to activities and sections.

Includes changes to other libraries that are necessary after
adding the availability system and removing old conditional tables
etc.
This commit is contained in:
sam marshall
2014-04-07 20:11:48 +01:00
parent 6a601097a0
commit 8d1f33e122
14 changed files with 393 additions and 402 deletions
+2 -4
View File
@@ -176,7 +176,7 @@ abstract class testing_module_generator extends component_generator_base {
$easymergefields = array('section', 'added', 'score', 'indent',
'visible', 'visibleold', 'groupmode', 'groupingid', 'groupmembersonly',
'completion', 'completiongradeitemnumber', 'completionview', 'completionexpected',
'availablefrom', 'availableuntil', 'showavailability', 'showdescription');
'availability', 'showdescription');
foreach ($easymergefields as $key) {
if (isset($options[$key])) {
$moduleinfo->$key = $options[$key];
@@ -191,9 +191,7 @@ abstract class testing_module_generator extends component_generator_base {
'groupmode' => 0,
'groupingid' => 0,
'groupmembersonly' => 0,
'showavailability' => 0,
'availablefrom' => 0,
'availableuntil' => 0,
'availability' => null,
'completion' => 0,
'completionview' => 0,
'completionexpected' => 0,