$joins = array();
- if ($course->category) {
+ if ($course->id != SITEID || $modid != 0) {
$joins[] = "l.course='$course->id'";
- } else {
+ }
+ if ($course->id == SITEID) {
$courses[0] = '';
- if ($ccc = get_courses("all", "c.id ASC", "c.id,c.shortname")) {
+ if ($ccc = get_courses('all', 'c.id ASC', 'c.id,c.shortname')) {
foreach ($ccc as $cc) {
- $courses[$cc->id] = "$cc->shortname";
+ $courses[$cc->id] = $cc->shortname;
}
}
}