Commit 341505e5 authored by David Monllaó's avatar David Monllaó
Browse files

Merge branch 'MDL-60458-master' of git://github.com/damyon/moodle

parents ef7df2ae 7b18365b
......@@ -169,5 +169,33 @@ MathJax.Hub.Config({
upgrade_plugin_savepoint(true, 2017101200, 'filter', 'mathjaxloader');
}
if ($oldversion < 2017102000) {
// Re-add Accessible.js (we should not have removed it).
$previousdefault = '
MathJax.Hub.Config({
config: ["default.js", "MMLorHTML.js", "Safe.js"],
errorSettings: { message: ["!"] },
skipStartupTypeset: true,
messageStyle: "none"
});
';
$newdefault = '
MathJax.Hub.Config({
config: ["Accessible.js", "Safe.js"],
errorSettings: { message: ["!"] },
skipStartupTypeset: true,
messageStyle: "none"
});
';
$mathjaxconfig = get_config('filter_mathjaxloader', 'mathjaxconfig');
if (empty($mathjaxconfig) || filter_mathjaxloader_upgrade_mathjaxconfig_equal($mathjaxconfig, $previousdefault)) {
set_config('mathjaxconfig', $newdefault, 'filter_mathjaxloader');
}
upgrade_plugin_savepoint(true, 2017102000, 'filter', 'mathjaxloader');
}
return true;
}
......@@ -18,9 +18,3 @@ Upgrading the default MathJax version
3. Check and eventually update the list of language mappings in filter.php.
Also see the unit test for the language mappings.
Changes
-------
* The MathJax 2.7.2 seems to have a bug causing the accessibility extensions
fail in web apps using RequireJS (such as Moodle). We had to stop using the
Accessible.js config for that reason. See MDL-60209 for details.
......@@ -45,7 +45,7 @@ if ($ADMIN->fulltree) {
$default = '
MathJax.Hub.Config({
config: ["default.js", "MMLorHTML.js", "Safe.js"],
config: ["Accessible.js", "Safe.js"],
errorSettings: { message: ["!"] },
skipStartupTypeset: true,
messageStyle: "none"
......
......@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017101200;
$plugin->version = 2017102000;
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->component= 'filter_mathjaxloader';
......@@ -16,6 +16,8 @@ var require = {
// '*' means all modules will get 'jqueryprivate'
// for their 'jquery' dependency.
'*': { jquery: 'jqueryprivate' },
// Stub module for 'process'. This is a workaround for a bug in MathJax (see MDL-60458).
'*': { process: 'core/first' },
// 'jquery-private' wants the real jQuery module
// though. If this line was not here, there would
......
Description of import into Moodle:
// Download from https://requirejs.org/docs/download.html
// Put the require.js and require.min.js and LICENSE file in this folder.
// Check if MDL-60458 workaround can be removed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment