Skip to content
Snippets Groups Projects
Commit b2c63a40 authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Ensure failure to find mbstring halts healtcheck.

parent f35e385d
No related branches found
No related tags found
No related merge requests found
...@@ -48,10 +48,26 @@ $PAGE->set_url('/question/type/stack/healthcheck.php'); ...@@ -48,10 +48,26 @@ $PAGE->set_url('/question/type/stack/healthcheck.php');
$title = stack_string('healthcheck'); $title = stack_string('healthcheck');
$PAGE->set_title($title); $PAGE->set_title($title);
// Start output.
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
$config = stack_utils::get_config();
// This array holds summary info, for a table at the end of the pager.
$summary = array();
$summary[] = array('', $config->platform );
// Mbstring.
if (!extension_loaded('mbstring')) {
echo $OUTPUT->heading(stack_string('healthchecknombstring'), 3);
echo $OUTPUT->footer();
exit;
}
// Clear the cache if requested. // Clear the cache if requested.
if (data_submitted() && optional_param('clearcache', false, PARAM_BOOL)) { if (data_submitted() && optional_param('clearcache', false, PARAM_BOOL)) {
require_sesskey(); require_sesskey();
echo $OUTPUT->header();
stack_cas_connection_db_cache::clear_cache($DB); stack_cas_connection_db_cache::clear_cache($DB);
\core\notification::success(stack_string('clearedthecache')); \core\notification::success(stack_string('clearedthecache'));
echo $OUTPUT->continue_button($PAGE->url); echo $OUTPUT->continue_button($PAGE->url);
...@@ -62,7 +78,6 @@ if (data_submitted() && optional_param('clearcache', false, PARAM_BOOL)) { ...@@ -62,7 +78,6 @@ if (data_submitted() && optional_param('clearcache', false, PARAM_BOOL)) {
// Create and store Maxima image if requested. // Create and store Maxima image if requested.
if (data_submitted() && optional_param('createmaximaimage', false, PARAM_BOOL)) { if (data_submitted() && optional_param('createmaximaimage', false, PARAM_BOOL)) {
require_sesskey(); require_sesskey();
echo $OUTPUT->header();
echo $OUTPUT->heading(stack_string('healthautomaxopt')); echo $OUTPUT->heading(stack_string('healthautomaxopt'));
stack_cas_connection_db_cache::clear_cache($DB); stack_cas_connection_db_cache::clear_cache($DB);
list($ok, $errmsg) = stack_cas_configuration::create_auto_maxima_image(); list($ok, $errmsg) = stack_cas_configuration::create_auto_maxima_image();
...@@ -76,22 +91,6 @@ if (data_submitted() && optional_param('createmaximaimage', false, PARAM_BOOL)) ...@@ -76,22 +91,6 @@ if (data_submitted() && optional_param('createmaximaimage', false, PARAM_BOOL))
exit; exit;
} }
$config = stack_utils::get_config();
// Start output.
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
// This array holds summary info, for a table at the end of the pager.
$summary = array();
$summary[] = array('', $config->platform );
// Mbstring.
if (!extension_loaded('mbstring')) {
echo $OUTPUT->heading(stack_string('healthchecknombstring'), 3);
$summary[] = array(false, stack_string('healthchecknombstring'));
}
// LaTeX. // LaTeX.
echo $OUTPUT->heading(stack_string('healthchecklatex'), 3); echo $OUTPUT->heading(stack_string('healthchecklatex'), 3);
echo html_writer::tag('p', stack_string('healthcheckmathsdisplaymethod', echo html_writer::tag('p', stack_string('healthcheckmathsdisplaymethod',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment