MDL-64000 usertours: Add tours for key 3.6 features
[moodle.git] / admin / tool / usertours / db / upgrade.php
CommitLineData
3eb3d916
RW
1<?php
2// This file is part of Moodle - http://moodle.org/
3//
4// Moodle is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Moodle is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16
17/**
18 * Upgrade code for install
19 *
20 * @package tool_usertours
21 * @copyright 2016 Ryan Wyllie <ryan@moodle.com>
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23 */
24
25defined('MOODLE_INTERNAL') || die();
26
27use tool_usertours\manager;
28
29/**
30 * Upgrade the user tours plugin.
31 *
32 * @param int $oldversion The old version of the user tours plugin
33 * @return bool
34 */
35function xmldb_tool_usertours_upgrade($oldversion) {
36 global $CFG, $DB;
37
75c57a08
EL
38 // Automatically generated Moodle v3.2.0 release upgrade line.
39 // Put any upgrade step following this.
40
5e272283
EL
41 // Automatically generated Moodle v3.3.0 release upgrade line.
42 // Put any upgrade step following this.
43
6499085f
EL
44 // Automatically generated Moodle v3.4.0 release upgrade line.
45 // Put any upgrade step following this.
46
00977e98
EL
47 // Automatically generated Moodle v3.5.0 release upgrade line.
48 // Put any upgrade step following this.
49
fbb21961
ED
50 if ($oldversion < 2018113000) {
51 // Update the tours shipped with Moodle.
52 manager::update_shipped_tours();
53
54 upgrade_plugin_savepoint(true, 2018113000, 'tool', 'usertours');
55 }
56
3eb3d916
RW
57 return true;
58}