Skip to content
Snippets Groups Projects
Commit 12565da1 authored by smmercuri's avatar smmercuri
Browse files

Remove mathjax from block parameters

parent 191cab26
No related branches found
No related tags found
No related merge requests found
...@@ -93,7 +93,6 @@ Functionality and styling can be customised through the use of block parameters. ...@@ -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. 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. 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. 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 ## Random generation of `proof_step` order
......
...@@ -45,12 +45,10 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block { ...@@ -45,12 +45,10 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block {
$xpars = []; $xpars = [];
$inputs = []; // From inputname to variable name. $inputs = []; // From inputname to variable name.
$clone = "false"; // Whether to have all keys in available list cloned. $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) { foreach ($this->params as $key => $value) {
if ($key === 'clone') { if ($key === 'clone') {
$clone = $value; $clone = $value;
} else if ($key === 'mathjax') {
$mathjaxversion = $value;
} else if ($key !== 'input') { } else if ($key !== 'input') {
$xpars[$key] = $value; $xpars[$key] = $value;
} else { } else {
...@@ -368,12 +366,12 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block { ...@@ -368,12 +366,12 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block {
foreach ($this->params as $key => $value) { foreach ($this->params as $key => $value) {
if ($key !== 'width' && $key !== 'height' && $key !== 'aspect-ratio' && if ($key !== 'width' && $key !== 'height' && $key !== 'aspect-ratio' &&
$key !== 'version' && $key !== 'overridecss' && $key !== 'input' && $key !== 'version' && $key !== 'overridecss' && $key !== 'input' &&
$key !== 'orientation' && $key !== 'clone' && $key !== 'mathjax') { $key !== 'orientation' && $key !== 'clone') {
$err[] = "Unknown parameter '$key' for Parson's block."; $err[] = "Unknown parameter '$key' for Parson's block.";
$valid = false; $valid = false;
if ($valids === null) { if ($valids === null) {
$valids = ['width', 'height', 'aspect-ratio', 'version', 'overridecss', $valids = ['width', 'height', 'aspect-ratio', 'version', 'overridecss',
'overridejs', 'input', 'orientation', 'clone', 'mathjax']; 'overridejs', 'input', 'orientation', 'clone'];
$err[] = stack_string('stackBlock_parsons_param', [ $err[] = stack_string('stackBlock_parsons_param', [
'param' => implode(', ', $valids)]); 'param' => implode(', ', $valids)]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment