MDL-36840 Set course.format to 'site' for site-course

This commit is contained in:
Marina Glancy 2012-12-05 10:28:12 +08:00
parent 03953061ca
commit e28d5db2ee
2 changed files with 13 additions and 1 deletions

View File

@ -1501,5 +1501,17 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012112100.00);
}
if ($oldversion < 2012120300.01) {
// Make sure site-course has format='site' //MDL-36840
if ($SITE->format !== 'site') {
$DB->set_field('course', 'format', 'site', array('id' => $SITE->id));
$SITE->format = 'site';
}
// Main savepoint reached
upgrade_main_savepoint(true, 2012120300.01);
}
return true;
}

View File

@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2012120300.00; // YYYYMMDD = weekly release date of this DEV branch
$version = 2012120300.01; // YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes