]> git.mjollnir.org Git - moodle.git/commitdiff
Added a box to display subcategories
authormoodler <moodler>
Mon, 11 Aug 2003 13:02:45 +0000 (13:02 +0000)
committermoodler <moodler>
Mon, 11 Aug 2003 13:02:45 +0000 (13:02 +0000)
course/category.php

index b48c05f39e82bbe3eafdc4066d7a109c54c5edc2..39ea3ca9a924e0245210cb6a16a1a4a75e50dc4e 100644 (file)
 
     } // End of editing stuff
 
+/// Print out all the sub-categories
+
+    if ($subcategories = get_records("course_categories", "parent", $category->id)) {
+        echo "<table align=\"center\" border=0 cellspacing=2 cellpadding=4 class=\"generalbox\">";
+        echo "<tr><th>".get_string("subcategories")."</th></tr>";
+        echo "<tr><td nowrap>";
+        foreach ($subcategories as $subcategory) {
+            echo "<a href=\"category.php?id=$subcategory->id\">$subcategory->name</a><br />";
+        }
+        echo "</td></tr></table>";
+        echo "<br />";
+    }
     
+
 /// Print out all the courses
 
     if (!$courses = get_courses($category->id)) {