Select Git revision
settings.php
-
Chris Sangwin authoredChris Sangwin authored
settings.php 14.97 KiB
<?php
// This file is part of Stack - http://stack.maths.ed.ac.uk/
//
// Stack is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Stack is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Stack. If not, see <http://www.gnu.org/licenses/>.
/**
* Configuration settings declaration information for the Stack question type.
*
* @package qtype_stack
* @copyright 2012 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/settingslib.php');
require_once(__DIR__ . '/stack/options.class.php');
require_once(__DIR__ . '/stack/prt.class.php');
// Useful links.
$links = array(
get_string('stackDoc_docs_desc', 'qtype_stack',
array('link' => (string) new moodle_url('/question/type/stack/doc/doc.php/'))),
get_string('healthcheck_desc', 'qtype_stack',
array('link' => (string) new moodle_url('/question/type/stack/adminui/healthcheck.php'))),
get_string('chat_desc', 'qtype_stack',
array('link' => (string) new moodle_url('/question/type/stack/adminui/caschat.php'))),
get_string('bulktestindexintro_desc', 'qtype_stack',
array('link' => (string) new moodle_url('/question/type/stack/adminui/bulktestindex.php'))),
get_string('dependenciesintro_desc', 'qtype_stack',
array('link' => (string) new moodle_url('/question/type/stack/adminui/dependencies.php'))),
get_string('stackInstall_replace_dollars_desc', 'qtype_stack',
array('link' => (string) new moodle_url('/question/type/stack/adminui/replacedollarsindex.php'))),
get_string('stackInstall_testsuite_title_desc', 'qtype_stack',
array('link' => (string) new moodle_url('/question/type/stack/adminui/answertests.php'))),
get_string('stackInstall_input_title_desc', 'qtype_stack',
array('link' => (string) new moodle_url('/question/type/stack/adminui/studentinputs.php'))),
);
$settings->add(new admin_setting_heading('docs',
get_string('settingusefullinks', 'qtype_stack'),
'* ' . implode("\n* ", $links)));
// Options for connection to Maxima.
// Note that any settings here where we try to set the default
// intelligently in install.php, the default here must be null.
// Otherwise, the default here will overwrite anything set in install.php.
$settings->add(new admin_setting_heading('maixmasettingsheading',
get_string('settingsmaximasettings', 'qtype_stack'), ''));
$settings->add(new admin_setting_configselect('qtype_stack/platform',
get_string('settingplatformtype', 'qtype_stack'),
// Note, install.php tries to auto-detect Windows installs, and set the default appropriately.
get_string('settingplatformtype_desc', 'qtype_stack'), null, [
'linux' => get_string('settingplatformtypelinux', 'qtype_stack'),
'linux-optimised' => get_string('settingplatformtypelinuxoptimised', 'qtype_stack'),
'win' => get_string('settingplatformtypewin', 'qtype_stack'),
'server' => get_string('settingplatformtypeserver', 'qtype_stack'),
'server-proxy' => get_string('settingplatformtypeserverproxy', 'qtype_stack'),