From: stronk7 Date: Sun, 28 Sep 2003 10:57:22 +0000 (+0000) Subject: Now, when listing activities, entries are dimmed if they are hidden X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9ab344eebc3d4363d4a2cc20012148265482e155;p=moodle.git Now, when listing activities, entries are dimmed if they are hidden (teacher view). See bug 802. --- diff --git a/mod/attendance/index.php b/mod/attendance/index.php index 11418e7dc7..99f28cf045 100644 --- a/mod/attendance/index.php +++ b/mod/attendance/index.php @@ -58,7 +58,13 @@ } foreach ($attendances as $attendance) { - $link = "coursemodule\">$attendance->name"; + if (!$attendance->visible) { + //Show dimmed if the mod is hidden + $link = "coursemodule\">$attendance->name"; + } else { + //Show normal if the mod is visible + $link = "coursemodule\">$attendance->name"; + } if ($course->format == "weeks" or $course->format == "topics") { $table->data[] = array ($attendance->section, $link); diff --git a/mod/chat/index.php b/mod/chat/index.php index ec8867304c..2ab6fd9432 100644 --- a/mod/chat/index.php +++ b/mod/chat/index.php @@ -54,8 +54,13 @@ } foreach ($chats as $chat) { - $link = "coursemodule\">$chat->name"; - + if (!$chat->visible) { + //Show dimmed if the mod is hidden + $link = "coursemodule\">$chat->name"; + } else { + //Show normal if the mod is visible + $link = "coursemodule\">$chat->name"; + } if ($course->format == "weeks" or $course->format == "topics") { if ($chat->section) { $table->data[] = array ($chat->section, $link); diff --git a/mod/glossary/index.php b/mod/glossary/index.php index ff005c6334..bce65299ed 100644 --- a/mod/glossary/index.php +++ b/mod/glossary/index.php @@ -57,7 +57,13 @@ } foreach ($glossarys as $glossary) { - $link = "coursemodule\">$glossary->name"; + if (!$glossary->visible) { + //Show dimmed if the mod is hidden + $link = "coursemodule\">$glossary->name"; + } else { + //Show normal if the mod is visible + $link = "coursemodule\">$glossary->name"; + } if ($course->format == "weeks" or $course->format == "topics") { $table->data[] = array ($glossary->section, $link); diff --git a/mod/workshop/index.php b/mod/workshop/index.php index 304e5655f9..4a4d4be833 100644 --- a/mod/workshop/index.php +++ b/mod/workshop/index.php @@ -54,8 +54,15 @@ $submitted = "".userdate($submission->timecreated).""; } $due = userdate($workshop->deadline); - $link = "coursemodule\">$workshop->name
". - "($submission->title)"; + if (!$workshop->visible) { + //Show dimmed if the mod is hidden + $link = "coursemodule\">$workshop->name
". + "($submission->title)"; + } else { + //Show normal if the mod is visible + $link = "coursemodule\">$workshop->name
". + "($submission->title)"; + } if ($course->format == "weeks" or $course->format == "topics") { $table->data[] = array ($workshop->section, $link, $due, $submitted); } @@ -67,7 +74,13 @@ else { $submitted = get_string("no"); $due = userdate($workshop->deadline); - $link = "coursemodule\">$workshop->name"; + if (!$workshop->visible) { + //Show dimmed if the mod is hidden + $link = "coursemodule\">$workshop->name"; + } else { + //Show normal if the mod is visible + $link = "coursemodule\">$workshop->name"; + } if ($course->format == "weeks" or $course->format == "topics") { $table->data[] = array ($workshop->section, $link, $due, $submitted); }