From ff828023661be70fcd8375614248d848fcd0bfae Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 4 May 2003 13:44:56 +0000 Subject: [PATCH] Slightly better logic --- course/topics.php | 64 ++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/course/topics.php b/course/topics.php index 83ddb1bd80..1b7b988310 100644 --- a/course/topics.php +++ b/course/topics.php @@ -117,10 +117,8 @@ } echo ""; - echo "cellheading\" class=\"topicsoutlineside\" valign=top align=center width=10> "; - echo "id&topic=all\" title=\"$strshowalltopics\">

"; - echo ""; - echo ""; + echo "cellheading\" class=\"topicsoutlineside\" valign=top align=center width=10>"; + echo " "; echo ""; } @@ -173,9 +171,7 @@ if (!isteacher($course->id) and !$thissection->visible) { // Hidden for students echo ""; echo get_string("notavailable"); - echo ""; - echo " "; - echo ""; + echo ""; } else { echo ""; @@ -196,40 +192,40 @@ } echo ""; - echo ""; - echo ""; + } + echo ""; + echo ""; - if ($displaysection == $section) { // Show the zoom boxes - echo "id&topic=all\" title=\"$strshowalltopics\">". - "
"; + if ($displaysection == $section) { // Show the zoom boxes + echo "id&topic=all\" title=\"$strshowalltopics\">". + "
"; + } else { + $strshowonlytopic = get_string("showonlytopic", "", $section); + echo "id&topic=$section\" title=\"$strshowonlytopic\">". + "
"; + } + + if (isediting($course->id)) { + if ($course->marker == $section) { // Show the "light globe" on/off + echo "id&marker=0\" title=\"$strmarkedthistopic\">". + "
"; } else { - $strshowonlytopic = get_string("showonlytopic", "", $section); - echo "id&topic=$section\" title=\"$strshowonlytopic\">". - "
"; + echo "id&marker=$section\" title=\"$strmarkthistopic\">". + "
"; } - if (isediting($course->id)) { - if ($course->marker == $section) { // Show the "light globe" on/off - echo "id&marker=0\" title=\"$strmarkedthistopic\">". - "
"; - } else { - echo "id&marker=$section\" title=\"$strmarkthistopic\">". - "
"; - } - - if ($thissection->visible) { // Show the hide/show eye - echo "id&hide=$section\" title=\"$strtopichide\">". - "
"; - } else { - echo "id&show=$section\" title=\"$strtopicshow\">". - "
"; - } - + if ($thissection->visible) { // Show the hide/show eye + echo "id&hide=$section\" title=\"$strtopichide\">". + "
"; + } else { + echo "id&show=$section\" title=\"$strtopicshow\">". + "
"; } - echo ""; - echo ""; } + + echo ""; + echo ""; echo ""; $section++; -- 2.39.5