]> git.mjollnir.org Git - moodle.git/commitdiff
Changed to show the hidden choices dimmed (bug #364)
authorstronk7 <stronk7>
Thu, 24 Apr 2003 16:47:06 +0000 (16:47 +0000)
committerstronk7 <stronk7>
Thu, 24 Apr 2003 16:47:06 +0000 (16:47 +0000)
mod/choice/index.php

index 6e043dc7427e0cecb292b66c673eb3f7ebb32fbf..afcff8d1c08a3ce324288c353214f4beafeaab44 100644 (file)
         } else {
             $section = "";
         }
-
+        
+        //Calculate the href
+        if (!$choice->visible) {
+            //Show dimmed if the mod is hidden
+            $tt_href = "<A class=\"dimmed\" HREF=\"view.php?id=$choice->coursemodule\">$choice->name</A>";
+        } else {
+            //Show normal if the mod is visible
+            $tt_href = "<A HREF=\"view.php?id=$choice->coursemodule\">$choice->name</A>";
+        }
         if ($course->format == "weeks" || $course->format == "topics") {
-            $table->data[] = array ($section,
-                                    "<A HREF=\"view.php?id=$choice->coursemodule\">$choice->name</A>",
-                                    $aa);
+            $table->data[] = array ($section, $tt_href, $aa);
         } else {
-            $table->data[] = array ("<A HREF=\"view.php?id=$choice->coursemodule\">$choice->name</A>",
-                                    $aa);
+            $table->data[] = array ($tt_href, $aa);
         }
     }
     echo "<BR>";