MDL-13101 New section of the upgrade process: plugins check
This commit is contained in:
+18
-1
@@ -32,6 +32,7 @@
|
||||
$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL);
|
||||
$autopilot = optional_param('autopilot', 0, PARAM_BOOL);
|
||||
$ignoreupgradewarning = optional_param('ignoreupgradewarning', 0, PARAM_BOOL);
|
||||
$confirmplugincheck = optional_param('confirmplugincheck', 0, PARAM_BOOL);
|
||||
|
||||
/// check upgrade status first
|
||||
if ($ignoreupgradewarning and !empty($_SESSION['upgraderunning'])) {
|
||||
@@ -123,6 +124,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! $maintables) {
|
||||
/// hide errors from headers in case debug enabled in config.php
|
||||
$origdebug = $CFG->debug;
|
||||
@@ -158,6 +160,7 @@
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
$strdatabasesetup = get_string("databasesetup");
|
||||
$strdatabasesuccess = get_string("databasesuccess");
|
||||
$navigation = build_navigation(array(array('name'=>$strdatabasesetup, 'link'=>null, 'type'=>'misc')));
|
||||
@@ -305,6 +308,20 @@
|
||||
|
||||
print_footer('none');
|
||||
die;
|
||||
} elseif (empty($confirmplugincheck)) {
|
||||
$strplugincheck = get_string('plugincheck');
|
||||
$navigation = build_navigation(array(array('name'=>$strplugincheck, 'link'=>null, 'type'=>'misc')));
|
||||
print_header($strplugincheck, $strplugincheck, $navigation, "", "", false, " ", " ");
|
||||
print_heading($strplugincheck);
|
||||
print_box_start('generalbox', 'notice'); // MDL-8330
|
||||
print_string('pluginchecknotice');
|
||||
print_box_end();
|
||||
print_modules_table();
|
||||
echo "<br />";
|
||||
print_continue('index.php?confirmupgrade=1&confirmrelease=1&confirmplugincheck=1');
|
||||
print_footer('none');
|
||||
die();
|
||||
|
||||
} else {
|
||||
$strdatabasesuccess = get_string("databasesuccess");
|
||||
$navigation = build_navigation(array(array('name'=>$strdatabasesuccess, 'link'=>null, 'type'=>'misc')));
|
||||
@@ -362,7 +379,7 @@
|
||||
/// Main upgrade not success
|
||||
} else {
|
||||
notify('Main Upgrade failed! See lib/db/upgrade.php');
|
||||
print_continue('index.php?confirmupgrade=1&confirmrelease=1');
|
||||
print_continue('index.php?confirmupgrade=1&confirmrelease=1&confirmplugincheck=1');
|
||||
print_footer('none');
|
||||
die;
|
||||
}
|
||||
|
||||
@@ -1050,6 +1050,7 @@ $string['nomoreidnumber'] = 'Not using an idnumber to avoid collisions';
|
||||
$string['none'] = 'None';
|
||||
$string['noneditingteacher'] = 'Non-editing teacher';
|
||||
$string['noneditingteacherdescription'] = 'Non-editing teachers can teach in courses and grade students, but may not alter activities.';
|
||||
$string['nonstandard'] = 'Non-standard';
|
||||
$string['nopendingcourses'] = 'There are no courses pending approval';
|
||||
$string['nopotentialadmins'] = 'No potential admins';
|
||||
$string['nopotentialcreators'] = 'No potential course creators';
|
||||
@@ -1154,6 +1155,10 @@ $string['pictureof'] = 'Picture of $a';
|
||||
$string['phone'] = 'Phone';
|
||||
$string['phpinfo'] = 'PHP info';
|
||||
$string['pleaseclose'] = 'Please close this window now.';
|
||||
$string['plugincheck'] = 'Plugins check';
|
||||
$string['pluginchecknotice'] = 'The following tables show the modules, blocks and filters that have been detected in your current Moodle installation;
|
||||
They indicate which plugins are standard, and which are not. All non-standard plugins should be checked and upgraded to their most recent versions
|
||||
before continuing with this Moodle upgrade.';
|
||||
$string['pluginsetup'] = 'Setting up plugin tables';
|
||||
$string['policyaccept'] = 'I understand and agree';
|
||||
$string['policyagree'] = 'You must agree to this policy to continue using this site. Do you agree?';
|
||||
@@ -1361,6 +1366,7 @@ $string['someerrorswerefound'] = 'Some information was missing or incorrect. Loo
|
||||
$string['sortby'] = 'Sort by';
|
||||
$string['sourcerole'] = 'Source role';
|
||||
$string['specifyname'] = 'You must specify a name.';
|
||||
$string['standard'] = 'Standard';
|
||||
$string['starpending'] = '([*] = course pending approval)';
|
||||
$string['startdate'] = 'Course start date';
|
||||
$string['startsignup'] = 'Create new account';
|
||||
|
||||
@@ -4502,4 +4502,99 @@ function db_replace($search, $replace) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function print_modules_table() {
|
||||
$compatlist = array();
|
||||
$compatlist['mods'] = array('assignment',
|
||||
'chat',
|
||||
'choice',
|
||||
'data',
|
||||
'exercise',
|
||||
'forum',
|
||||
'glossary',
|
||||
'hotpot',
|
||||
'journal',
|
||||
'label',
|
||||
'lams',
|
||||
'lesson',
|
||||
'quiz',
|
||||
'resource',
|
||||
'scorm',
|
||||
'survey',
|
||||
'wiki',
|
||||
'workshop');
|
||||
|
||||
$compatlist['blocks'] = array('activity_modules',
|
||||
'admin',
|
||||
'admin_bookmarks',
|
||||
'admin_tree',
|
||||
'blog_menu',
|
||||
'blog_tags',
|
||||
'calendar_month',
|
||||
'calendar_upcoming',
|
||||
'course_list',
|
||||
'course_summary',
|
||||
'db',
|
||||
'glossary_random',
|
||||
'html',
|
||||
'loancalc',
|
||||
'login',
|
||||
'mentees',
|
||||
'messages',
|
||||
'mnet_hosts',
|
||||
'news_items',
|
||||
'online_users',
|
||||
'participants',
|
||||
'quiz_results',
|
||||
'recent_activity',
|
||||
'rss_client',
|
||||
'search',
|
||||
'search_forums',
|
||||
'section_links',
|
||||
'site_main_menu',
|
||||
'social_activities',
|
||||
'tag_flickr',
|
||||
'tag_youtube',
|
||||
'tags');
|
||||
|
||||
$compatlist['filters'] = array('activitynames',
|
||||
'algebra',
|
||||
'censor',
|
||||
'emailprotect',
|
||||
'filter',
|
||||
'mediaplugin',
|
||||
'multilang',
|
||||
'tex',
|
||||
'tidy');
|
||||
|
||||
|
||||
$plugins = array();
|
||||
$plugins['mods'] = get_list_of_plugins();
|
||||
$plugins['blocks'] = get_list_of_plugins('blocks');
|
||||
$plugins['filters'] = get_list_of_plugins('filter');
|
||||
|
||||
$strstandard = get_string('standard');
|
||||
$strnonstandard = get_string('nonstandard');
|
||||
|
||||
$html = '';
|
||||
|
||||
foreach ($plugins as $cat => $list) {
|
||||
$html .= '<table class="plugincompattable generaltable boxaligncenter" cellspacing="1" cellpadding="5" '
|
||||
. 'id="' . $cat . 'compattable" summary="compatibility table"><caption>' . ucfirst($cat) . '</caption>' . "\n";
|
||||
$row = 0;
|
||||
foreach ($list as $k => $plugin) {
|
||||
$standard = 'standard';
|
||||
|
||||
if (!in_array($plugin, $compatlist[$cat])) {
|
||||
$standard = 'nonstandard';
|
||||
}
|
||||
|
||||
$html .= "<tr class=\"r$row\"><td class=\"cell c0\">" . ucfirst($plugin) . "</td><td class=\"$standard cell c1\">" . ${'str' . $standard} . "</td></tr>\n";
|
||||
$row++;
|
||||
}
|
||||
$html .= '</table><br />';
|
||||
}
|
||||
|
||||
echo $html;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -318,6 +318,15 @@ table.flexible .r1 {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.plugincompattable td.standard {
|
||||
color: #008000;
|
||||
}
|
||||
|
||||
.plugincompattable td.nonstandard {
|
||||
color: #FF7500;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Admin settings */
|
||||
|
||||
#adminsettings fieldset {
|
||||
|
||||
@@ -996,6 +996,14 @@ body#admin-modules table.generaltable td.c0
|
||||
margin:20px;
|
||||
}
|
||||
|
||||
|
||||
.plugincompattable caption {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
font-size: 130%;
|
||||
}
|
||||
|
||||
/* Admin settings */
|
||||
#adminsettings div.form-item {
|
||||
clear: both;
|
||||
|
||||
Reference in New Issue
Block a user