mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
Merge branch 'MDL-52777-master-bug' of github.com:andrewnicols/moodle
This commit is contained in:
commit
1b07e80edf
1 changed files with 17 additions and 2 deletions
|
@ -561,8 +561,8 @@ class manager {
|
||||||
public static function get_matching_tours(\moodle_url $pageurl) {
|
public static function get_matching_tours(\moodle_url $pageurl) {
|
||||||
global $DB, $PAGE;
|
global $DB, $PAGE;
|
||||||
|
|
||||||
// Do not show tours whilst upgrades are pending.
|
if (self::tour_upgrade_pending()) {
|
||||||
if (moodle_needs_upgrading()) {
|
// Do not show tours whilst upgrades are pending agains the plugin.
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,6 +587,21 @@ EOF;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the tour plugin is pending an upgrade.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function tour_upgrade_pending() {
|
||||||
|
$plugin = new \stdClass();
|
||||||
|
include(dirname(__DIR__) . '/version.php');
|
||||||
|
|
||||||
|
$manager = \core_plugin_manager::instance();
|
||||||
|
$plugininfo = $manager->get_plugin_info('tool_usertours');
|
||||||
|
|
||||||
|
return ($plugin->version != $plugininfo->versiondb);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Import the provided tour JSON.
|
* Import the provided tour JSON.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue