Moodle Reports - SQL

Moodle Reports - SQL

by Maddy N -
Number of replies: 0

We require the SQL statements for the below details as per the new LMS DB, this is required to prepare the connection between the DB and our log management tool.

REQUIRE SQL TO GET THESE FIELDS:
- Unique Incremental Row ID
- Record Date (or create/update dates)
- User ID
- Active Directory User ID
- Email
- Staff Name
- Designation/Title
- Department
- Course ID
- Course Name
- Final Score Achieved (eg: 85%)
- Total Attempts (eg. 2)
- Total Duration (eg. 220 minutes)
- Completion Datetime
- Starting Datetime

SQL FOR COURSE CATALOG DETAILS
- Unique Incremental Row ID
- Record Date (or create/update dates)
- Course ID
- Course Name
- Status (eg. active/inactive)
- Create Date
- Last Update date

SQL FOR USER DETAILS:
- Unique Incremental Row ID
- Record Date (or create/update dates)
- Active Directory User ID
- Email
- Staff Name
- Designation/Title
- Department
- Create date
- Update date


Can someone please let me know how to pull these reports, in which table can I find these fields? Are these reports already available under moodle? Moodle version 3.3.2, MS-SQL.

Average of ratings: -