maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
138 stars 147 forks source link

JSXGraph issue #1170

Open Dmfama20 opened 2 months ago

Dmfama20 commented 2 months ago

Hi,

at our university we have a JSXGraph issue: We have a STACK question as attached quiz-RzS SoSe24-99 Gerade zeichnen (Kopie)-20240418-1016.xml.zip

When the question is opened in preview mode and "fill in correct responses" is clicked the corresponding JSXGraph does not change. The correct behavior would be that an adapted line is displayed which solves the given question. Moreover, when opening the browser's console we got the error Uncaught TypeError: doc.querySelector(...) is null About our system:

The same question behaves as expected on another system

TIA!

aharjula commented 2 months ago

This is basically #1017.

Since STACK 4.4.3 [[jsxgraph]]-blocks have been executing in separate sandbox iframes for security reasons. You simply cannot directly access elements of the VLE page from them directly. All access to elements/inputs outside the graphs needs to go through the provided routes, i.e. the old [[jsxgraph input-ref-...="..."]], references or through STACK-JS functions.

Basically, to function, things need to be rewritten to match the new constraints: