MDL-56017 filters: Update MathJax to version 2.7
authorSimey Lameze <simey@moodle.com>
Wed, 28 Sep 2016 06:56:51 +0000 (14:56 +0800)
committerSimey Lameze <simey@moodle.com>
Tue, 18 Oct 2016 05:29:30 +0000 (13:29 +0800)
filter/mathjaxloader/db/upgrade.php
filter/mathjaxloader/settings.php
filter/mathjaxloader/version.php

index 77fc2d9..4edbe2c 100644 (file)
@@ -148,5 +148,12 @@ MathJax.Hub.Config({
         upgrade_plugin_savepoint(true, 2016080200, 'filter', 'mathjaxloader');
     }
 
+    if ($oldversion < 2016080201) {
+        $httpsurl = get_config('filter_mathjaxloader', 'httpsurl');
+        if ($httpsurl === "https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js") {
+            set_config('httpsurl', 'https://cdn.mathjax.org/mathjax/2.7-latest/MathJax.js', 'filter_mathjaxloader');
+        }
+        upgrade_plugin_savepoint(true, 2016080201, 'filter', 'mathjaxloader');
+    }
     return true;
 }
index 0453a47..6bbc1be 100644 (file)
@@ -33,7 +33,7 @@ if ($ADMIN->fulltree) {
     $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.6-latest/MathJax.js',
+                                         'https://cdn.mathjax.org/mathjax/2.7-latest/MathJax.js',
                                          PARAM_RAW);
     $settings->add($item);
 
index 60bf517..706a0a9 100644 (file)
@@ -24,6 +24,6 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version  = 2016080200;
+$plugin->version  = 2016080201;
 $plugin->requires = 2016051900;  // Requires this Moodle version.
 $plugin->component= 'filter_mathjaxloader';