Skip to content

Commit

Permalink
"MDL-13224, select how many courses can be shown in mymoodle page"
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng committed Apr 1, 2009
1 parent 8ef19a1 commit ebb1a1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions admin/settings/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@

$temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin'));
$temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0));
$temp->add(new admin_setting_configtext('mycoursesperpage', get_string('mycoursesperpage', 'admin'), get_string('configmycoursesperpage', 'admin'), 21, PARAM_INT));
$ADMIN->add('appearance', $temp);

// new CFG variable for coursemanager (what roles to display)
Expand Down
6 changes: 5 additions & 1 deletion my/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@
/// The main overview in the middle of the page

// limits the number of courses showing up
$courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', '*', false, 21);
$courses_limit = 21;
if (!empty($CFG->mycoursesperpage) && is_int($CFG->mycoursesperpage)) {
$courses_limit = $CFG->mycoursesperpage;
}
$courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', '*', false, $CFG->mycoursesperpage);
$site = get_site();
$course = $site; //just in case we need the old global $course hack

Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)

$version = 2009033100; // YYYYMMDD = date of the last version bump
$version = 2009040100; // YYYYMMDD = date of the last version bump
// XX = daily increments

$release = '2.0 dev (Build: 20090401)'; // Human-friendly version name
Expand Down

0 comments on commit ebb1a1e

Please sign in to comment.