Skip to content

Commit

Permalink
MDL-53031 mod_assign: add session check on assignment plugins management
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze authored and stronk7 committed Mar 8, 2016
1 parent 094fddd commit 01b19e7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions mod/assign/adminmanageplugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->dirroot.'/mod/assign/adminlib.php');

$subtype = required_param('subtype', PARAM_PLUGIN);
$action = optional_param('action', null, PARAM_PLUGIN);
$plugin = optional_param('plugin', null, PARAM_PLUGIN);

if (!empty($plugin)) {
require_sesskey();
}

// Create the class for this controller.
$pluginmanager = new assign_plugin_manager(required_param('subtype', PARAM_PLUGIN));
$pluginmanager = new assign_plugin_manager($subtype);

$PAGE->set_context(context_system::instance());

// Execute the controller.
$pluginmanager->execute(optional_param('action', null, PARAM_PLUGIN),
optional_param('plugin', null, PARAM_PLUGIN));
$pluginmanager->execute($action, $plugin);

0 comments on commit 01b19e7

Please sign in to comment.