mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-53572-master' of git://github.com/danpoltawski/moodle
This commit is contained in:
commit
6c19db54f9
@ -111,9 +111,6 @@ MathJax.Hub.Config({
|
||||
// Moodle v3.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2016032200) {
|
||||
|
||||
$httpurl = get_config('filter_mathjaxloader', 'httpurl');
|
||||
@ -131,5 +128,25 @@ MathJax.Hub.Config({
|
||||
upgrade_plugin_savepoint(true, 2016032200, 'filter', 'mathjaxloader');
|
||||
}
|
||||
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2016080200) {
|
||||
// We are consolodating the two settings for http and https url into only the https
|
||||
// setting. Since it is preferably to always load the secure resource.
|
||||
|
||||
$httpurl = get_config('filter_mathjaxloader', 'httpurl');
|
||||
if ($httpurl !== 'http://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js') {
|
||||
// If the http setting has been changed, we make the admin choose the https setting because
|
||||
// it indicates some sort of custom setup. This will be supported by the release notes.
|
||||
unset_config('httpsurl', 'filter_mathjaxloader');
|
||||
}
|
||||
|
||||
// The seperate http setting has been removed. We always use the secure resource.
|
||||
unset_config('httpurl', 'filter_mathjaxloader');
|
||||
|
||||
upgrade_plugin_savepoint(true, 2016080200, 'filter', 'mathjaxloader');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -99,11 +99,7 @@ class filter_mathjaxloader extends moodle_text_filter {
|
||||
static $jsinitialised = false;
|
||||
|
||||
if (empty($jsinitialised)) {
|
||||
if (is_https()) {
|
||||
$url = get_config('filter_mathjaxloader', 'httpsurl');
|
||||
} else {
|
||||
$url = get_config('filter_mathjaxloader', 'httpurl');
|
||||
}
|
||||
$url = get_config('filter_mathjaxloader', 'httpsurl');
|
||||
$lang = $this->map_language_code(current_language());
|
||||
$url = new moodle_url($url, array('delayStartupUntil' => 'configured'));
|
||||
|
||||
|
@ -27,10 +27,8 @@ $string['additionaldelimiters'] = 'Additional equation delimiters';
|
||||
$string['additionaldelimiters_help'] = 'MathJax filter parses text for equations contained within delimiter characters.
|
||||
|
||||
The list of recognised delimiter characters can be added to here (e.g. AsciiMath uses `). Delimiters can contain multiple characters and multiple delimiters can be separated with commas.';
|
||||
$string['httpurl'] = 'HTTP MathJax URL';
|
||||
$string['httpurl_help'] = 'Full URL to MathJax library. Used when the page is loaded via http.';
|
||||
$string['httpsurl'] = 'HTTPS MathJax URL';
|
||||
$string['httpsurl_help'] = 'Full URL to MathJax library. Used when the page is loaded via https (secure). ';
|
||||
$string['httpsurl'] = 'MathJax URL';
|
||||
$string['httpsurl_help'] = 'Full URL to MathJax library.';
|
||||
$string['texfiltercompatibility'] = 'TeX filter compatibility';
|
||||
$string['texfiltercompatibility_help'] = 'The MathJax filter can be used as a replacement for the TeX notation filter.
|
||||
|
||||
|
@ -30,13 +30,6 @@ if ($ADMIN->fulltree) {
|
||||
new lang_string('localinstall_help', 'filter_mathjaxloader'));
|
||||
$settings->add($item);
|
||||
|
||||
$item = new admin_setting_configtext('filter_mathjaxloader/httpurl',
|
||||
new lang_string('httpurl', 'filter_mathjaxloader'),
|
||||
new lang_string('httpurl_help', 'filter_mathjaxloader'),
|
||||
'http://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js',
|
||||
PARAM_RAW);
|
||||
$settings->add($item);
|
||||
|
||||
$item = new admin_setting_configtext('filter_mathjaxloader/httpsurl',
|
||||
new lang_string('httpsurl', 'filter_mathjaxloader'),
|
||||
new lang_string('httpsurl_help', 'filter_mathjaxloader'),
|
||||
|
@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2016052300;
|
||||
$plugin->version = 2016080200;
|
||||
$plugin->requires = 2016051900; // Requires this Moodle version.
|
||||
$plugin->component= 'filter_mathjaxloader';
|
||||
|
Loading…
x
Reference in New Issue
Block a user