Moodle as Code: Schema‑Driven Configuration for Core and Plugins

Moodle as Code: Schema‑Driven Configuration for Core and Plugins

par André Menrath,
Nombre de réponses : 5

This Idea came up at this years Moodle Hochschultreffen in Rosenheim (Link to Forum-Post).

  1. Define a JSON Schema and YAML/JSON format that fully describes a Moodle codebase: core version/source plus plugins and their sources (moodle.org, moodle-marketplace, git, url/zip, ...).
  2.  Based on this schema, we build a minimal, CI‑ready reference implementation (e.g. using Python/Ansible/Docker) that validates the config, fetches Moodle core, and places plugins into the correct directories. The goal is a reusable “Moodle as Code” model and one working example pipeline that others can adapt to their own tooling and environments.

Use cases

  1. Unify a common problem that all of us solve quite differently, yet similar. Make deployment easier and better for everyone.
  2. Furthermore such a schema could eventually be re-used in something similar like WordPress/Env: .moodle-env.json in plugin folder would allow a small npm tool to automatically spin up a dev container as defined, which making contributing to moodle plugins easier.

En réponse à André Menrath

Re: Moodle as Code: Schema‑Driven Configuration for Core and Plugins

par Jonathan Champ,
En réponse à Jonathan Champ

Re: Moodle as Code: Schema‑Driven Configuration for Core and Plugins

par Travis Windsor,
Thanks Jonathan. That's right. As part of our Tech Transformation initiative we've added support for using Composer and we're keen to leverage this further as we believe it offers a lot of simplified management.

I am considering proposing (unconference style) a short presentation and subsequent discussion on Composer use in Moodle and third party plugin dev for BarCamp to see if that interests attendees.
En réponse à Travis Windsor

Re: Moodle as Code: Schema‑Driven Configuration for Core and Plugins

par Luca Bösch,
Thanks Travis
I would be very interested in that.
Maybe–if time permitting–it could be extended also to cover the topic of the "router" concept.
That would have my vivid interest as well.
Brilliant to see you in Zürich!
En réponse à Luca Bösch

Re: Moodle as Code: Schema‑Driven Configuration for Core and Plugins

par Philipp Memmel,
+1 for a barcamp session about routing, with some deveveloper-in-depth topics sourire

Philipp
En réponse à Travis Windsor

Re: Moodle as Code: Schema‑Driven Configuration for Core and Plugins

par André Menrath,
I wonder, will the marketplace also serve as a composer repository?