AI report generation
Draft new report definitions with a configured Moodle AI provider and route them through the normal review workflow.
Prerequisites
- Moodle 4.5 or later with a configured Moodle AI provider and the Generate text action enabled.
- A license payload containing the Lenarys Analytics AI prompt and reference report.
- The configured Billing Admin performing the generation and install review.
- Restricted tables and SQL review policy configured for the site.
Generation flow
- Describe the report
State the audience, row grain, filters, important fields, and intended action.
- Add optional context
Select an existing report as a structural example and/or selected Moodle table schemas.
- Generate
Moodle sends the composed request through its configured text-generation provider.
- Validate
The returned definition is checked for shape, required fields, read-only SQL rules, restricted tables, sensitive columns, and column configuration.
- Review and install
Valid output opens the same explicit review modal used by the report and app catalogue.
Context controls
When table schemas are selected, choose how they constrain generation:
Context mode
Prefer the selected tables when useful, while allowing other validated Moodle tables.
Only mode
Instruct the provider to use only the selected table schemas.
Selecting an installed report provides a full definition as a pattern. The original report is not edited; successful output receives new copy identity.
Review & install
AI output is untrusted until reviewed. Confirm the SQL grain, joins, filters, aliases, fields, and audience implications. Test the result on representative and edge-case data. The install modal’s validation does not replace administrator review.
Prompting guidance
Create a learner-by-course report for active enrolments.
Include learner name, course, enrolment date, last access,
completion status, final course grade, learning time, and visits.
Add course and completion filters. Exclude deleted users.
AI history stores the user request, selected context, response, generated definition, result status, and timestamp in Moodle. Users can clear their generation history from the interface.
Was this page helpful?
Your feedback is stored in this browser.