<?php
if ($usehtmleditor = can_use_richtext_editor()) {
$defaultformat = FORMAT_HTML;
- $onsubmit = "onsubmit=\"copyrichtext(document.form.description);\"";
} else {
$defaultformat = FORMAT_MOODLE;
- $onsubmit = "";
}
if (empty($form->name)) {
$form->name = "";
$table->align = array ("left", "left", "left");
}
+ $currentsection = "";
foreach ($chats as $chat) {
if (!$chat->visible) {
//Show dimmed if the mod is hidden
//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") {
+ $printsection = "";
+ if ($chat->section !== $currentsection) {
if ($chat->section) {
- $table->data[] = array ($chat->section, $link);
- } else {
- $table->data[] = array ("", $link);
+ $printsection = $chat->section;
+ }
+ if ($currentsection !== "") {
+ $table->data[] = 'hr';
}
+ $currentsection = $chat->section;
+ }
+ if ($course->format == "weeks" or $course->format == "topics") {
+ $table->data[] = array ($printsection, $link);
} else {
$table->data[] = array ($link);
}
$table->align = array ("LEFT", "LEFT");
}
+ $currentsection = "";
+
foreach ($choices as $choice) {
if (!empty($answers[$choice->id])) {
$answer = $answers[$choice->id];
} else {
$aa = "";
}
- if (!empty($choice->section)) {
- $section = "$choice->section";
- } else {
- $section = "";
+ $printsection = "";
+ if ($choice->section !== $currentsection) {
+ if ($choice->section) {
+ $printsection = $choice->section;
+ }
+ if ($currentsection !== "") {
+ $table->data[] = 'hr';
+ }
+ $currentsection = $choice->section;
}
//Calculate the href
if (!$choice->visible) {
//Show dimmed if the mod is hidden
- $tt_href = "<A class=\"dimmed\" HREF=\"view.php?id=$choice->coursemodule\">$choice->name</A>";
+ $tt_href = "<a class=\"dimmed\" href=\"view.php?id=$choice->coursemodule\">$choice->name</a>";
} else {
//Show normal if the mod is visible
- $tt_href = "<A HREF=\"view.php?id=$choice->coursemodule\">$choice->name</A>";
+ $tt_href = "<a href=\"view.php?id=$choice->coursemodule\">$choice->name</a>";
}
if ($course->format == "weeks" || $course->format == "topics") {
- $table->data[] = array ($section, $tt_href, $aa);
+ $table->data[] = array ($printsection, $tt_href, $aa);
} else {
$table->data[] = array ($tt_href, $aa);
}
}
- echo "<BR>";
+ echo "<br />";
print_table($table);
print_footer($course);