Skip to content
Browse files

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

  • Loading branch information...
1 parent 325e266 commit 113105bf9cdeb23b3109700eccdd180e0492838c @marinaglancy marinaglancy committed Dec 5, 2012
Showing with 13 additions and 1 deletion.
  1. +12 −0 lib/db/upgrade.php
  2. +1 −1 version.php
View
12 lib/db/upgrade.php
@@ -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
2 version.php
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2012120300.00; // 20121203 = branching date YYYYMMDD - do not modify!
+$version = 2012120300.01; // 20121203 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches
// .XX = incremental changes

0 comments on commit 113105b

Please sign in to comment.
Something went wrong with that request. Please try again.