Merge branch 'MDL-69022' of https://github.com/Chocolate-lightning/moodle
authorSara Arjona <sara@moodle.com>
Thu, 11 Jun 2020 10:50:49 +0000 (12:50 +0200)
committerSara Arjona <sara@moodle.com>
Thu, 11 Jun 2020 10:50:49 +0000 (12:50 +0200)
1  2 
admin/tool/moodlenet/db/upgrade.php
admin/tool/moodlenet/settings.php
admin/tool/moodlenet/version.php

@@@ -77,23 -77,12 +77,30 @@@ function xmldb_tool_moodlenet_upgrade(i
          upgrade_plugin_savepoint(true, 2020060500, 'tool', 'moodlenet');
      }
  
 -    if ($oldversion < 2020060500.02) {
 +    if ($oldversion < 2020061501) {
 +        // Change the domain.
 +        $defaultmoodlenet = get_config('tool_moodlenet', 'defaultmoodlenet');
 +
 +        if ($defaultmoodlenet === 'https://home.moodle.net') {
 +            set_config('defaultmoodlenet', 'https://moodle.net', 'tool_moodlenet');
 +        }
 +
 +        // Change the name.
 +        $defaultmoodlenetname = get_config('tool_moodlenet', 'defaultmoodlenetname');
 +
 +        if ($defaultmoodlenetname === 'Moodle HQ MoodleNet') {
 +            set_config('defaultmoodlenetname', 'MoodleNet Central', 'tool_moodlenet');
 +        }
 +
 +        upgrade_plugin_savepoint(true, 2020061501, 'tool', 'moodlenet');
 +    }
 +
++    if ($oldversion < 2020061502) {
+         // Disable the MoodleNet integration by default till further notice.
+         set_config('enablemoodlenet', 0, 'tool_moodlenet');
 -        upgrade_plugin_savepoint(true, 2020060500.02, 'tool', 'moodlenet');
++        upgrade_plugin_savepoint(true, 2020061502, 'tool', 'moodlenet');
+     }
      return true;
  }
Simple merge
@@@ -25,6 -25,6 +25,6 @@@
  defined('MOODLE_INTERNAL') || die();
  
  $plugin->component  = 'tool_moodlenet';
- $plugin->version    = 2020061501;
 -$plugin->version    = 2020060500.02;
 -$plugin->requires   = 2020022800.01;
++$plugin->version    = 2020061502;
 +$plugin->requires   = 2020060900;
  $plugin->maturity   = MATURITY_ALPHA;