]> git.mjollnir.org Git - moodle.git/commitdiff
Now, when listing activities, entries are dimmed if they are hidden
authorstronk7 <stronk7>
Sun, 28 Sep 2003 10:57:22 +0000 (10:57 +0000)
committerstronk7 <stronk7>
Sun, 28 Sep 2003 10:57:22 +0000 (10:57 +0000)
(teacher view). See bug 802.

mod/attendance/index.php
mod/chat/index.php
mod/glossary/index.php
mod/workshop/index.php

index 11418e7dc7702e46eac5e8ed55dc70553b24cbbd..99f28cf0455bd88ee2ae8195e53512483356519e 100644 (file)
     }
 
     foreach ($attendances as $attendance) {
-        $link = "<A HREF=\"view.php?id=$attendance->coursemodule\">$attendance->name</A>";
+        if (!$attendance->visible) {
+            //Show dimmed if the mod is hidden
+            $link = "<A class=\"dimmed\" HREF=\"view.php?id=$attendance->coursemodule\">$attendance->name</A>";
+        } else {
+            //Show normal if the mod is visible
+            $link = "<A HREF=\"view.php?id=$attendance->coursemodule\">$attendance->name</A>";
+        }
 
         if ($course->format == "weeks" or $course->format == "topics") {
             $table->data[] = array ($attendance->section, $link);
index ec8867304c91cbd89894bb78148ce66e07e45647..2ab6fd9432dac3f813fb793f46c87e3e6bdc366f 100644 (file)
     }
 
     foreach ($chats as $chat) {
-        $link = "<a href=\"view.php?id=$chat->coursemodule\">$chat->name</a>";
-
+        if (!$chat->visible) {
+            //Show dimmed if the mod is hidden
+            $link = "<a class=\"dimmed\" href=\"view.php?id=$chat->coursemodule\">$chat->name</a>";
+        } else {
+            //Show normal if the mod is visible
+            $link = "<a href=\"view.php?id=$chat->coursemodule\">$chat->name</a>";
+        }
         if ($course->format == "weeks" or $course->format == "topics") {
             if ($chat->section) {
                 $table->data[] = array ($chat->section, $link);
index ff005c63346beaa3aaf75ae0d2965683f58810db..bce65299edb61d7d38e86a35052deaa3f3c4d2e9 100644 (file)
     }
 
     foreach ($glossarys as $glossary) {
-        $link = "<A HREF=\"view.php?id=$glossary->coursemodule\">$glossary->name</A>";
+        if (!$glossary->visible) {
+            //Show dimmed if the mod is hidden
+            $link = "<A class=\"dimmed\" HREF=\"view.php?id=$glossary->coursemodule\">$glossary->name</A>";
+        } else {
+            //Show normal if the mod is visible
+            $link = "<A HREF=\"view.php?id=$glossary->coursemodule\">$glossary->name</A>";
+        }
 
         if ($course->format == "weeks" or $course->format == "topics") {
             $table->data[] = array ($glossary->section, $link);
index 304e5655f9a96e7baaadbce46d7868a5aca5b95a..4a4d4be8331d7b5aa9ce146da3d5df7e5c68ed68 100644 (file)
                                        $submitted = "<FONT COLOR=red>".userdate($submission->timecreated)."</FONT>";
                                        }
                                $due = userdate($workshop->deadline);
-                               $link = "<A HREF=\"view.php?id=$workshop->coursemodule\">$workshop->name</A><BR>".
-                                       "($submission->title)";
+                                if (!$workshop->visible) {
+                                    //Show dimmed if the mod is hidden
+                                   $link = "<A class=\"dimmed\" HREF=\"view.php?id=$workshop->coursemodule\">$workshop->name</A><BR>".
+                                           "($submission->title)";
+                                } else {
+                                    //Show normal if the mod is visible
+                                   $link = "<A HREF=\"view.php?id=$workshop->coursemodule\">$workshop->name</A><BR>".
+                                           "($submission->title)";
+                                }
                                if ($course->format == "weeks" or $course->format == "topics") {
                                        $table->data[] = array ($workshop->section, $link, $due, $submitted);
                                        } 
                else {
             $submitted = get_string("no");
                        $due = userdate($workshop->deadline);
-                       $link = "<A HREF=\"view.php?id=$workshop->coursemodule\">$workshop->name</A>";
+                        if (!$workshop->visible) {
+                            //Show dimmed if the mod is hidden
+                            $link = "<A class=\"dimmed\" HREF=\"view.php?id=$workshop->coursemodule\">$workshop->name</A>";
+                        } else {
+                            //Show normal if the mod is visible
+                            $link = "<A HREF=\"view.php?id=$workshop->coursemodule\">$workshop->name</A>";
+                        }
                        if ($course->format == "weeks" or $course->format == "topics") {
                                $table->data[] = array ($workshop->section, $link, $due, $submitted);
                                }