ROLES AND PERMISSIONS - FIRST CHECK-IN
======================================= WARNING: DEV IS CURRENTLY VERY UNSTABLE. This is a mega-checkin of the new Roles system. A lot of changes have been made in core and modules. Currently there are a lot of rough edges and known problems. We are working hard on these .. .the reason for getting this into HEAD at this stage is enable us to move faster (our branch was diverging from HEAD too much). Please keep an eye on http://docs.moodle.org/en/Roles for current status and information for developers on how to use the new Roles system.
This commit is contained in:
+7
-1
@@ -1006,7 +1006,7 @@ function upgrade_blocks_plugins($continueto) {
|
||||
$invalidblocks[] = $blockname;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$fullblock = $CFG->dirroot .'/blocks/'. $blockname;
|
||||
|
||||
if ( is_readable($fullblock.'/block_'.$blockname.'.php')) {
|
||||
@@ -1095,6 +1095,9 @@ function upgrade_blocks_plugins($continueto) {
|
||||
if(!$upgradesuccess) {
|
||||
notify('Upgrading block '. $block->name .' from '. $currblock->version .' to '. $block->version .' FAILED!');
|
||||
}
|
||||
if (!update_capabilities('block/'.$block->name)) {
|
||||
notify('Could not update '.$block->name.' capabilities!');
|
||||
}
|
||||
else {
|
||||
// OK so far, now update the block record
|
||||
$block->id = $currblock->id;
|
||||
@@ -1146,6 +1149,9 @@ function upgrade_blocks_plugins($continueto) {
|
||||
} else {
|
||||
error($block->name .' block could not be added to the block list!');
|
||||
}
|
||||
if (!update_capabilities('block', $block->name)) {
|
||||
notify('Could not set up '.$block->name.' capabilities!');
|
||||
}
|
||||
} else {
|
||||
error('Block '. $block->name .' tables could NOT be set up successfully!');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user