$strprotect = get_string('blockprotect', 'admin');
$strunprotect = get_string('blockunprotect', 'admin');
+ // Purge all caches related to blocks administration.
+ cache::make('core', 'plugininfo_block')->purge();
+
/// If data submitted, then process and store.
if (!empty($hide) && confirm_sesskey()) {
$returnurl = "$CFG->wwwroot/$CFG->admin/filters.php";
admin_externalpage_setup('managefilters');
+ // Purge all caches related to filter administration.
+ cache::make('core', 'plugininfo_filter')->purge();
+
$filters = filter_get_global_states();
// In case any new filters have been installed, but not put in the table yet.
$stractivitymodule = get_string("activitymodule");
$strshowmodulecourse = get_string('showmodulecourse');
+ // Purge all caches related to activity modules administration.
+ cache::make('core', 'plugininfo_mod')->purge();
+
/// If data submitted, then process and store.
if (!empty($hide) and confirm_sesskey()) {
$return = true; // direct back to the main page
+// Purge all caches related to portfolio administration.
+cache::make('core', 'plugininfo_portfolio')->purge();
+
/**
* Helper function that generates a moodle_url object
* relevant to the portfolio
require_sesskey();
}
+// Purge all caches related to repositories administration.
+cache::make('core', 'plugininfo_repository')->purge();
+
/**
* Helper function that generates a moodle_url object
* relevant to the repository
require_capability('moodle/filter:manage', $context);
$PAGE->set_context($context);
+// Purge all caches related to filter administration.
+cache::make('core', 'plugininfo_filter')->purge();
+
$args = array('contextid'=>$contextid);
$baseurl = new moodle_url('/filter/manage.php', $args);
if (!empty($forfilter)) {
'persistent' => true,
'persistentmaxsize' => 2,
),
+
+ // Cache used by the {@link plugininfo_base} class.
+ 'plugininfo_base' => array(
+ 'mode' => cache_store::MODE_APPLICATION,
+ 'simplekeys' => true,
+ 'simpledata' => true,
+ 'persistent' => true,
+ 'persistentmaxsize' => 2,
+ ),
+
+ // Cache used by the {@link plugininfo_mod} class.
+ 'plugininfo_mod' => array(
+ 'mode' => cache_store::MODE_APPLICATION,
+ 'simplekeys' => true,
+ 'simpledata' => true,
+ 'persistent' => true,
+ 'persistentmaxsize' => 1,
+ ),
+
+ // Cache used by the {@link plugininfo_block} class.
+ 'plugininfo_block' => array(
+ 'mode' => cache_store::MODE_APPLICATION,
+ 'simplekeys' => true,
+ 'simpledata' => true,
+ 'persistent' => true,
+ 'persistentmaxsize' => 1,
+ ),
+
+ // Cache used by the {@link plugininfo_filter} class.
+ 'plugininfo_filter' => array(
+ 'mode' => cache_store::MODE_APPLICATION,
+ 'simplekeys' => true,
+ 'simpledata' => true,
+ 'persistent' => true,
+ 'persistentmaxsize' => 1,
+ ),
+
+ // Cache used by the {@link plugininfo_repository} class.
+ 'plugininfo_repository' => array(
+ 'mode' => cache_store::MODE_APPLICATION,
+ 'simplekeys' => true,
+ 'simpledata' => true,
+ 'persistent' => true,
+ 'persistentmaxsize' => 1,
+ ),
+
+ // Cache used by the {@link plugininfo_portfolio} class.
+ 'plugininfo_portfolio' => array(
+ 'mode' => cache_store::MODE_APPLICATION,
+ 'simplekeys' => true,
+ 'simpledata' => true,
+ 'persistent' => true,
+ 'persistentmaxsize' => 1,
+ ),
+
);
// and new plugins can be detected.
cache::make('core', 'plugintypes')->purge();
cache::make('core', 'pluginlist')->purge();
+ cache::make('core', 'plugininfo_base')->purge();
+ cache::make('core', 'plugininfo_mod')->purge();
+ cache::make('core', 'plugininfo_block')->purge();
+ cache::make('core', 'plugininfo_filter')->purge();
+ cache::make('core', 'plugininfo_repository')->purge();
+ cache::make('core', 'plugininfo_portfolio')->purge();
// Check the main version first.
$version = null;
protected function get_version_from_config_plugins($plugin, $disablecache=false) {
global $DB;
- $cache = cache::make_from_params(cache_store::MODE_REQUEST, 'core_plugin', 'plugininfo_base',
- array(), array('simplekeys' => true, 'simpledata' => true));
+ $cache = cache::make('core', 'plugininfo_base');
$pluginversions = $cache->get('versions_db');
protected static function get_blocks_info($disablecache=false) {
global $DB;
- $cache = cache::make_from_params(cache_store::MODE_REQUEST, 'core_plugin', 'plugininfo_block',
- array(), array('simplekeys' => true, 'simpledata' => true));
+ $cache = cache::make('core', 'plugininfo_block');
$blocktypes = $cache->get('blocktypes');
protected static function get_global_states($disablecache=false) {
global $DB;
- $cache = cache::make_from_params(cache_store::MODE_REQUEST, 'core_plugin', 'plugininfo_filter',
- array(), array('simplekeys' => true, 'simpledata' => true));
+ $cache = cache::make('core', 'plugininfo_filter');
$globalstates = $cache->get('globalstates');
protected static function get_modules_info($disablecache=false) {
global $DB;
- $cache = cache::make_from_params(cache_store::MODE_REQUEST, 'core_plugin', 'plugininfo_mod',
- array(), array('simplekeys' => true, 'simpledata' => true));
+ $cache = cache::make('core', 'plugininfo_mod');
$modulesinfo = $cache->get('modulesinfo');
protected static function get_enabled_repositories($disablecache=false) {
global $DB;
- $cache = cache::make_from_params(cache_store::MODE_REQUEST, 'core_plugin', 'plugininfo_repository',
- array(), array('simplekeys' => true, 'simpledata' => true));
+ $cache = cache::make('core', 'plugininfo_repository');
$enabled = $cache->get('enabled');
protected static function get_enabled_portfolios($disablecache=false) {
global $DB;
- $cache = cache::make_from_params(cache_store::MODE_REQUEST, 'core_plugin', 'plugininfo_portfolio',
- array(), array('simplekeys' => true, 'simpledata' => true));
+ $cache = cache::make('core', 'plugininfo_portfolio');
$enabled = $cache->get('enabled');
require_login($course, false);
+// Purge all caches related to portfolio administration.
+cache::make('core', 'plugininfo_portfolio')->purge();
+
$PAGE->set_url($url);
$PAGE->set_context(context_user::instance($user->id));
$PAGE->set_title("$course->fullname: $fullname: $strportfolios");
defined('MOODLE_INTERNAL') || die();
-$version = 2013030800.02; // YYYYMMDD = weekly release date of this DEV branch
+$version = 2013030800.03; // YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes