]> git.mjollnir.org Git - moodle.git/commitdiff
Changed to show the hidden surveys dimmed (bug #364)
authorstronk7 <stronk7>
Thu, 24 Apr 2003 18:28:30 +0000 (18:28 +0000)
committerstronk7 <stronk7>
Thu, 24 Apr 2003 18:28:30 +0000 (18:28 +0000)
mod/survey/index.php

index 12bcfc56ce811502fa48d278d4f238c4defc1330..237c85afdd17083f3a78d7f3825ae782b2d921ef 100644 (file)
         } else {
             $section = "";
         }
+        //Calculate the href
+        if (!$survey->visible) {
+            //Show dimmed if the mod is hidden
+            $tt_href = "<A class=\"dimmed\" HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>";
+        } else {
+            //Show normal if the mod is visible
+            $tt_href = "<A HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>";
+        }
+
         if ($course->format == "weeks" or $course->format == "topics") {
-            $table->data[] = array ($section, 
-                                    "<A HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>",
-                                    "<A HREF=\"view.php?id=$survey->coursemodule\">$ss</A>");
+            $table->data[] = array ($section, $tt_href, "<A HREF=\"view.php?id=$survey->coursemodule\">$ss</A>");
         } else {
-            $table->data[] = array ("<A HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>",
-                                    "<A HREF=\"view.php?id=$survey->coursemodule\">$ss</A>");
+            $table->data[] = array ($tt_href, "<A HREF=\"view.php?id=$survey->coursemodule\">$ss</A>");
         }
     }