From: moodler Date: Wed, 15 Dec 2004 13:24:19 +0000 (+0000) Subject: Merged changes from stable (notice fix) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2d2da684c69212ae3d23ea000984b90538163e6e;p=moodle.git Merged changes from stable (notice fix) --- diff --git a/lib/datalib.php b/lib/datalib.php index 39e0dcf196..be01b7a9cf 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -2074,7 +2074,7 @@ function get_courses_page($categoryid="all", $sort="c.sortorder ASC", $fields="c if (!empty($categoryselect)) { $sqland = "AND "; } - if (!empty($USER)) { // May need to check they are a teacher + if (!empty($USER) and !empty($USER->id)) { // May need to check they are a teacher if (!iscreator()) { $visiblecourses = "$sqland ((c.visible > 0) OR t.userid = '$USER->id')"; $teachertable = "LEFT JOIN {$CFG->prefix}user_teachers t ON t.course=c.id";