]> git.mjollnir.org Git - moodle.git/commitdiff
More fixes for robustness
authormoodler <moodler>
Mon, 13 Jan 2003 12:16:46 +0000 (12:16 +0000)
committermoodler <moodler>
Mon, 13 Jan 2003 12:16:46 +0000 (12:16 +0000)
course/edit.php
course/lib.php

index 2634a981cc6045950c64e69ebe35cc7f0d9e7a4d..737de6dc494c99a80745435d1fddc9b067185238 100644 (file)
@@ -75,7 +75,7 @@
 /// Otherwise fill and print the form.
 
     if (empty($form)) {
-        if ($course) {
+        if (!empty($course)) {
             $form = $course;
         } else {
             $form->startdate = time() + 3600 * 24;
@@ -87,6 +87,7 @@
             $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;
index fe047a7740febb549aca8b11658c2e751789eb73..8452c91d4db918abd960ad719a40a502d13eee23 100644 (file)
@@ -747,10 +747,12 @@ function print_course_categories($categories, $selected="none", $width=180) {
             }
         }
         $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);
     }
 }