Merge branch 'MDL-44780_mathjax_default' of https://github.com/andyjdavis/moodle

This commit is contained in:
Dan Poltawski 2014-04-30 11:25:02 +08:00
commit 4b1e2c5fc8
3 changed files with 35 additions and 2 deletions

View File

@ -26,6 +26,6 @@ function xmldb_filter_activitynames_install() {
global $CFG;
require_once("$CFG->libdir/filterlib.php");
filter_set_global_state('activitynames', TEXTFILTER_ON);
filter_set_global_state('activitynames', TEXTFILTER_ON, 1);
}

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle 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.
//
// Moodle 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 Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Mathjax filter post install hook
*
* @package filter
* @subpackage mathjaxloader
* @copyright 2014 onwards Andrew Davis (andyjdavis)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
function xmldb_filter_mathjaxloader_install() {
global $CFG;
require_once("$CFG->libdir/filterlib.php");
filter_set_global_state('mathjaxloader', TEXTFILTER_ON, -1);
}

View File

@ -527,7 +527,7 @@ function filter_get_all_installed() {
*
* @param string $filtername The filter name, for example 'tex'.
* @param int $state One of the values TEXTFILTER_ON, TEXTFILTER_OFF or TEXTFILTER_DISABLED.
* @param int $move 1 means up, 0 means the same, -1 means down
* @param int $move -1 means up, 0 means the same, 1 means down
*/
function filter_set_global_state($filtername, $state, $move = 0) {
global $DB;