From 126c7a0396a4c1f1b9d638ef98a98a2826421dbb Mon Sep 17 00:00:00 2001 From: erseco Date: Sun, 7 Jun 2026 13:10:19 +0100 Subject: [PATCH 1/2] feat(playground): auto-load the editor via a blueprint unzip step Add an 'unzip' blueprint step that fetches the shared eXeLearning editor release asset through the github-proxy and extracts it into the plugin's bundled dist/static, so the playground boots with a working editor instead of requiring the manual "Download & Install Editor" button. The static editor is byte-identical across all eXeLearning plugins and is already published once at exelearning/exelearning, so it is pulled over the fast JS transport (Cache API). The release asset wraps everything in a 'static/' folder, so extracting into 'dist' yields 'dist/static/...', which embedded_editor_source_resolver serves via its 'bundled' precedence (moodledata -> bundled -> none). Pinned to v4.0.0 to match .editor-version for deterministic previews. embedded_editor_installer is kept for production/offline installs; the PR-preview note is updated accordingly. --- .github/workflows/pr-playground-preview.yml | 8 ++++---- blueprint.json | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-playground-preview.yml b/.github/workflows/pr-playground-preview.yml index 446b03f..a5e4b22 100644 --- a/.github/workflows/pr-playground-preview.yml +++ b/.github/workflows/pr-playground-preview.yml @@ -38,7 +38,7 @@ jobs: mode: append-to-description github-token: ${{ secrets.GITHUB_TOKEN }} extra-text: > - ⚠️ The embedded eXeLearning editor is not included in this preview. - You can install it from **Modules > eXeLearning Web > Configure** - using the "Download & Install Editor" button. - All other module features (ELPX upload, viewer, preview) work normally. + ℹ️ The eXeLearning editor is fetched from the shared release and + unpacked into the plugin when the playground boots, so the first + load may take a few extra seconds. ELPX upload, viewer and preview + work normally. diff --git a/blueprint.json b/blueprint.json index 00319d0..2d012d3 100644 --- a/blueprint.json +++ b/blueprint.json @@ -26,6 +26,12 @@ "pluginName": "exeweb", "url": "https://github.com/exelearning/mod_exeweb/archive/refs/heads/main.zip" }, + { + "step": "unzip", + "comment": "Auto-load the eXeLearning static editor so the playground boots with a working editor. Fetches the shared editor release asset once through the github-proxy (CORS) and extracts it into the plugin's bundled dir. The asset wraps everything in a 'static/' folder, so extracting into 'dist' yields 'dist/static/...', which embedded_editor_source_resolver serves via its 'bundled' precedence (moodledata -> bundled -> none). Pinned to match .editor-version for deterministic previews. embedded_editor_installer stays for production/offline installs.", + "destination": "/www/moodle/mod/exeweb/dist", + "data": { "url": "https://github-proxy.exelearning.dev/?repo=exelearning/exelearning&release=v4.0.0&asset=exelearning-static-v4.0.0.zip" } + }, { "step": "setConfigs", "configs": [ From d5ec3a6a5931b745c97383910e778b54c72d663e Mon Sep 17 00:00:00 2001 From: erseco Date: Sun, 7 Jun 2026 16:29:57 +0100 Subject: [PATCH 2/2] docs(readme): shrink the playground button and add the editor-load note Match the WordPress/Omeka README style: render the 'Preview in Moodle Playground' button via an HTML (smaller) and add the note that the editor is fetched from the shared release and unpacked on boot. The blueprint URL is unchanged. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d26f42e..87eab8b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # eXeLearning web sites for Moodle -[![Preview in Moodle Playground](https://raw.githubusercontent.com/ateeducacion/action-moodle-playground-pr-preview/refs/heads/main/assets/playground-preview-button.svg)](https://moodle-playground.com/?blueprint-url=https://raw.githubusercontent.com/exelearning/mod_exeweb/refs/heads/main/blueprint.json) +Preview in Moodle Playground + +> ℹ️ The eXeLearning editor is fetched from the shared release and unpacked into the plugin when the playground boots, so the first load may take a few extra seconds. ELPX upload, viewer and preview work normally. Activity-type module to create and edit web sites with eXeLearning inside Moodle.