| name | moodle-context |
|---|---|
| description | Query Moodle via a local read-only CLI for courses, deadlines, assignments, submissions, grades, forums, and attached files. |
Use scripts/moodle_query.py for live Moodle data. Do not guess course IDs,
assignment IDs, due dates, grades, submission status, forum posts, or file
contents.
Before answering, read memory.md if it exists.
- Ignore hidden Moodle courses unless the user explicitly asks for them.
- Treat visible courses as the current/relevant course set.
- Prefer live Moodle data over memory for deadlines, submissions, grades, forums, and files.
- Use
coursesto find course IDs andassignmentsto find assignment IDs.
python3 scripts/moodle_query.py courses
python3 scripts/moodle_query.py assignmentsUse course IDs from courses with course-content, forum, and
course-scoped assignments. Use assignment IDs from assignments with
submission-status, assignment-raw, assignment-files, and file-text.
Use file-text with a direct Moodle file URL or local PDF path when that is
more convenient.
Read the visible text (and question media URLs) of an existing quiz attempt:
python3 scripts/moodle_query.py quiz-attempt-text --attemptid 339059file-textcurrently supports PDFs throughpdftotext.quiz-attempt-textextracts only visible question formulation text and media URLs from an existing attempt viamod_quiz_get_attempt_data. It is read-only and must not be extended to save, submit, or finish attempts.- Add local course aliases in
references/course-aliases.mdonly when the user asks. - Treat Moodle API errors as authoritative; do not invent fallback answers.