Posts made by Tim Hunt

Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You definitely need to get healtcheck working before you do anything else, so you are doing the right thing.

But, while the healthcheck is quite a simple test, with few moving parts, if you are on a development server, you can simpify it more. Try making a file called test.php with contents like

<?php
require_once(__DIR__ . '/config.php');
require_once($CFG->dirroot . '/question/type/stack/locallib.php');
require_once($CFG->dirroot . '/question/type/stack/stack/cas/connectorhelper.class.php');

$PAGE->set_url('/test.php');
$PAGE->set_context(context_system::instance());

echo $OUTPUT->header();

$casstrings = [\stack_ast_container::make_from_teacher_source('1+1',
        'test_instantiation_and_return_values()')];
$session = new \stack_cas_session2($casstrings);
$session->instantiate();

$result = $casstrings[0]->get_evaluated()->toString();
print_object($result);

echo $OUTPUT->footer();  

Then access that in your browser. And, while doing this turn of the various caching option in the STACK settings, to make sure you are always directly calling goemaxima. Debugging that might be even simpler than debugging the healthcheck page.

Really, there are two places the error might be, either goemaxima is not working, or the STACK settings are wrong. If you cant work out which it is, well digging into the above could you should find that in question/type/stack/stack/cas/connector.server.class.php in comes down to a curl call to the goemaxima server. So, can you work out that HTTP request and do the curl call from the command line? That might help find where the problem is.

Average of ratings: Useful (1)