2006-10-26 17:33:40 +00:00
|
|
|
<?php //$Id$
|
|
|
|
|
2007-06-03 09:10:52 +00:00
|
|
|
// This file keeps track of upgrades to
|
2006-10-26 17:33:40 +00:00
|
|
|
// the assignment module
|
|
|
|
//
|
|
|
|
// Sometimes, changes between versions involve
|
|
|
|
// alterations to database structures and other
|
|
|
|
// major things that may break installations.
|
|
|
|
//
|
|
|
|
// The upgrade function in this file will attempt
|
|
|
|
// to perform all the necessary actions to upgrade
|
|
|
|
// your older installtion to the current version.
|
|
|
|
//
|
|
|
|
// If there's something it cannot do itself, it
|
|
|
|
// will tell you what you need to do.
|
|
|
|
//
|
|
|
|
// The commands in here will all be database-neutral,
|
2008-06-15 10:32:50 +00:00
|
|
|
// using the methods of database_manager class
|
2006-10-26 17:33:40 +00:00
|
|
|
|
|
|
|
function xmldb_assignment_upgrade($oldversion=0) {
|
|
|
|
|
2008-05-15 21:40:00 +00:00
|
|
|
global $CFG, $THEME, $DB;
|
2006-10-26 17:33:40 +00:00
|
|
|
|
|
|
|
$result = true;
|
|
|
|
|
2008-05-15 21:40:00 +00:00
|
|
|
//===== 1.9.0 upgrade line ======//
|
2008-02-25 13:34:17 +00:00
|
|
|
|
2008-03-19 23:20:00 +00:00
|
|
|
if ($result && $oldversion < 2007101511) {
|
2008-03-15 18:52:39 +00:00
|
|
|
notify('Processing assignment grades, this may take a while if there are many assignments...', 'notifysuccess');
|
2008-03-15 14:54:43 +00:00
|
|
|
// change grade typo to text if no grades MDL-13920
|
|
|
|
require_once $CFG->dirroot.'/mod/assignment/lib.php';
|
|
|
|
// too much debug output
|
2008-05-15 21:40:00 +00:00
|
|
|
$DB->set_debug(false);
|
2008-03-15 14:54:43 +00:00
|
|
|
assignment_update_grades();
|
2008-05-15 21:40:00 +00:00
|
|
|
$DB->set_debug(true);
|
2008-06-22 23:35:52 +00:00
|
|
|
upgrade_mod_savepoint($result, 2007101511, 'assignment');
|
2008-03-15 14:54:43 +00:00
|
|
|
}
|
|
|
|
|
2006-10-26 17:33:40 +00:00
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|