$settingsurl = new moodle_url('/admin/settings.php', array('section' => 'additionalhtml'));
    echo html_writer::tag('p', stack_string('healthchecklatexmathjax', $settingsurl->out()));
    echo html_writer::tag('textarea', s(stack_maths_output_mathjax::get_mathjax_code()), array('readonly' => 'readonly', 'wrap' => 'virtual', 'rows' => '12', 'cols' => '100'));
} else {
    $settingsurl = new moodle_url('/admin/filters.php');
    echo html_writer::tag('p', stack_string('healthcheckfilters', array('filter' => stack_maths::configured_output_name(), 'url' => $settingsurl->out())));
}
// Maxima config.
echo $OUTPUT->heading(stack_string('healthcheckconfig'), 3);
// Try to list available versions of Maxima (linux only, without the DB).
$connection = stack_connection_helper::make();
if (is_a($connection, 'stack_cas_connection_unix')) {
    echo html_writer::tag('pre', $connection->get_maxima_available());
}
// Check for location of Maxima.
$maximalocation = stack_cas_configuration::confirm_maxima_win_location();
if ('' != $maximalocation) {
    $message = stack_string('healthcheckconfigintro1') . ' ' . html_writer::tag('tt', $maximalocation);
    echo html_writer::tag('p', $message);
    $summary[] = array(null, $message);
}
// Check if the current options for library packaes are permitted (maximalibraries).
list($valid, $message) = stack_cas_configuration::validate_maximalibraries();
if (!$valid) {
    echo html_writer::tag('p', $message);
    $summary[] = array(false, $message);
}
// Try to connect to create maxima local.
echo html_writer::tag('p', stack_string('healthcheckconfigintro2'));
stack_cas_configuration::create_maximalocal();
echo html_writer::tag('textarea', stack_cas_configuration::generate_maximalocal_contents(), array('readonly' => 'readonly', 'wrap' => 'virtual', 'rows' => '32', 'cols' => '100'));