From 12565da1ab08deb6a2a542e1746239ac64e813cb Mon Sep 17 00:00:00 2001
From: smmercuri <smercuri@ed.ac.uk>
Date: Thu, 7 Dec 2023 09:10:34 +0000
Subject: [PATCH] Remove mathjax from block parameters

---
 doc/en/Authoring/Parsons.md                 | 1 -
 stack/cas/castext2/blocks/parsons.block.php | 8 +++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/doc/en/Authoring/Parsons.md b/doc/en/Authoring/Parsons.md
index 4b3292a00..dc59d8921 100644
--- a/doc/en/Authoring/Parsons.md
+++ b/doc/en/Authoring/Parsons.md
@@ -93,7 +93,6 @@ Functionality and styling can be customised through the use of block parameters.
 7. `override-css`: string containing the location of a local CSS file contained in `question/type/stack/corsscripts/` directory in the format `cors://file-name` or a href to an external CSS stylesheet. This will override all CSS styling of the drag-and-drop listing, so it should be used with care. However, it can be used to customise the styling of the lists by writing one's own custom CSS file and passing in the location of that file to this parameter. This parameter is unset by default. 
 8. `override-js`: string containing a local JavaScript library or a href to a cdn of a JavaScript library. This will overwrite the Sortable library used with the library identified by the string. This should be used if one wishes to use an updated version of the Sortable library, or adding functionality with a custom library. Note that the custom library will need to either extend or import the base Sortable functionality. Unset by default.
 9. `version`: string of the form `"local"` or `"cdn"`. Whether to use STACK's local copy of the Sortable library or whether to pull version 1.15.0 of Sortable from cdn. This is `"local"` by default.
-10. `mathjax`: string of the form `"2"` or `"3"`. This determines whether MathJax 2 or MathJax 3 is used to typeset LaTeX inside the Parson's block. This is `"2"` by default.
 
 ## Random generation of `proof_step` order
 
diff --git a/stack/cas/castext2/blocks/parsons.block.php b/stack/cas/castext2/blocks/parsons.block.php
index 40796a3d8..7f61e12f6 100644
--- a/stack/cas/castext2/blocks/parsons.block.php
+++ b/stack/cas/castext2/blocks/parsons.block.php
@@ -45,12 +45,10 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block {
         $xpars = [];
         $inputs = []; // From inputname to variable name.
         $clone = "false"; // Whether to have all keys in available list cloned.
-        $mathjaxversion = "2"; // MathJax version (either "2" or "3")s
+        $mathjaxversion = "2"; // MathJax version (either "2" or "3")
         foreach ($this->params as $key => $value) {
             if ($key === 'clone') {
                 $clone = $value;
-            } else if ($key === 'mathjax') {
-                $mathjaxversion = $value; 
             } else if ($key !== 'input') {
                 $xpars[$key] = $value;
             } else {
@@ -368,12 +366,12 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block {
         foreach ($this->params as $key => $value) {
             if ($key !== 'width' && $key !== 'height' && $key !== 'aspect-ratio' &&
                     $key !== 'version' && $key !== 'overridecss' && $key !== 'input' &&
-                    $key !== 'orientation' && $key !== 'clone' && $key !== 'mathjax') {
+                    $key !== 'orientation' && $key !== 'clone') {
                 $err[] = "Unknown parameter '$key' for Parson's block.";
                 $valid    = false;
                 if ($valids === null) {
                     $valids = ['width', 'height', 'aspect-ratio', 'version', 'overridecss',
-                        'overridejs', 'input', 'orientation', 'clone', 'mathjax'];
+                        'overridejs', 'input', 'orientation', 'clone'];
                     $err[] = stack_string('stackBlock_parsons_param', [
                         'param' => implode(', ', $valids)]);
                 }
-- 
GitLab