Merge branch 'MDL-63445-master' of git://github.com/bmbrands/moodle
authorDavid Monllao <davidm@moodle.com>
Mon, 29 Oct 2018 15:47:45 +0000 (16:47 +0100)
committerDavid Monllao <davidm@moodle.com>
Mon, 29 Oct 2018 15:47:45 +0000 (16:47 +0100)
1  2 
lang/en/moodle.php
lib/db/upgrade.php
lib/outputrenderers.php
theme/boost/style/moodle.css
theme/bootstrapbase/style/moodle.css
version.php

Simple merge
@@@ -2565,106 -2565,11 +2565,112 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2018101800.00);
      }
  
 -    if ($oldversion < 2018101900.01) {
 +    if ($oldversion < 2018102200.00) {
 +        // Add field 'type' to 'message_conversations'.
 +        $table = new xmldb_table('message_conversations');
 +        $field = new xmldb_field('type', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, 1, 'id');
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        // Add field 'name' to 'message_conversations'.
 +        $field = new xmldb_field('name', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'type');
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        // Conditionally launch add index 'type'.
 +        $index = new xmldb_index('type', XMLDB_INDEX_NOTUNIQUE, ['type']);
 +        if (!$dbman->index_exists($table, $index)) {
 +            $dbman->add_index($table, $index);
 +        }
 +
 +        // Define table 'message_conversations' to be updated.
 +        $table = new xmldb_table('message_conversations');
 +
 +        // Remove the unique 'convhash' index, change to null and add a new non unique index.
 +        $index = new xmldb_index('convhash', XMLDB_INDEX_UNIQUE, ['convhash']);
 +        if ($dbman->index_exists($table, $index)) {
 +            $dbman->drop_index($table, $index);
 +        }
 +
 +        $field = new xmldb_field('convhash', XMLDB_TYPE_CHAR, '40', null, null, null, null, 'name');
 +        $dbman->change_field_notnull($table, $field);
 +
 +        $index = new xmldb_index('convhash', XMLDB_INDEX_NOTUNIQUE, ['convhash']);
 +        if (!$dbman->index_exists($table, $index)) {
 +            $dbman->add_index($table, $index);
 +        }
 +
 +        upgrade_main_savepoint(true, 2018102200.00);
 +    }
 +
 +    if ($oldversion < 2018102300.02) {
 +        // Alter 'message_conversations' table to support groups.
 +        $table = new xmldb_table('message_conversations');
 +        $field = new xmldb_field('component', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'convhash');
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        $field = new xmldb_field('itemtype', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'component');
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        $field = new xmldb_field('itemid', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'itemtype');
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        $field = new xmldb_field('contextid', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'itemid');
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        $field = new xmldb_field('enabled', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, 0, 'contextid');
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        $field = new xmldb_field('timemodified', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'enabled');
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        // Add key.
 +        $key = new xmldb_key('contextid', XMLDB_KEY_FOREIGN, ['contextid'], 'context', ['id']);
 +        $dbman->add_key($table, $key);
 +
 +        // Add index.
 +        $index = new xmldb_index('component-itemtype-itemid-contextid', XMLDB_INDEX_NOTUNIQUE, ['component', 'itemtype',
 +            'itemid', 'contextid']);
 +        if (!$dbman->index_exists($table, $index)) {
 +            $dbman->add_index($table, $index);
 +        }
 +
 +        upgrade_main_savepoint(true, 2018102300.02);
 +    }
 +
 +    if ($oldversion < 2018102900.00) {
 +        // Define field predictionsprocessor to be added to analytics_models.
 +        $table = new xmldb_table('analytics_models');
 +        $field = new xmldb_field('predictionsprocessor', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'timesplitting');
 +
 +        // Conditionally launch add field predictionsprocessor.
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        // Main savepoint reached.
 +        upgrade_main_savepoint(true, 2018102900.00);
 +    }
 +
++    if ($oldversion < 2018102900.01) {
+         // Show course images by default.
+         set_config('showcourseimages', 1, 'moodlecourse');
 -        upgrade_main_savepoint(true, 2018101900.01);
++        upgrade_main_savepoint(true, 2018102900.01);
+     }
      return true;
  }
Simple merge
Simple merge
Simple merge
diff --cc version.php
@@@ -29,7 -29,7 +29,7 @@@
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2018102900.00;              // YYYYMMDD      = weekly release date of this DEV branch.
 -$version  = 2018101900.01;              // YYYYMMDD      = weekly release date of this DEV branch.
++$version  = 2018102900.01;              // YYYYMMDD      = weekly release date of this DEV branch.
                                          //         RR    = release increments - 00 in DEV branches.
                                          //           .XX = incremental changes.