mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merged MDL-13245 from 1.9
This commit is contained in:
parent
86ef7676c8
commit
f1401c244e
1 changed files with 9 additions and 7 deletions
|
@ -73,6 +73,7 @@ class block_admin extends block_list {
|
||||||
/// find all accessible reports
|
/// find all accessible reports
|
||||||
if ($course->id !== SITEID) {
|
if ($course->id !== SITEID) {
|
||||||
$reportavailable = false;
|
$reportavailable = false;
|
||||||
|
if (!empty($course->showgrades)) {
|
||||||
if ($reports = get_list_of_plugins('grade/report')) { // Get all installed reports
|
if ($reports = get_list_of_plugins('grade/report')) { // Get all installed reports
|
||||||
arsort($reports); // user is last, we want to test it first
|
arsort($reports); // user is last, we want to test it first
|
||||||
foreach ($reports as $plugin) {
|
foreach ($reports as $plugin) {
|
||||||
|
@ -83,6 +84,7 @@ class block_admin extends block_list {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($reportavailable) {
|
if ($reportavailable) {
|
||||||
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/report/index.php?id='.$this->instance->pageid.'">'.get_string('grades').'</a>';
|
$this->content->items[]='<a href="'.$CFG->wwwroot.'/grade/report/index.php?id='.$this->instance->pageid.'">'.get_string('grades').'</a>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue