External scripts run outside Moodle to interact with its data, whether through REST APIs or other means. See also: CCA moodle_cli which is for internal scripts run on the Moodle server, such as our enrollment sync.
These used to be separate repositories but the enroll scripts were converted into this one and the others were archived.
- combine_feedbacks - Combine multiple Moodle feedback activities into a single CSV file for easier analysis.
- enroll - create bulk enrollment CSVs for internships and NSO courses.
- rest_apis - examples of interacting with Moodle REST APIs.
General prerequisites are uv and a modern python 3. Individual scripts may have additional data or authentication requirements; see their readme files.
uv sync
uv run pytest # only enroll has tests at this timeScripts that interact with Moodle's REST API use an .env file in the project root for authentication and configuration. Create a .env file based on the provided example.env:
cp example.env .env
# Edit .env with your actual values