diff --git a/mod/survey/index.php b/mod/survey/index.php
index 12bcfc56ce8..237c85afdd1 100644
--- a/mod/survey/index.php
+++ b/mod/survey/index.php
@@ -54,13 +54,19 @@
} else {
$section = "";
}
- if ($course->format == "weeks" or $course->format == "topics") {
- $table->data[] = array ($section,
- "coursemodule\">$survey->name",
- "coursemodule\">$ss");
+ //Calculate the href
+ if (!$survey->visible) {
+ //Show dimmed if the mod is hidden
+ $tt_href = "coursemodule\">$survey->name";
} else {
- $table->data[] = array ("coursemodule\">$survey->name",
- "coursemodule\">$ss");
+ //Show normal if the mod is visible
+ $tt_href = "coursemodule\">$survey->name";
+ }
+
+ if ($course->format == "weeks" or $course->format == "topics") {
+ $table->data[] = array ($section, $tt_href, "coursemodule\">$ss");
+ } else {
+ $table->data[] = array ($tt_href, "coursemodule\">$ss");
}
}