jsxgraph / moodle-filter_jsxgraph

moodle plug-in for JSXGraph
https://jsxgraph.org
2 stars 6 forks source link

JSXGraph + formulas question type, generate JS error on quiz edit page #14

Closed nadavkav closed 3 years ago

nadavkav commented 4 years ago

This is not a direct JSXGraph issue, but is related to it, so I am posting it here just in case someone looks for a solution to this.

We are using Moodle question type formulas with JSXGraph code, which works great. but, when we navigate to the quiz edit page, some of the JSXGraph JS code is added to the end of the page (because part of the question body is displayed on that page) and the question type variables are not parsed and converted to values, and so... the JSXGraph JS code break and display errors in the JS console, and all page JS breaks too :-(

nadavkav commented 4 years ago

To workaround this issue, I modified: https://github.com/moodle/moodle/blob/master/mod/quiz/locallib.php#L2063 to $question->questiontextformat, array('noclean' => false, 'para' => false));

We are testing it, and if it will not break other questions, we will report it upstream to Moodle's tracker.

andreas-web commented 3 years ago

Has the bugfix already been implemented in Moodle?