mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-57437 core: upgrade code for introduction of block_myoverview
Part of MDL-55611 epic.
This commit is contained in:
parent
1c69e1994d
commit
932f299bc0
@ -2537,6 +2537,6 @@ function blocks_add_default_system_blocks() {
|
||||
}
|
||||
|
||||
$newblocks = array('private_files', 'online_users', 'badges', 'calendar_month', 'calendar_upcoming');
|
||||
$newcontent = array('lp', 'course_overview');
|
||||
$newcontent = array('lp', 'myoverview');
|
||||
$page->blocks->add_blocks(array(BLOCK_POS_RIGHT => $newblocks, 'content' => $newcontent), 'my-index', $subpagepattern);
|
||||
}
|
||||
|
@ -2611,5 +2611,15 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2017031400.00);
|
||||
}
|
||||
|
||||
if ($oldversion < 2017040300.04) {
|
||||
|
||||
// If the 'Course overview' block is no longer present, replace with the 'My overview' block.
|
||||
if (!file_exists($CFG->dirroot . '/blocks/course_overview/block_course_overview.php')) {
|
||||
$DB->set_field('block_instances', 'blockname', 'myoverview', array('blockname' => 'course_overview'));
|
||||
}
|
||||
|
||||
upgrade_main_savepoint(true, 2017040300.04);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2017033100.00; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
$version = 2017040300.04; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user