Small improvement. Reducing the list of fields returned

by get_my_courses().

Merged from MOODLE_18_STABLE
This commit is contained in:
stronk7 2007-07-22 23:02:04 +00:00
parent 0315a841a3
commit e5797cd4ad

View File

@ -29,7 +29,7 @@ $allowed_time = array('weeknow', 'weeknext', 'monthnow', 'monthnext', 'recentupc
if(!empty($what) && !empty($time)) {
if(in_array($what, $allowed_what) && in_array($time, $allowed_time)) {
$courses = get_my_courses($user->id);
$courses = get_my_courses($user->id, NULL, 'id, visible, shortname');
$include_user = ($what == 'all');
if ($include_user) {
@ -99,7 +99,6 @@ if(!empty($what) && !empty($time)) {
die();
}
}
$whereclause = calendar_sql_where($timestart, $timeend, $include_user ? array($user->id) : false, false, array_keys($courses), false);
if($whereclause === false) {
$events = array();