From 8eb675a5557b1834032f9dc43b269dbd726b754a Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 26 Jan 2004 12:29:02 +0000 Subject: [PATCH] Added dividers --- mod/survey/index.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/mod/survey/index.php b/mod/survey/index.php index 41249f7662..7f56297b2d 100644 --- a/mod/survey/index.php +++ b/mod/survey/index.php @@ -43,16 +43,23 @@ $table->align = array ("LEFT", "LEFT"); } + $currentsection = ''; + foreach ($surveys as $survey) { if (survey_already_done($survey->id, $USER->id)) { $ss = $strdone; } else { $ss = $strnotdone; } - if ($survey->section) { - $section = "$survey->section"; - } else { - $section = ""; + $printsection = ""; + if ($survey->section !== $currentsection) { + if ($survey->section) { + $printsection = $survey->section; + } + if ($currentsection !== "") { + $table->data[] = 'hr'; + } + $currentsection = $survey->section; } //Calculate the href if (!$survey->visible) { @@ -64,7 +71,7 @@ } if ($course->format == "weeks" or $course->format == "topics") { - $table->data[] = array ($section, $tt_href, "coursemodule\">$ss"); + $table->data[] = array ($printsection, $tt_href, "coursemodule\">$ss"); } else { $table->data[] = array ($tt_href, "coursemodule\">$ss"); } -- 2.39.5