/// Otherwise fill and print the form.
if (empty($form)) {
- if ($course) {
+ if (!empty($course)) {
$form = $course;
} else {
$form->startdate = time() + 3600 * 24;
$form->students = get_string("defaultcoursestudents");
$form->summary = get_string("defaultcoursesummary");
$form->format = "weeks";
+ $form->guest = 0;
$form->numsections = 10;
$form->newsitems = 5;
$form->showrecent = 1;
}
}
$catdata[] = "<A HREF=\"$CFG->wwwroot/course/index.php?category=all\">".get_string("fulllistofcourses")."</A>";
+ $caticon[] = "";
if (isset($USER->id)) {
$catdata[] = "<A HREF=\"$CFG->wwwroot/course/index.php?category=my\">".get_string("mycourses")."</A>";
+ $caticon[] = "";
}
- print_side_block(get_string("categories"), "", $catdata, $caticon, $showall.$mine, $width);
+ print_side_block(get_string("categories"), "", $catdata, $caticon, "", $width);
}
}