Skip to content

Commit

Permalink
Merge branch 'wip-MDL-60241-34' of git://github.com/marinaglancy/mood…
Browse files Browse the repository at this point in the history
…le into MOODLE_34_STABLE
  • Loading branch information
stronk7 committed Mar 12, 2018
2 parents 61305a7 + 1263887 commit 21f2c34
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions course/format/topics/db/upgrade.php
Expand Up @@ -49,5 +49,15 @@ function xmldb_format_topics_upgrade($oldversion) {
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.

if ($oldversion < 2017111301) {

// During upgrade to Moodle 3.3 it could happen that general section (section 0) became 'invisible'.
// It should always be visible.
$DB->execute("UPDATE {course_sections} SET visible=1 WHERE visible=0 AND section=0 AND course IN
(SELECT id FROM {course} WHERE format=?)", ['topics']);

upgrade_plugin_savepoint(true, 2017111301, 'format', 'topics');
}

return true;
}
2 changes: 1 addition & 1 deletion course/format/topics/version.php
Expand Up @@ -25,6 +25,6 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2017111301; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'format_topics'; // Full name of the plugin (used for diagnostics).
10 changes: 10 additions & 0 deletions course/format/weeks/db/upgrade.php
Expand Up @@ -85,5 +85,15 @@ function xmldb_format_weeks_upgrade($oldversion) {
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.

if ($oldversion < 2017111301) {

// During upgrade to Moodle 3.3 it could happen that general section (section 0) became 'invisible'.
// It should always be visible.
$DB->execute("UPDATE {course_sections} SET visible=1 WHERE visible=0 AND section=0 AND course IN
(SELECT id FROM {course} WHERE format=?)", ['weeks']);

upgrade_plugin_savepoint(true, 2017111301, 'format', 'weeks');
}

return true;
}
2 changes: 1 addition & 1 deletion course/format/weeks/version.php
Expand Up @@ -25,6 +25,6 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2017111301; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'format_weeks'; // Full name of the plugin (used for diagnostics).

0 comments on commit 21f2c34

Please sign in to comment.