Merge branch 'MDL-49101' of https://github.com/andrewhancox/moodle
authorDamyon Wiese <damyon@moodle.com>
Tue, 7 Apr 2015 09:26:24 +0000 (17:26 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 7 Apr 2015 09:27:17 +0000 (17:27 +0800)
Conflicts:
lib/db/upgrade.php
version.php

1  2 
course/moodleform_mod.php
course/tests/behat/add_activities.feature
lang/en/admin.php
lib/db/upgrade.php
mod/choice/mod_form.php
mod/forum/mod_form.php
mod/lesson/mod_form.php
mod/quiz/mod_form.php
mod/workshop/mod_form.php
version.php

Simple merge
@@@ -37,13 -37,20 +37,20 @@@ Feature: Add activities to course
      And the field "Allow comments on entries" matches value "Yes"
  
    @javascript
-   Scenario: Add an activity without the required fields
+   Scenario: Add an activity supplying only the name
      When I add a "Database" to section "3" and I fill the form with:
        | Name | Test name |
-     And I press "Save and return to course"
-     Then I should see "Adding a new"
-     And I should see "Required"
-     And I press "Cancel"
+     Then I should see "Test name"
 -  @javascript @wip
++  @javascript
+   Scenario: Set activity description to required then add an activity supplying only the name
+     Given I set the following administration settings values:
+       | requiremodintro | Yes |
+     When I follow "Home"
+     And I follow "Course 1"
+     And I add a "Database" to section "3" and I fill the form with:
+       | Name | Test name |
+     Then I should see "Required"
  
    Scenario: Add an activity to a course with Javascript disabled
      Then I should see "Add a resource to section 'Topic 1'"
Simple merge
@@@ -4216,88 -4216,10 +4216,93 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2015030400.00);
      }
  
 -    if ($oldversion < 2015033000.00) {
 +    if ($oldversion < 2015031100.00) {
 +        // Unset old config variable.
 +        unset_config('enabletgzbackups');
 +
 +        upgrade_main_savepoint(true, 2015031100.00);
 +    }
 +
 +    if ($oldversion < 2015031400.00) {
 +
 +        // Define index useridfrom (not unique) to be dropped form message.
 +        $table = new xmldb_table('message');
 +        $index = new xmldb_index('useridfrom', XMLDB_INDEX_NOTUNIQUE, array('useridfrom'));
 +
 +        // Conditionally launch drop index useridfrom.
 +        if ($dbman->index_exists($table, $index)) {
 +            $dbman->drop_index($table, $index);
 +        }
 +
 +        // Define index useridfrom (not unique) to be dropped form message_read.
 +        $table = new xmldb_table('message_read');
 +        $index = new xmldb_index('useridfrom', XMLDB_INDEX_NOTUNIQUE, array('useridfrom'));
 +
 +        // Conditionally launch drop index useridfrom.
 +        if ($dbman->index_exists($table, $index)) {
 +            $dbman->drop_index($table, $index);
 +        }
 +
 +        // Main savepoint reached.
 +        upgrade_main_savepoint(true, 2015031400.00);
 +    }
 +
 +    if ($oldversion < 2015031900.01) {
 +        unset_config('crontime', 'registration');
 +        upgrade_main_savepoint(true, 2015031900.01);
 +    }
 +
 +    if ($oldversion < 2015032000.00) {
 +        $table = new xmldb_table('badge_criteria');
 +
 +        $field = new xmldb_field('description', XMLDB_TYPE_TEXT, null, null, null, null, null);
 +        // Conditionally add description field to the badge_criteria table.
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        $field = new xmldb_field('descriptionformat', XMLDB_TYPE_INTEGER, 2, null, XMLDB_NOTNULL, null, 0);
 +        // Conditionally add description format field to the badge_criteria table.
 +        if (!$dbman->field_exists($table, $field)) {
 +            $dbman->add_field($table, $field);
 +        }
 +
 +        upgrade_main_savepoint(true, 2015032000.00);
 +    }
 +
 +    if ($oldversion < 2015040200.01) {
 +        // Force uninstall of deleted tool.
 +        if (!file_exists("$CFG->dirroot/$CFG->admin/tool/timezoneimport")) {
 +            // Remove capabilities.
 +            capabilities_cleanup('tool_timezoneimport');
 +            // Remove all other associated config.
 +            unset_all_config_for_plugin('tool_timezoneimport');
 +        }
 +        upgrade_main_savepoint(true, 2015040200.01);
 +    }
 +
 +    if ($oldversion < 2015040200.02) {
 +        // Define table timezone to be dropped.
 +        $table = new xmldb_table('timezone');
 +        // Conditionally launch drop table for timezone.
 +        if ($dbman->table_exists($table)) {
 +            $dbman->drop_table($table);
 +        }
 +        upgrade_main_savepoint(true, 2015040200.02);
 +    }
 +
 +    if ($oldversion < 2015040200.03) {
 +        if (isset($CFG->timezone) and $CFG->timezone == 99) {
 +            // Migrate to real server timezone.
 +            unset_config('timezone');
 +        }
 +        upgrade_main_savepoint(true, 2015040200.03);
 +    }
 +
++    if ($oldversion < 2015040700.01) {
+         $DB->delete_records('config_plugins', array('name' => 'requiremodintro'));
 -        upgrade_main_savepoint(true, 2015033000.00);
++        upgrade_main_savepoint(true, 2015040700.01);
+     }
      return true;
  }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc version.php
@@@ -29,7 -29,7 +29,7 @@@
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2015040700.00;              // YYYYMMDD      = weekly release date of this DEV branch.
 -$version  = 2015033000.00;              // YYYYMMDD      = weekly release date of this DEV branch.
++$version  = 2015040700.01;              // YYYYMMDD      = weekly release date of this DEV branch.
                                          //         RR    = release increments - 00 in DEV branches.
                                          //           .XX = incremental changes.