Skip to content

Commit 4b64274

Browse files
committed
freetext-healthcheck - Tidy healthcheck table
1 parent 8b8d618 commit 4b64274

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

adminui/healthcheck.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,20 @@
8989
$healthcheck = new stack_cas_healthcheck($config);
9090
$tab = '';
9191
foreach ($healthcheck->get_test_results() as $test) {
92-
$tl = '';
93-
if (true === $test['result']) {
94-
$tl .= html_writer::tag('td', stack_string('testsuitepass'));
95-
} else if (false === $test['result']) {
96-
$tl .= html_writer::tag('td', stack_string('testsuitefail'));
97-
} else {
98-
$tl .= html_writer::tag('td', ' ');
92+
if ($test['summary']) {
93+
$tl = '';
94+
if (true === $test['result']) {
95+
$tl .= html_writer::tag('td', stack_string('testsuitepass'));
96+
} else if (false === $test['result']) {
97+
$tl .= html_writer::tag('td', stack_string('testsuitefail'));
98+
} else {
99+
$tl .= html_writer::tag('td', ' ');
100+
}
101+
$tl .= html_writer::tag('td', $test['summary']);
102+
$tab .= html_writer::tag('tr', $tl) . "\n";
99103
}
100-
$tl .= html_writer::tag('td', $test['summary']);
101-
$tab .= html_writer::tag('tr', $tl) . "\n";
102104
}
103-
echo html_writer::tag('table', $tab);
105+
echo html_writer::tag('table', $tab, ['class' => 'generaltable table']);
104106
if ($healthcheck->get_overall_result()) {
105107
echo html_writer::tag('p', stack_string('healthcheckpass'), ['class' => 'overallresult pass']);
106108
} else {

0 commit comments

Comments
 (0)