maths / moodle-qtype_stack

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

New Version of JSX Graph possible in future releases? #1169

Closed MuellerAle closed 2 months ago

MuellerAle commented 2 months ago

We use a lot of JSX Graphs in STACK questions. We would be interested to use the new features "vector fields" and "implicit functions" which are implemented in newer JSX versions. Is it possible to update JSX graph to 1.7?

sangwinc commented 2 months ago

We're preparing a new version of STACK and I think that's a reasonable request. We updated JSXGraph to 1.8 for the next release already, see https://github.com/maths/moodle-qtype_stack/commit/e5fa06ee608dac0798572d5ae8d7f0d2e0c226e8 Thanks for making this request though - I don't always notice a new release of JSXGraph and you're right to prompt for us to bump it. Chris

aharjula commented 2 months ago

If your STACK is 4.4.3 or newer you can do one of two things:

  1. If you want to change the whole install to use a particular version of JSXGraph you could simply change the files (jsxgraphcore.min.js and jsxgraph.min.css) in question/type/stack/corsscripts/ to something newer and hope that things work everywhere. You could, for example, simply copy them from the dev branch where they are fresh. Basically, those are files directly from the official JSXGraph release; no modifications are required for their content.
    1. The less radical solution would be to use the override features of the [[jsxgraph]]-block for those graphs that need to test future features:
      [[jsxgraph ... overridejs="https://cdnjs.cloudflare.com/ajax/libs/jsxgraph/1.8.0/jsxgraphcore.min.js"
               overridecss="https://cdnjs.cloudflare.com/ajax/libs/jsxgraph/1.8.0/jsxgraph.min.css"]]
         ....
      [[/jsxgraph]]

      You can try addresses to any version you want, we don't guarantee that they work but in general JSXGraph is very stable and seems to work and this is the mechanism that we recommend for those that want to push forward while STACK lags behind. Both now and in the future. It is also the mechanism to use should one really really want to freeze JSXGraph to a given version.

Naturally, remote addresses will only work when accessible, and they may stop being so at any time... But that is a separate problem.

MuellerAle commented 2 months ago

Great, thank you both so much!