// Moodle v2.8.0 release upgrade line.
// Put any upgrade step following this.
+ // Moodle v2.9.0 release upgrade line.
+ // Put any upgrade step following this.
+
+ if ($oldversion < 2015021200) {
+
+ $httpurl = get_config('filter_mathjaxloader', 'httpurl');
+ // Don't change the config if it has been manually changed to something besides the default setting value.
+ if ($httpurl === "http://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js") {
+ set_config('httpurl', 'http://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js', 'filter_mathjaxloader');
+ }
+
+ $httpsurl = get_config('filter_mathjaxloader', 'httpsurl');
+ // Don't change the config if it has been manually changed to something besides the default setting value.
+ if ($httpsurl === "https://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js") {
+ set_config('httpsurl', 'https://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js', 'filter_mathjaxloader');
+ }
+
+ upgrade_plugin_savepoint(true, 2015021200, 'filter', 'mathjaxloader');
+ }
+
return true;
}
$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.3-latest/MathJax.js',
+ 'http://cdn.mathjax.org/mathjax/2.5-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'),
- 'https://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js',
+ 'https://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js',
PARAM_RAW);
$settings->add($item);
+=== 2.9 ===
+
+* Update to the latest version of MathJax setting "httpurl" and "httpsurl" to:
+ http://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js
+
+ and
+
+ https://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js
+
+=== Before 2.9 ===
+
Setting "httpsurl" default changed from:
https://c328740.ssl.cf1.rackcdn.com/mathjax/2.3-latest/MathJax.js
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2014111000;
+$plugin->version = 2015021200;
$plugin->requires = 2014110400; // Requires this Moodle version
$plugin->component= 'filter_mathjaxloader';
contentUpdated: function(event) {
var self = this;
Y.use('mathjax', function() {
+ if (typeof window.MathJax === "undefined") {
+ return;
+ }
+ var processdelay = window.MathJax.Hub.processSectionDelay;
+ // Set the process section delay to 0 when updating the formula.
+ window.MathJax.Hub.processSectionDelay = 0;
self._setLocale();
event.nodes.each(function (node) {
node.all('.filter_mathjaxloader_equation').each(function(node) {
- if (typeof window.MathJax !== "undefined") {
- window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, node.getDOMNode()]);
- }
+ window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, node.getDOMNode()]);
});
});
+ // Set the delay back to normal after processing.
+ window.MathJax.Hub.processSectionDelay = processdelay;
});
}
};