id, "data", "view all", "index.php?id=$course->id", ""); $strweek = get_string('week'); $strtopic = get_string('topic'); $strname = get_string('name'); $strdata = get_string('modulename','data'); if (! $datas = get_all_instances_in_course("data", $course)) { notice("There are no databases", "../../course/view.php?id=$course->id"); } print_header_simple($strdata, "", $strdata, "", "", true, "", navmenu($course)); $timenow = time(); $strname = get_string('name'); $strweek = get_string('week'); $strtopic = get_string('topic'); $strdescription = get_string("description"); if ($course->format == 'weeks') { $table->head = array ($strweek, $strname, $strdescription); $table->align = array ('center', 'center', 'center'); } else if ($course->format == 'topics') { $table->head = array ($strtopic, $strname, $strdescription); $table->align = array ('center', 'center', 'center'); } else { $table->head = array ($strname); $table->align = array ('center', 'center'); } $currentgroup = get_current_group($course->id); if ($currentgroup and isteacheredit($course->id)) { $group = get_record("groups", "id", $currentgroup); $groupname = " ($group->name)"; } else { $groupname = ""; } $currentsection = ""; foreach ($datas as $data) { $printsection = ""; //Calculate the href if (!$data->visible) { //Show dimmed if the mod is hidden $link = "coursemodule\">".format_string($data->name,true).""; } else { //Show normal if the mod is visible $link = "coursemodule\">".format_string($data->name,true).""; } if ($course->format == 'weeks' or $course->format == 'topics') { $table->data[] = array ($printsection, $link, $data->intro); } else { $table->data[] = array ($link); } } echo "
"; print_table($table); print_footer($course); ?>