Merge branch 'MDL-44118_2' of git://github.com/timhunt/moodle
authorDamyon Wiese <damyon@moodle.com>
Wed, 19 Feb 2014 01:08:42 +0000 (09:08 +0800)
committerDamyon Wiese <damyon@moodle.com>
Wed, 19 Feb 2014 01:08:42 +0000 (09:08 +0800)
Conflicts:
version.php

1  2 
lang/en/admin.php
lib/db/install.xml
lib/db/upgrade.php
version.php

Simple merge
Simple merge
@@@ -2999,38 -2993,45 +2999,75 @@@ function xmldb_main_upgrade($oldversion
          }
  
          // Main savepoint reached.
 -        upgrade_main_savepoint(true, 2014020500.00);
 +        upgrade_main_savepoint(true, 2014021300.01);
 +    }
 +
 +    if ($oldversion < 2014021300.02) {
 +
 +        // Define field variant to be added to question_response_analysis.
 +        $table = new xmldb_table('question_response_analysis');
 +        $field = new xmldb_field('variant', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'questionid');
 +
 +        // Conditionally launch add field variant.
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        // Main savepoint reached.
 +        upgrade_main_savepoint(true, 2014021300.02);
 +    }
 +
 +    if ($oldversion < 2014021800.00) {
 +
 +        // Define field queued to be added to portfolio_tempdata.
 +        $table = new xmldb_table('portfolio_tempdata');
 +        $field = new xmldb_field('queued', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0', 'instance');
 +
 +        // Conditionally launch add field queued.
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        // Main savepoint reached.
 +        upgrade_main_savepoint(true, 2014021800.00);
      }
  
 -    if ($oldversion < 2014021300.03) {
+     if ($oldversion < 2014021300.01) {
+         // Force uninstall of deleted tool.
+         if (!file_exists("$CFG->dirroot/$CFG->admin/tool/qeupgradehelper")) {
+             // Remove all other associated config.
+             unset_all_config_for_plugin('tool_qeupgradehelper');
+         }
+         upgrade_main_savepoint(true, 2014021300.01);
+     }
+     if ($oldversion < 2014021300.02) {
+         // Define table question_states to be dropped.
+         $table = new xmldb_table('question_states');
+         // Conditionally launch drop table for question_states.
+         if ($dbman->table_exists($table)) {
+             $dbman->drop_table($table);
+         }
+         // Main savepoint reached.
+         upgrade_main_savepoint(true, 2014021300.02);
+     }
 -        upgrade_main_savepoint(true, 2014021300.03);
++    if ($oldversion < 2014021900.00) {
+         // Define table question_sessions to be dropped.
+         $table = new xmldb_table('question_sessions');
+         // Conditionally launch drop table for question_sessions.
+         if ($dbman->table_exists($table)) {
+             $dbman->drop_table($table);
+         }
+         // Main savepoint reached.
++        upgrade_main_savepoint(true, 2014021900.00);
+     }
      return true;
  }
diff --cc version.php
@@@ -29,7 -29,7 +29,7 @@@
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2014021800.00;              // YYYYMMDD      = weekly release date of this DEV branch.
 -$version  = 2014021300.03;              // YYYYMMDD      = weekly release date of this DEV branch.
++$version  = 2014021900.00;              // YYYYMMDD      = weekly release date of this DEV branch.
                                          //         RR    = release increments - 00 in DEV branches.
                                          //           .XX = incremental changes.