mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Better dividers in the table
This commit is contained in:
parent
a1a6750357
commit
858c8a05e8
3 changed files with 37 additions and 19 deletions
|
@ -75,6 +75,8 @@
|
|||
$table->size = array ("*", "*", "*");
|
||||
}
|
||||
|
||||
$currentsection = "";
|
||||
|
||||
foreach ($quizzes as $quiz) {
|
||||
if (!$quiz->visible) {
|
||||
//Show dimmed if the mod is hidden
|
||||
|
@ -86,10 +88,15 @@
|
|||
|
||||
$bestgrade = quiz_get_best_grade($quiz->id, $USER->id);
|
||||
|
||||
if ($quiz->section) {
|
||||
$section = "$quiz->section";
|
||||
} else {
|
||||
$section = "";
|
||||
$printsection = "";
|
||||
if ($quiz->section !== $currentsection) {
|
||||
if ($quiz->section) {
|
||||
$printsection = $quiz->section;
|
||||
}
|
||||
if ($currentsection !== "") {
|
||||
$table->data[] = 'hr';
|
||||
}
|
||||
$currentsection = $quiz->section;
|
||||
}
|
||||
|
||||
$closequiz = userdate($quiz->timeclose);
|
||||
|
@ -113,7 +120,7 @@
|
|||
}
|
||||
|
||||
if ($course->format == "weeks" or $course->format == "topics") {
|
||||
$table->data[] = array ($section, $link, $closequiz, $gradecol);
|
||||
$table->data[] = array ($printsection, $link, $closequiz, $gradecol);
|
||||
} else {
|
||||
$table->data[] = array ($link, $closequiz, $gradecol);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue