Skip to content

Commit

Permalink
MDL-65809 upgrade: remove format_xxx_upgrade_remove_numsections
Browse files Browse the repository at this point in the history
These functions were used only by deleted upgrade steps
so it's safe to proceed with straight deletion, considering
them internal. Deletion has been documented in corresponding
upgrade.txt files:

    - format_topics_upgrade_remove_numsections()
    - format_topics_upgrade_hide_extra_sections()
    - format_topics_upgrade_add_empty_sections()
    - format_weeks_upgrade_remove_numsections()
    - format_weeks_upgrade_hide_extra_sections()
    - format_weeks_upgrade_add_empty_sections()
  • Loading branch information
sarjona committed Dec 20, 2019
1 parent 089e918 commit 3f224a1
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 613 deletions.
10 changes: 0 additions & 10 deletions course/format/topics/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@
function xmldb_format_topics_upgrade($oldversion) {
global $CFG, $DB;

require_once($CFG->dirroot . '/course/format/topics/db/upgradelib.php');

if ($oldversion < 2017020200) {

// Remove 'numsections' option and hide or delete orphaned sections.
format_topics_upgrade_remove_numsections();

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

// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.

Expand Down
144 changes: 0 additions & 144 deletions course/format/topics/db/upgradelib.php

This file was deleted.

153 changes: 0 additions & 153 deletions course/format/topics/tests/format_topics_upgrade_test.php

This file was deleted.

10 changes: 10 additions & 0 deletions course/format/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ This files describes API changes for course formats

Overview of this plugin type at http://docs.moodle.org/dev/Course_formats

=== 3.9 ===

* The following functions, previously used (exclusively) by upgrade steps are not available anymore because of the upgrade cleanup performed for this version. See MDL-65809 for more info:
- format_topics_upgrade_remove_numsections()
- format_topics_upgrade_hide_extra_sections()
- format_topics_upgrade_add_empty_sections()
- format_weeks_upgrade_remove_numsections()
- format_weeks_upgrade_hide_extra_sections()
- format_weeks_upgrade_add_empty_sections()

=== 3.8 ===

* The following functions have been finally deprecated and can not be used anymore:
Expand Down
9 changes: 0 additions & 9 deletions course/format/weeks/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ function xmldb_format_weeks_upgrade($oldversion) {
global $CFG, $DB;

require_once($CFG->dirroot . '/course/format/weeks/lib.php');
require_once($CFG->dirroot . '/course/format/weeks/db/upgradelib.php');

if ($oldversion < 2017020200) {

// Remove 'numsections' option and hide or delete orphaned sections.
format_weeks_upgrade_remove_numsections();

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

if ($oldversion < 2017050300) {
// Go through the existing courses using the weeks format with no value set for the 'automaticenddate'.
Expand Down
Loading

0 comments on commit 3f224a1

Please sign in to comment.