Minor formatting tweaks

This commit is contained in:
martin 2002-06-25 16:42:34 +00:00
parent 51feb9d56c
commit 77775bff99
3 changed files with 37 additions and 11 deletions

View file

@ -21,8 +21,16 @@
notice("There are no surveys.", "../../course/view.php?id=$course->id");
}
$table->head = array ("Week", "Name", "Status");
$table->align = array ("CENTER", "LEFT", "LEFT");
if ($course->format == "weeks") {
$table->head = array ("Week", "Name", "Status");
$table->align = array ("CENTER", "LEFT", "LEFT");
} else if ($course->format == "topics") {
$table->head = array ("Topic", "Name", "Status");
$table->align = array ("CENTER", "LEFT", "LEFT");
} else {
$table->head = array ("Name", "Status");
$table->align = array ("LEFT", "LEFT");
}
foreach ($surveys as $survey) {
if (survey_already_done($survey->id, $USER->id)) {
@ -30,9 +38,14 @@
} else {
$ss = "<A HREF=\"view.php?id=$survey->coursemodule\">Not done yet</A>";
}
$table->data[] = array ("$survey->section",
"<A HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>",
"$ss");
if ($course->format == "weeks" or $course->format == "topics") {
$table->data[] = array ("$survey->section",
"<A HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>",
"$ss");
} else {
$table->data[] = array ("<A HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>",
"$ss");
}
}
print_table($table);