Exemplo n.º 1
0
} else {
    if (!set_config("version", $version)) {
        error("A problem occurred inserting current version into databases");
    }
}
/// Updated human-readable release version if necessary
if ($release != $CFG->release) {
    // Update the release version
    if (!set_config("release", $release)) {
        error("ERROR: Could not update release version in database!!");
    }
}
/// Groups install/upgrade is now in core above.
/// Find and check all main modules and load them up or upgrade them if necessary
/// first old *.php update and then the new upgrade.php script
upgrade_activity_modules("{$CFG->wwwroot}/{$CFG->admin}/index.php");
// Return here afterwards
/// Check all questiontype plugins and upgrade if necessary
/// first old *.php update and then the new upgrade.php script
/// It is important that this is done AFTER the quiz module has been upgraded
upgrade_plugins('qtype', 'question/type', "{$CFG->wwwroot}/{$CFG->admin}/index.php");
// Return here afterwards
/// Upgrade backup/restore system if necessary
/// first old *.php update and then the new upgrade.php script
require_once "{$CFG->dirroot}/backup/lib.php";
upgrade_backup_db("{$CFG->wwwroot}/{$CFG->admin}/index.php");
// Return here afterwards
/// Upgrade blocks system if necessary
/// first old *.php update and then the new upgrade.php script
require_once "{$CFG->dirroot}/lib/blocklib.php";
upgrade_blocks_db("{$CFG->wwwroot}/{$CFG->admin}/index.php");
Exemplo n.º 2
0
             console_write_error('Main Upgrade failed!  See lib/db/upgrade.php', '', false);
         }
     } else {
         if ($version < $CFG->version) {
             notify("WARNING!!!  The code you are using is OLDER than the version that made these databases!");
         }
     }
 } else {
     set_config("version", $version);
 }
 /// Find and check all main modules and load them up or upgrade them if necessary
 /// first old *.php update and then the new upgrade.php script
 if ($verbose > CLI_NO) {
     print_heading(get_string('upgradingactivitymodule', 'install'), '', 1);
 }
 upgrade_activity_modules('');
 // Don't return anywhere
 /// Check all questiontype plugins and upgrade if necessary
 /// first old *.php update and then the new upgrade.php script
 /// It is important that this is done AFTER the quiz module has been upgraded
 if ($verbose > CLI_NO) {
     print_heading(get_string('upgradingqtypeplugin', 'install'), '', 1);
 }
 upgrade_plugins('qtype', 'question/type', '');
 // Don't return anywhere
 /// Check all blocks and load (or upgrade them if necessary)
 /// first old *.php update and then the new upgrade.php script
 if ($verbose > CLI_NO) {
     print_heading(get_string('upgradingblocksplugin', 'install'), '', 1);
 }
 upgrade_blocks_plugins('');