MDL-87659 core: Hide "Details" section of checks Table when there are none

This commit is contained in:
Andrew Nicols
2026-01-21 13:01:41 +08:00
parent 3d8e9b8444
commit 8be48fd41e
+7 -3
View File
@@ -134,12 +134,16 @@ class table implements \renderable {
$html = \html_writer::table($table);
if ($this->detail && $result) {
$html .= $output->heading(get_string('details'), 3);
$html .= $output->box($result->get_details(), 'generalbox boxwidthnormal boxaligncenter');
$details = $result->get_details();
if (!empty($details)) {
$html .= $output->heading(get_string('details'), 3);
$html .= $output->box($details, 'generalbox boxwidthnormal boxaligncenter');
}
$html .= $output->continue_button($this->url);
}
return $html;
}
}