Collection of SQL Queries for Moodle: Enhance Your Learning Platform

the article provides a set of SQL queries for Moodle, a popular e-learning platform. These queries can help improve and customize your Moodle experience.


In the world of e-learning, Moodle is a well-established and widely used platform that empowers educators and learners alike. Its flexibility and open-source nature make it a popular choice for educational institutions. However, to maximize its potential, you may need to customize and optimize your Moodle experience using SQL queries. In this article, we present a collection of SQL queries that can help you enhance your Moodle learning platform.

User Activity Completions with Dates

This analysis presents a comprehensive overview of user activity progress within multiple courses. It is designed to work in conjunction with Configurable Reports filters, allowing you to specify users, start and end times, and search for specific Module names. Additionally, it encompasses the recently introduced core H5P module in version 3.10. Feel free to integrate any third-party activity modules you may have on your site as necessary.


List of All Courses Enrollment by User

The provided SQL query retrieves information related to a specific user’s course enrollment. It lists the username, first name, last name, and identification number of the user, along with the ID and short name of the courses they are enrolled in. The query is designed to fetch this data for a user with the ID XXX. This information can be valuable for tracking individual user enrollments in various courses on the Moodle platform.




Leave a Reply

Your email address will not be published. Required fields are marked *