mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-16568 Hiding courses with showgrades set to 0. Merging from MOODLE_19_STABLE
This commit is contained in:
parent
985f0ddd20
commit
252d14db78
@ -113,10 +113,13 @@ class grade_report_overview extends grade_report {
|
||||
global $CFG;
|
||||
|
||||
// MDL-11679, only show 'mycourses' instead of all courses
|
||||
if ($courses = get_my_courses($this->user->id, 'c.sortorder ASC', 'id, shortname')) {
|
||||
if ($courses = get_my_courses($this->user->id, 'c.sortorder ASC', 'id, shortname, showgrades')) {
|
||||
$numusers = $this->get_numusers(false);
|
||||
|
||||
foreach ($courses as $course) {
|
||||
if (!$course->showgrades) {
|
||||
continue;
|
||||
}
|
||||
$courselink = '<a href="'.$CFG->wwwroot.'/grade/report/user/index.php?id='.$course->id.'">'.$course->shortname.'</a>';
|
||||
|
||||
// Get course grade_item
|
||||
|
Loading…
x
Reference in New Issue
Block a user