id, "wiki", "view all", "index.php?id=$course->id", ""); /// Get all required strings $strwikis = get_string("modulenameplural", "wiki"); $strwiki = get_string("modulename", "wiki"); /// Print the header $navlinks = array(); $navlinks[] = array('name' => $strwikis, 'link' => "index.php?id=$course->id", 'type' => 'activity'); $navigation = build_navigation($navlinks); print_header_simple("$strwikis", "", $navigation, "", "", true, "", navmenu($course)); /// Get all the appropriate data if (! $wikis = get_all_instances_in_course("wiki", $course)) { notice(get_string('thereareno', 'moodle', $strwikis), "../../course/view.php?id=$course->id"); die; } /// Print the list of instances (your module will probably extend this) $timenow = time(); $strname = get_string('wikiname', 'wiki'); $strsummary = get_string('summary'); $strtype = get_string('wikitype', 'wiki'); $strlastmodified = get_string('lastmodified'); $strweek = get_string('week'); $strtopic = get_string('topic'); if ($course->format == "weeks") { $table->head = array ($strweek, $strname, $strsummary, $strtype, $strlastmodified); $table->align = array ('CENTER', 'LEFT', 'LEFT', 'LEFT', 'LEFT'); } else if ($course->format == "topics") { $table->head = array ($strtopic, $strname, $strsummary, $strtype, $strlastmodified); $table->align = array ('CENTER', 'LEFT', 'LEFT', 'LEFT', 'LEFT'); } else { $table->head = array ($strname, $strsummary, $strtype, $strlastmodified); $table->align = array ('LEFT', 'LEFT', 'LEFT', 'LEFT'); } foreach ($wikis as $wiki) { if (!$wiki->visible) { //Show dimmed if the mod is hidden $link = ''.format_string($wiki->name,true).''; } else { //Show normal if the mod is visible $link = ''.format_string($wiki->name,true).''; } $timmod = ''.userdate($wiki->timemodified).''; $summary = '