Moodle release 3.6rc2
[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
8f5de6f2 38 if ($oldversion < 2016120501) {
3eb3d916
RW
39 // Update the tours shipped with Moodle.
40 manager::update_shipped_tours();
41
8f5de6f2 42 upgrade_plugin_savepoint(true, 2016120501, 'tool', 'usertours');
3eb3d916
RW
43 }
44
75c57a08
EL
45 // Automatically generated Moodle v3.2.0 release upgrade line.
46 // Put any upgrade step following this.
47
5e272283
EL
48 // Automatically generated Moodle v3.3.0 release upgrade line.
49 // Put any upgrade step following this.
50
6499085f
EL
51 // Automatically generated Moodle v3.4.0 release upgrade line.
52 // Put any upgrade step following this.
53
00977e98
EL
54 // Automatically generated Moodle v3.5.0 release upgrade line.
55 // Put any upgrade step following this.
56
3eb3d916
RW
57 return true;
58}