Merge branch 'master_MDL-40122' of git://github.com/danmarsden/moodle
authorDamyon Wiese <damyon@moodle.com>
Tue, 27 Aug 2013 05:16:55 +0000 (13:16 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 27 Aug 2013 05:16:55 +0000 (13:16 +0800)
Conflicts:
lib/db/upgrade.php
version.php

1  2 
backup/moodle2/restore_stepslib.php
lib/db/upgrade.php
lib/pluginlib.php
version.php

Simple merge
@@@ -2327,17 -2327,29 +2327,41 @@@ function xmldb_main_upgrade($oldversion
          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;
  }
Simple merge
diff --cc version.php
  
  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