upgrade_main_savepoint(true, 2013081200.00);
}
- if ($oldversion < 2013081500.01) {
+ if ($oldversion < 2013082300.01) {
+ // Define the table 'backup_logs' and the field 'message' which we will be changing from a char to a text field.
+ $table = new xmldb_table('backup_logs');
+ $field = new xmldb_field('message', XMLDB_TYPE_TEXT, null, null, XMLDB_NOTNULL, null, null, 'loglevel');
+
+ // Perform the change.
+ $dbman->change_field_type($table, $field);
+
+ // Main savepoint reached.
+ upgrade_main_savepoint(true, 2013082300.01);
+ }
+
+ // Convert SCORM course format courses to singleactivity.
- upgrade_main_savepoint(true, 2013081500.01);
++ if ($oldversion < 2013082700.00) {
+ // First set relevant singleactivity settings.
+ $formatoptions = new stdClass();
+ $formatoptions->format = 'singleactivity';
+ $formatoptions->sectionid = 0;
+ $formatoptions->name = 'activitytype';
+ $formatoptions->value = 'scorm';
+
+ $courses = $DB->get_recordset('course', array('format' => 'scorm'), 'id');
+ foreach ($courses as $course) {
+ $formatoptions->courseid = $course->id;
+ $DB->insert_record('course_format_options', $formatoptions);
+ }
+ $courses->close();
+
+ // Now update course format for these courses.
+ $sql = "UPDATE {course}
+ SET format = 'singleactivity', modinfo = '', sectioncache = ''
+ WHERE format = 'scorm'";
+ $DB->execute($sql);
++ upgrade_main_savepoint(true, 2013082700.00);
+ }
+
return true;
}
defined('MOODLE_INTERNAL') || die();
- $version = 2013082600.00; // YYYYMMDD = weekly release date of this DEV branch.
-$version = 2013081500.01; // YYYYMMDD = weekly release date of this DEV branch
- // RR = release increments - 00 in DEV branches
- // .XX = incremental changes
++$version = 2013082700.00; // YYYYMMDD = weekly release date of this DEV branch.
+ // RR = release increments - 00 in DEV branches.
+ // .XX = incremental changes.
-$release = '2.6dev (Build: 20130815)'; // Human-friendly version name
+$release = '2.6dev (Build: 20130823)'; // Human-friendly version name
$branch = '26'; // this version's branch
$maturity = MATURITY_ALPHA; // this version's maturity level