Doesn't display discussions AND forums in the Activities

This commit is contained in:
martin 2002-07-20 18:50:23 +00:00
parent 37b155148d
commit c31ebf26c7
3 changed files with 4 additions and 6 deletions

View file

@ -67,9 +67,6 @@
$modicon = array(); $modicon = array();
if ($modtype) { if ($modtype) {
foreach ($modtype as $modname => $modfullname) { foreach ($modtype as $modname => $modfullname) {
if ($modname == "discuss") {
continue; // Covered by forum
}
$moddata[] = "<A HREF=\"../mod/$modname/index.php?id=$course->id\">".$modfullname."s</A>"; $moddata[] = "<A HREF=\"../mod/$modname/index.php?id=$course->id\">".$modfullname."s</A>";
$modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$modfullname\">"; $modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$modfullname\">";
} }

View file

@ -50,6 +50,10 @@
$mods[$mod->id] = $mod; $mods[$mod->id] = $mod;
$modtype[$mod->modname] = $mod->modfullname; $modtype[$mod->modname] = $mod->modfullname;
} }
if (isset($modtype["forum"]) and isset($modtype["discuss"])) {
// We only need one of them
unset($modtype["discuss"]);
}
ksort($modtype); ksort($modtype);
} }

View file

@ -50,9 +50,6 @@
$modicon = array(); $modicon = array();
if ($modtype) { if ($modtype) {
foreach ($modtype as $modname => $modfullname) { foreach ($modtype as $modname => $modfullname) {
if ($modname == "discuss") {
continue; // Covered by forum
}
$moddata[] = "<A HREF=\"../mod/$modname/index.php?id=$course->id\">".$modfullname."s</A>"; $moddata[] = "<A HREF=\"../mod/$modname/index.php?id=$course->id\">".$modfullname."s</A>";
$modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$modfullname\">"; $modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$modfullname\">";
} }