diff --git a/db/install.php b/db/install.php index ece2b7635cc..754cbab4adb 100644 --- a/db/install.php +++ b/db/install.php @@ -78,6 +78,12 @@ function xmldb_qtype_stack_install() { set_config('mathsdisplay', 'mathjax', 'qtype_stack'); if (!defined('QTYPE_STACK_TEST_CONFIG_PLATFORM') || !in_array(QTYPE_STACK_TEST_CONFIG_PLATFORM, ['server', 'none'])) { + if (getenv("CI") && function_exists("shell_exec") && is_readable("/etc/os-release")) { + $os = shell_exec('grep -E "^NAME=" /etc/os-release |cut -d\" -f2|tr -d "\n"'); + if ($os == "Ubuntu") { + shell_exec('sudo apt-get -qq --assume-yes install maxima'); + }; + }; list($ok, $message) = stack_cas_configuration::create_auto_maxima_image(); if (!$ok) { throw new coding_exception('maxima_opt_auto creation failed.', $message);