Permalink
Browse files

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

  • Loading branch information...
dmonllao committed Oct 26, 2017
2 parents ef7df2a + 7b18365 commit 341505e5ded39c6a10a7a002e21c858372357b64
@@ -169,5 +169,33 @@ function xmldb_filter_mathjaxloader_upgrade($oldversion) {
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 @@
$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
@@ -1,3 +1,4 @@
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.

0 comments on commit 341505e

Please sign in to comment.