Skip to content

Add Moodle Playground preview blueprint and PR action#718

Open
erseco wants to merge 2 commits into
ncstate-delta:mainfrom
erseco:feature/moodle-playground-preview
Open

Add Moodle Playground preview blueprint and PR action#718
erseco wants to merge 2 commits into
ncstate-delta:mainfrom
erseco:feature/moodle-playground-preview

Conversation

@erseco

@erseco erseco commented May 26, 2026

Copy link
Copy Markdown

About this PR — Moodle Playground

Moodle Playground (source: ateeducacion/moodle-playground) is a project that runs a full Moodle site entirely inside the browser (PHP + SQLite compiled to WebAssembly), with no server, no Docker and no local install. Given a blueprint.json it provisions a fresh Moodle instance, installs plugins, creates users / courses / sample content, and opens on a chosen landing page.

This PR wires that up for mod_zoom so contributors and reviewers can try and test the plugin in a real Moodle instance with one click — useful both for users who just want to evaluate it and for reviewers who want to validate a change without standing up a local Moodle.

ℹ️ Live PR-preview demo: see the same change applied on my fork at erseco#1 — once the workflow finishes, that PR's description gets a "Preview in Moodle Playground" button appended automatically. That is exactly what every future PR opened against this repo will look like once this is merged.

⚠️ Caveat specific to mod_zoom: the Zoom REST API is not reachable from the Playground sandbox, so creating, updating or joining real meetings will not work. The blueprint sidesteps this by populating placeholder Server-to-Server OAuth credentials (so the admin settings page renders) and by inserting a stub Zoom activity directly into {zoom} and {course_modules} via a runPhpCode step — bypassing zoom_add_instance(), which would otherwise call the Zoom API. The preview is therefore intended for UI, mod_form and admin-settings inspection, not for exercising actual meeting flows.

Summary

  • Adds blueprint.json describing a Moodle 5.2 demo site that installs mod_zoom from this branch (installMoodlePlugin), sets placeholder accountid / clientid / clientsecret so the admin settings page renders, creates a demo course (ZOOMDEMO01) and seeds a stub Zoom activity via runPhpCode so the activity view and mod_form are reachable.
  • Adds .github/workflows/pr-playground-preview.yml which uses ateeducacion/action-moodle-playground-pr-preview to publish a live Moodle Playground preview link on every same-repo PR.
  • Adds a "Try in Moodle Playground" section + badge to README.md linking to the blueprint, with an explicit note that the preview cannot reach the Zoom API.

Adds a blueprint.json that provisions a Moodle 5.2 demo site with
mod_zoom installed (installMoodlePlugin) and configured with placeholder
Server-to-Server OAuth credentials (accountid / clientid / clientsecret)
so the plugin's admin settings page renders without immediately erroring.

The blueprint also creates a demo course (ZOOMDEMO01) and a stub Zoom
activity. Because zoom_add_instance() calls the Zoom REST API — which is
not reachable from the Playground sandbox — the activity is inserted
directly into the {zoom} and {course_modules} tables via a runPhpCode
step, mirroring the pattern already used by moodle-mod_geogebra's
blueprint. The activity is intentionally a stub: Join / Start buttons
will not work, but the activity view, mod_form and settings pages can
all be inspected.

Also adds a PR workflow (.github/workflows/pr-playground-preview.yml)
that uses ateeducacion/action-moodle-playground-pr-preview to publish a
live preview link on every same-repo PR, plus a "Try in Moodle
Playground" section in README.md with a one-click playground entry
point.
@smbader smbader added the enhancement Adds new functionality label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adds new functionality

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants