Skip to content

Commit

Permalink
Merge branch 'MDL-72781-master' of git://github.com/mickhawkins/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Oct 28, 2021
2 parents 440fac3 + 3416ccc commit ba1c3c0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 23 deletions.
10 changes: 6 additions & 4 deletions admin/tool/usertours/classes/manager.php
Expand Up @@ -862,10 +862,6 @@ public static function update_shipped_tours() {
// the format filename => version. The version value needs to
// be increased if the tour has been updated.
$shippedtours = [
'311_activity_information_activity_page_student.json' => 2,
'311_activity_information_activity_page_teacher.json' => 2,
'311_activity_information_course_page_student.json' => 2,
'311_activity_information_course_page_teacher.json' => 2
];

// These are tours that we used to ship but don't ship any longer.
Expand All @@ -878,6 +874,12 @@ public static function update_shipped_tours() {
// Formerly included in Moodle 3.6.0.
'36_dashboard.json' => 3,
'36_messaging.json' => 3,

// Formerly included in Moodle 3.11.0.
'311_activity_information_activity_page_student.json' => 2,
'311_activity_information_activity_page_teacher.json' => 2,
'311_activity_information_course_page_student.json' => 2,
'311_activity_information_course_page_teacher.json' => 2,
];

$existingtourrecords = $DB->get_recordset('tool_usertours_tours');
Expand Down
21 changes: 7 additions & 14 deletions admin/tool/usertours/db/upgrade.php
Expand Up @@ -47,13 +47,6 @@ function xmldb_tool_usertours_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.

if ($oldversion < 2020061501) {
// Updating shipped tours will fix broken sortorder records in existing tours.
manager::update_shipped_tours();

upgrade_plugin_savepoint(true, 2020061501, 'tool', 'usertours');
}

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

Expand All @@ -78,13 +71,6 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2021052501, 'tool', 'usertours');
}

if ($oldversion < 2021052508) {
// Updating shipped tours.
manager::update_shipped_tours();

upgrade_plugin_savepoint(true, 2021052508, 'tool', 'usertours');
}

if ($oldversion < 2021092300) {
// Define field endtourlabel to be added to tool_usertours_tours.
$table = new xmldb_table('tool_usertours_tours');
Expand Down Expand Up @@ -128,5 +114,12 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2021101300, 'tool', 'usertours');
}

if ($oldversion < 2021101301) {
// Update shipped tours.
manager::update_shipped_tours();

upgrade_plugin_savepoint(true, 2021101301, 'tool', 'usertours');
}

return true;
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion admin/tool/usertours/version.php
Expand Up @@ -24,6 +24,6 @@

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

$plugin->version = 2021101300; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2021101301; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2021052500; // Requires this Moodle version.
$plugin->component = 'tool_usertours'; // Full name of the plugin (used for diagnostics).

0 comments on commit ba1c3c0

Please sign in to comment.