Skip to content

Commit

Permalink
limit the number of courses to 20 on mymoodle page
Browse files Browse the repository at this point in the history
  • Loading branch information
toyomoyo committed Feb 13, 2007
1 parent 66c6220 commit 797c881
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions my/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
echo '<td valign="top" id="middle-column">';

/// The main overview in the middle of the page
$courses = get_my_courses($USER->id);

// limits the number of courses showing up
$courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', '*', false, 21);
$site = get_site();
$course = $site; //just in case we need the old global $course hack

Expand All @@ -74,7 +76,11 @@
} else {
print_overview($courses);
}


// if more than 20 courses
if (count($courses) > 20) {
echo '<br />...';
}

echo '</td>';

Expand Down

0 comments on commit 797c881

Please sign in to comment.