From 37049a9ef01068b9feea0afdcaf19f3fcd1acf95 Mon Sep 17 00:00:00 2001
From: Chris Sangwin <C.J.Sangwin@ed.ac.uk>
Date: Wed, 18 Dec 2024 09:31:28 +0000
Subject: [PATCH] Update the docs on releasing JSXGraph versions (notes from
 issue #1169).

---
 doc/dev/Updating_JSXGraph.md | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/doc/dev/Updating_JSXGraph.md b/doc/dev/Updating_JSXGraph.md
index 0dfde3ca9..045e7ccaa 100644
--- a/doc/dev/Updating_JSXGraph.md
+++ b/doc/dev/Updating_JSXGraph.md
@@ -1,12 +1,17 @@
 # Updating JSXGraph
 
-Since the stack-js update, we have been able to use JSXGraph in its released form.
+JSXGraph is used in its released form. The files related to it are now stored under `corsscripts/`.
 
-The files related to it are now stored under `corsscripts/`.
+Download JSXGraph: [https://github.com/jsxgraph/jsxgraph](https://github.com/jsxgraph/jsxgraph).
 
-Download JSXGraph from here: [https://github.com/jsxgraph/jsxgraph](https://github.com/jsxgraph/jsxgraph).
+1. Copy over minified files `jsxgraph.min.css` and `jsxgraphcore.min.js`, there is no need to copy the non minified versions.
+2. Add frozen CDN URLs to the named version map in stack/cas/castext2/blocks/jsxgraph.block.php.
+3. Test that the healthcheck example works, the binding in particular and the render of the formula.
+4. Test the binding in more detail by checking that samplequestions/stack_jxg.binding-demo-4.4.xml still does sensible things.
+5. If all looks good and keeps looking good after Moodle JavaScript reset, NOOP edit of question to recompile it and running in private-mode/incognito-mode to ensure that things are new and not coming from any cache. Then things should be fine.
+6. Check Meclib materials, and further testing!
 
-The files one needs to copy over are `jsxgraph.min.css` and `jsxgraphcore.min.js`, there is no need to copy the non minified versions.
+An example commit is https://github.com/maths/moodle-qtype_stack/commit/409cd0960f003e80d81a982fb96d6f7c310576de
 
 The old STACK side `jsxgraph.js` that provided the `stack_jxg` features is now called `stackjsxgraph.js` and is being served from that same CORS-header tuning directory with that specific script. (Minification can be done using uglify-js:  
 `npm install -g uglify-js`  
@@ -18,3 +23,4 @@ We do not apply Moodles or any other systems JavaScript processing on these, no
 
 We really want to have a local JSXGraph copy instead of relying on a CDN version. We want to make it easy to run STACK in a closed network with no external requirements and having a local JSXGraph is one of the things we do to remove an external requirement.
 
+One can always just state that a particular `[[jsxgraph]]` block should use the official CDN version by setting `[[jsxgraph version="cdn"]]` or any specific other versions by tuning `[[jsxgraph overridecss="..." overridejs="..."]]` separately. Then, one can test if things work, but then one needs to check that one is testing with the correct version every time one tests...
\ No newline at end of file
-- 
GitLab