From e25dd38196da487879224bbf347d8acb72a2816e Mon Sep 17 00:00:00 2001
From: Chris Sangwin <C.J.Sangwin@ed.ac.uk>
Date: Fri, 6 Oct 2023 22:50:19 +0100
Subject: [PATCH] Reinstate check on moodle version to run grunt (still fails).
  Add example to docs.

---
 .github/workflows/moodle-ci.yml | 2 +-
 doc/en/Plots/Plots.md           | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml
index 9a07a9b65..53ca96f0d 100644
--- a/.github/workflows/moodle-ci.yml
+++ b/.github/workflows/moodle-ci.yml
@@ -164,7 +164,7 @@ jobs:
         run: moodle-plugin-ci mustache
 
       - name: Grunt
-        if: ${{ always() }}
+        if: ${{ matrix.moodle-branch == 'MOODLE_401_STABLE' }}
         run: moodle-plugin-ci grunt
 
       - name: PHPUnit tests
diff --git a/doc/en/Plots/Plots.md b/doc/en/Plots/Plots.md
index 2f858ae19..df117a94a 100644
--- a/doc/en/Plots/Plots.md
+++ b/doc/en/Plots/Plots.md
@@ -115,6 +115,13 @@ Now use:
 
     {@plot(pg2(x), [x,(x0-5),(x0+5)], [y,-10,10], [legend,false])@}
 
+A further example of a step functio:
+
+    step_fn(x,x0) := unit_step(x-x0-1/2) - unit_step(x-x0+1/2) + und*kron_delta(x,x0+1/2)+ und*kron_delta(x,x0-1/2);
+    p1:sum(step_fn(x,2*k),k,-3,3);
+
+which can be used with `{@plot(p1,[x,-5,5])@}`.
+
 For a discontinuous function, with end points, add in discrete plots.
 
     C:-5;
-- 
GitLab