From: moodler Date: Wed, 3 Sep 2003 12:13:08 +0000 (+0000) Subject: Some cleaning up and improvement of the course listings, especially when X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b48f834cfb8999e1aa897f899dbaf9569e52acb5;p=moodle.git Some cleaning up and improvement of the course listings, especially when courses are listed under multiple categories --- diff --git a/course/info.php b/course/info.php index 9758fd47ba..e347c26854 100644 --- a/course/info.php +++ b/course/info.php @@ -53,7 +53,11 @@ if (!$teacher->role) { $teacher->role = $course->teacher; } - echo "$teacher->role: wwwroot/user/view.php?id=$teacher->id&course=$site->id\">$teacher->firstname $teacher->lastname
"; + echo "$teacher->role: "; + link_to_popup_window ("/user/view.php?id=$teacher->id&course=$site->id", "opener", + "$teacher->firstname $teacher->lastname", 400, 500, "$teacher->role", + ""); + echo "
"; } } echo "

"; diff --git a/course/lib.php b/course/lib.php index b22fc98bb0..0784ce4692 100644 --- a/course/lib.php +++ b/course/lib.php @@ -907,8 +907,6 @@ function print_whole_category_list($category=NULL, $displaylist=NULL, $parentsli } else { $category->id = "0"; - echo ""; - $toplevel = true; } if ($categories = get_categories($category->id)) { // Print all the children recursively @@ -928,10 +926,6 @@ function print_whole_category_list($category=NULL, $displaylist=NULL, $parentsli print_whole_category_list($cat, $displaylist, $parentslist, $depth + 1); } } - - if (isset($toplevel)) { - echo "
"; - } } @@ -940,68 +934,87 @@ function print_category_info($category, $depth) { /// This function is only used by print_whole_category_list() above global $CFG; + static $strallowguests, $strrequireskey, $strsummary; - $strallowguests = get_string("allowguests"); - $strrequireskey = get_string("requireskey"); + if (empty($strsummary)) { + $strallowguests = get_string("allowguests"); + $strrequireskey = get_string("requireskey"); + $strsummary = get_string("summary"); + } if (empty($THEME->custompix)) { $pixpath = "$CFG->wwwroot/pix"; } else { $pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix"; } - - echo ""; - echo ""; - for ($i=0; $i<$depth;$i++) { - echo "