From 9ab344eebc3d4363d4a2cc20012148265482e155 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 28 Sep 2003 10:57:22 +0000 Subject: [PATCH] Now, when listing activities, entries are dimmed if they are hidden (teacher view). See bug 802. --- mod/attendance/index.php | 8 +++++++- mod/chat/index.php | 9 +++++++-- mod/glossary/index.php | 8 +++++++- mod/workshop/index.php | 19 ++++++++++++++++--- 4 files changed, 37 insertions(+), 7 deletions(-) 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); } -- 2.39.5