diff --git a/mod/attendance/index.php b/mod/attendance/index.php
index 11418e7dc77..99f28cf0455 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 ec8867304c9..2ab6fd9432d 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 ff005c63346..bce65299edb 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 304e5655f9a..4a4d4be8331 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);
}