From: skodak Date: Sat, 26 Sep 2009 18:22:12 +0000 (+0000) Subject: MDL-20311 refactoring regression - thanks Clyde Tan for noticing this X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9c2d5353a80a44c21c44da7c8c2344cfd7b0f759;p=moodle.git MDL-20311 refactoring regression - thanks Clyde Tan for noticing this --- diff --git a/grade/lib.php b/grade/lib.php index c772da6c64..3b7b858b48 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -498,7 +498,7 @@ function grade_get_plugin_info($courseid, $active_type, $active_plugin) { // Remove ones we can't see foreach ($reports as $plugin => $unused) { if (!has_capability('gradereport/'.$plugin.':view', $context)) { - unset($reports[$key]); + unset($reports[$plugin]); } } } @@ -633,7 +633,7 @@ function grade_get_plugin_info($courseid, $active_type, $active_plugin) { if ($imports = get_plugin_list('gradeimport')) { // Get all installed import plugins foreach ($imports as $plugin => $plugindir) { // Remove ones we can't see if (!has_capability('gradeimport/'.$plugin.':view', $context)) { - unset($imports[$key]); + unset($imports[$plugin]); } } } diff --git a/grade/report/index.php b/grade/report/index.php index 864e70ea88..718adb894b 100644 --- a/grade/report/index.php +++ b/grade/report/index.php @@ -31,7 +31,7 @@ $reports = get_plugin_list('gradereport'); // Get all installed reports foreach ($reports as $plugin => $plugindir) { // Remove ones we can't see if (!has_capability('gradereport/'.$plugin.':view', $context)) { - unset($reports[$key]); + unset($reports[$plugin]); } }