Skip to content

Commit

Permalink
Added dividers
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Jan 26, 2004
1 parent 9328530 commit 8eb675a
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions mod/survey/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -64,7 +71,7 @@
}

if ($course->format == "weeks" or $course->format == "topics") {
$table->data[] = array ($section, $tt_href, "<A HREF=\"view.php?id=$survey->coursemodule\">$ss</A>");
$table->data[] = array ($printsection, $tt_href, "<A HREF=\"view.php?id=$survey->coursemodule\">$ss</A>");
} else {
$table->data[] = array ($tt_href, "<A HREF=\"view.php?id=$survey->coursemodule\">$ss</A>");
}
Expand Down

0 comments on commit 8eb675a

Please sign in to comment.