From 71bd9d206679813001f4b6ed3ee6d542941e8067 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Tue, 18 Oct 2011 16:39:54 +0200 Subject: [PATCH] Trivial rename of the active method selector param --- grade/grading/manage.php | 20 ++++++++++---------- grade/grading/renderer.php | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/grade/grading/manage.php b/grade/grading/manage.php index ec29d9f1455..1fff61cf014 100644 --- a/grade/grading/manage.php +++ b/grade/grading/manage.php @@ -25,12 +25,12 @@ require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); require_once($CFG->dirroot.'/grade/grading/lib.php'); -$areaid = optional_param('areaid', null, PARAM_INT); -$contextid = optional_param('contextid', null, PARAM_INT); -$component = optional_param('component', null, PARAM_COMPONENT); -$area = optional_param('area', null, PARAM_AREA); -$returnurl = optional_param('returnurl', null, PARAM_LOCALURL); -$activemethod = optional_param('activemethod', null, PARAM_PLUGIN); +$areaid = optional_param('areaid', null, PARAM_INT); +$contextid = optional_param('contextid', null, PARAM_INT); +$component = optional_param('component', null, PARAM_COMPONENT); +$area = optional_param('area', null, PARAM_AREA); +$returnurl = optional_param('returnurl', null, PARAM_LOCALURL); +$setmethod = optional_param('setmethod', null, PARAM_PLUGIN); if (!is_null($areaid)) { // get manager by id @@ -65,13 +65,13 @@ $PAGE->set_heading(get_string('gradingmanagement', 'core_grading')); $output = $PAGE->get_renderer('core_grading'); // process the eventual change of the active grading method -if (!empty($activemethod)) { +if (!empty($setmethod)) { require_sesskey(); - if ($activemethod == 'none') { + if ($setmethod == 'none') { // here we expect that noone would actually want to call their plugin as 'none' - $activemethod = null; + $setmethod = null; } - $manager->set_active_method($activemethod); + $manager->set_active_method($setmethod); redirect($PAGE->url); } diff --git a/grade/grading/renderer.php b/grade/grading/renderer.php index fa4ba468002..173f07b4265 100644 --- a/grade/grading/renderer.php +++ b/grade/grading/renderer.php @@ -44,7 +44,7 @@ class core_grading_renderer extends plugin_renderer_base { $methods = $manager->get_available_methods(false); $methods['none'] = get_string('gradingmethodnone', 'core_grading'); $selector = new single_select(new moodle_url($targeturl, array('sesskey' => sesskey())), - 'activemethod', $methods, empty($method) ? 'none' : $method, null, 'activemethodselector'); + 'setmethod', $methods, empty($method) ? 'none' : $method, null, 'activemethodselector'); $selector->set_label(get_string('changeactivemethod', 'core_grading')); $selector->set_help_icon('gradingmethod', 'core_grading'); -- 2.43.0