MDL-57433 block_course_overview: removed block from core
Part of MDL-55611 epic.
This commit is contained in:
committed by
Damyon Wiese
parent
932f299bc0
commit
4c5cde3134
@@ -1647,6 +1647,7 @@ class core_plugin_manager {
|
||||
$plugins = array(
|
||||
'qformat' => array('blackboard', 'learnwise'),
|
||||
'auth' => array('radius'),
|
||||
'block' => array('course_overview'),
|
||||
'enrol' => array('authorize'),
|
||||
'report' => array('search'),
|
||||
'repository' => array('alfresco'),
|
||||
@@ -1712,8 +1713,8 @@ class core_plugin_manager {
|
||||
'activity_modules', 'activity_results', 'admin_bookmarks', 'badges',
|
||||
'blog_menu', 'blog_recent', 'blog_tags', 'calendar_month',
|
||||
'calendar_upcoming', 'comments', 'community',
|
||||
'completionstatus', 'course_list', 'course_overview',
|
||||
'course_summary', 'feedback', 'globalsearch', 'glossary_random', 'html',
|
||||
'completionstatus', 'course_list', 'course_summary',
|
||||
'feedback', 'globalsearch', 'glossary_random', 'html',
|
||||
'login', 'lp', 'mentees', 'messages', 'mnet_hosts', 'myoverview', 'myprofile',
|
||||
'navigation', 'news_items', 'online_users', 'participants',
|
||||
'private_files', 'quiz_results', 'recent_activity',
|
||||
|
||||
@@ -2621,5 +2621,23 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2017040300.04);
|
||||
}
|
||||
|
||||
if ($oldversion < 2017040300.05) {
|
||||
|
||||
// If the 'Course overview' block is no longer present, remove it.
|
||||
// Note - we do not need to completely remove the block context etc because we
|
||||
// have replaced all occurrences of the 'Course overview' block with the 'My overview'
|
||||
// block in the upgrade step above.
|
||||
if (!file_exists($CFG->dirroot . '/blocks/course_overview/block_course_overview.php')) {
|
||||
// Delete the block from the block table.
|
||||
$DB->delete_records('block', array('name' => 'course_overview'));
|
||||
// Remove capabilities.
|
||||
capabilities_cleanup('block_course_overview');
|
||||
// Clean config.
|
||||
unset_all_config_for_plugin('block_course_overview');
|
||||
}
|
||||
|
||||
upgrade_main_savepoint(true, 2017040300.05);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user