Skip to content

Commit

Permalink
MDL-16568 Hiding courses with showgrades set to 0. Merging from MOODL…
Browse files Browse the repository at this point in the history
…E_19_STABLE
  • Loading branch information
nicolasconnault committed Oct 13, 2008
1 parent 985f0dd commit 252d14d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion grade/report/overview/lib.php
Expand Up @@ -113,10 +113,13 @@ public function fill_table() {
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
Expand Down

0 comments on commit 252d14d

Please sign in to comment.