From bdbc743c1f5d08962fa5d0d67c85d0488ffd0035 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Thu, 2 Jul 2009 12:43:19 +0000 Subject: [PATCH] Fix some grader report breakage. --- grade/lib.php | 6 +++--- grade/report/grader/index.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grade/lib.php b/grade/lib.php index e99944e4694..eafc5bc888a 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -640,7 +640,7 @@ function grade_get_plugin_info($courseid, $active_type, $active_plugin) { } $importnames = array(); if (!empty($imports)) { - foreach ($imports as $plugin) { + foreach ($imports as $plugin => $plugindir) { $pluginstr = get_string('modulename', 'gradeimport_'.$plugin); $url = $url_prefix.'import/'.$plugin.'/index.php?id='.$courseid; if ($active_type == 'import' and $active_plugin == $plugin ) { @@ -657,9 +657,9 @@ function grade_get_plugin_info($courseid, $active_type, $active_plugin) { // standard export plugins if ($exports = get_plugin_list('gradeexport')) { // Get all installed export plugins - foreach ($exports as $key => $plugin) { // Remove ones we can't see + foreach ($exports as $plugin => $plugindir) { // Remove ones we can't see if (!has_capability('gradeexport/'.$plugin.':view', $context)) { - unset($exports[$key]); + unset($exports[$plugin]); } } } diff --git a/grade/report/grader/index.php b/grade/report/grader/index.php index 45aea1efe3b..ab9142ffc2e 100644 --- a/grade/report/grader/index.php +++ b/grade/report/grader/index.php @@ -155,7 +155,7 @@ $numusers = $report->get_numusers(); $report->load_final_grades(); /// Print header -print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, null, $buttons); +print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons); echo $report->group_selector; echo '
';