$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'));
// Maxima config.
if (stack_cas_configuration::maxima_bat_is_missing()) {
    echo $OUTPUT->heading(stack_string('healthcheckmaximabat'), 3);
    $message = stack_string('healthcheckmaximabatinfo', $CFG->dataroot);
    echo html_writer::tag('p', $message);
    $summary[] = array(false, $message);
}
// Test an *uncached* call to the CAS.  I.e. a genuine call to the process.
echo $OUTPUT->heading(stack_string('healthuncached'), 3);
echo html_writer::tag('p', stack_string('healthuncachedintro'));
list($message, $genuinedebug, $result) = stack_connection_helper::stackmaxima_genuine_connect();
$summary[] = array($result, $message);
echo html_writer::tag('p', $message);
echo output_debug(stack_string('debuginfo'), $genuinedebug);
$genuinecascall = $result;