Repository navigation
v0.9.3
Moodle CLI 0.9.3
Quizzes, graded feedback and self-update. moodle quiz takes an attempt from the terminal, moodle attempt reads a finished one back, graded assignments now show the marker's reasons, and moodle update upgrades the CLI and the Worker together.
Highlights
moodle quiz— start an attempt, answer questions, finish it. Beta, CLI-only, and every write asks first.moodle attempt— read a finished attempt question by question, with marks and feedback.moodle update— upgrade the package and redeploy the managed Worker when either is behind.- Graded assignments show their feedback — marker comments, rubric rows and annotated PDFs, not just a number.
- Files resolve again on sites behind a signed CDN, and images render in hosted MCP clients.
Take a quiz from the terminal (beta)
moodle quiz start UNIT "Week 8 mini-test"
moodle quiz answer 12345 678 1 b
moodle quiz finish 12345 678The four subcommands — start, show, answer, finish — replay the same forms the browser posts: the view page's start form, processattempt.php for each saved answer, and the summary page's finish form. Every write is verified against the page Moodle renders afterwards, so a save that did not land is reported instead of assumed.
This one is deliberately hard to do by accident:
- Each write prints the beta and academic-integrity notice and requires a yes. A pipe must pass
--yes. - It is CLI-only. The MCP servers do not expose it, so an agent cannot sit a quiz for you.
- Safe Exam Browser quizzes are refused.
- Questions with several input groups — cloze, matching — are reported as unsupported rather than posted to a field that does not exist.
A quiz that wants an access password now asks for it instead of refusing: read without echo at a terminal, --password for scripts. It is posted once with the start form, never stored and never printed.
Read a finished attempt
moodle attempt ID (and the attempt MCP tool) reads the review page: every question with your response, plus the mark, the correct answer and the feedback whenever the site's review options show them. A quiz item now lists each finished attempt with its review id and summary, so the id is one command away.
Keep the CLI and the Worker current
moodle update upgrades the package through the installer that put it there, then redeploys the managed MCP Worker from the new binary if it is behind.
--checkreports the versions and stops.--dry-runplans the install without running it.- Standalone builds download the matching GitHub release asset and rename it over themselves, instead of printing a URL and wishing you luck.
- The Worker asks npm for the published version once a day, caches it in the Durable Object, appends an update hint to the MCP initialize instructions and reports it on
/readyz. The CLI prints the same hint on stderr once a day at startup, refreshing in a detached child so nothing waits on the network. - A registry lookup that fails is remembered and retried hourly, and it is reported as unreachable rather than as "up to date".
moodle updatealso reads the Worker's readiness alongside its release digest, so a deployed but dead Worker is no longer reported as current.
Graded assignments explain the grade
The assignment parser stopped at the submission status table, so a graded task showed Graded and a number with no reason. It now reads the feedback table beneath it — comments, graded on and by, feedback files, annotated PDFs — and the rubric or marking-guide rows. Feedback files land in file_entries, so moodle get and the file MCP tool can fetch them.
MCP and the Worker
- The tool catalog reads as prose. Each tool says what it returns, when to reach for a sibling, what it accepts and what it costs, instead of
Use when: … Not for: …. Theitemsummary now mentions the marker feedback, rubric rows and quiz attempts it has been returning for a while. - The renewal job explains itself.
mcp deploynames the scheduler it installed, how often it runs and where it logs;mcp statusshows the last renewal outcome from its receipt and how many hosted OAuth clients are approved. The copy leads with what you will actually experience — silent, about a second, never a browser, one notification only when Moodle signs you out. - The OAuth approval page explains itself too. It follows the OS colour scheme, says how long the pairing window stays open and how many attempts remain, offers a reload button when no window is open, and describes in plain words what the grant covers.
- Every
mcpscreen uses the shared theme and names the commands worth typing next.
Fixes
filereported the post-redirect CDN address with its query stripped. On a site that servespluginfilethrough signed CloudFront links that removed the signature, leaving a URL that could only answerMissingKey. It now reports the Moodle address, which stays valid and opens in a browser.- Images travelled as a generic binary resource, which hosted clients drop. They now use MCP image content, so clients render them.
sesskeyredaction in the hiddendev fetchhides the value whatever the attribute order or quote style — it previously rewrote the attribute name and left the value in place.moodle mcp statusreportsCredentials: unavailablewhen the OS keychain will not open, instead of exiting withunexpected. It is the command you run when something is wrong, so a headless box or a locked keychain is now a line in the report rather than a crash.deploy,loginandconnectstill fail loudly, because they genuinely need the secret.moodle update --jsonkeeps stdout clean: the child installer's output goes to stderr, and a failed step exits non-zero.
Upgrade
npm install -g moodle-cli@0.9.3Or, from an earlier 0.9:
moodle updateNo configuration or cache format changes.