mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-58590' of https://github.com/sk-unikent/moodle
This commit is contained in:
commit
8e96553708
@ -58,6 +58,13 @@ class api {
|
||||
global $CFG;
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
|
||||
// Check if we can return this from cache.
|
||||
$cache = \cache::make('tool_mobile', 'plugininfo');
|
||||
$pluginsinfo = $cache->get('mobileplugins');
|
||||
if ($pluginsinfo !== false) {
|
||||
return (array)$pluginsinfo;
|
||||
}
|
||||
|
||||
$pluginsinfo = [];
|
||||
$plugintypes = core_component::get_plugin_types();
|
||||
|
||||
@ -69,7 +76,7 @@ class api {
|
||||
$component = $plugintype . '_' . $plugin;
|
||||
$version = get_component_version($component);
|
||||
|
||||
require_once("$path/db/mobile.php");
|
||||
require("$path/db/mobile.php");
|
||||
foreach ($addons as $addonname => $addoninfo) {
|
||||
$plugininfo = array(
|
||||
'component' => $component,
|
||||
@ -92,6 +99,9 @@ class api {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cache->set('mobileplugins', $pluginsinfo);
|
||||
|
||||
return $pluginsinfo;
|
||||
}
|
||||
|
||||
|
34
admin/tool/mobile/db/caches.php
Normal file
34
admin/tool/mobile/db/caches.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Mobile cache definitions.
|
||||
*
|
||||
* @package tool_mobile
|
||||
* @copyright 2017 Skylar Kelty <S.Kelty@kent.ac.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$definitions = array(
|
||||
'plugininfo' => array(
|
||||
'mode' => cache_store::MODE_APPLICATION,
|
||||
'simplekeys' => true,
|
||||
'staticacceleration' => true,
|
||||
'staticaccelerationsize' => 1
|
||||
)
|
||||
);
|
@ -26,6 +26,7 @@ $string['androidappid'] = 'Android app\'s unique identifier';
|
||||
$string['androidappid_desc'] = 'This setting may be left as default unless you have a custom Android app.';
|
||||
$string['autologinkeygenerationlockout'] = 'Auto-login key generation is blocked because of too many requests within an hour.';
|
||||
$string['autologinnotallowedtoadmins'] = 'Auto-login is not allowed for site admins.';
|
||||
$string['cachedef_plugininfo'] = 'This stores the list of plugins with mobile addons';
|
||||
$string['clickheretolaunchtheapp'] = 'Click here if the app does not open automatically.';
|
||||
$string['configmobilecssurl'] = 'A CSS file to customise your mobile app interface.';
|
||||
$string['customlangstrings'] = 'Custom language strings';
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
$plugin->version = 2016120505; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2017041200; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_mobile'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->dependencies = array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user