Skip to content
Lenarys Analytics Docs
Back to website
Intelligence AI report generation

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.
No plugin-specific AI key is required. Lenarys Analytics uses Moodle’s AI subsystem and a provider configured by the LMS administrator.

Generation flow

  1. Describe the report

    State the audience, row grain, filters, important fields, and intended action.

  2. Add optional context

    Select an existing report as a structural example and/or selected Moodle table schemas.

  3. Generate

    Moodle sends the composed request through its configured text-generation provider.

  4. Validate

    The returned definition is checked for shape, required fields, read-only SQL rules, restricted tables, sensitive columns, and column configuration.

  5. 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:

C

Context mode

Prefer the selected tables when useful, while allowing other validated Moodle tables.

O

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

Example request
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.