Make Your Own Custom Report in Moodle

Your first step in Moodle and PHP development
Make Your Own Custom Report in Moodle
File Size :
3.45 GB
Total length :
4h 51m



Brian Kremer


Last update




Make Your Own Custom Report in Moodle

What you’ll learn

Moodle Programming
Beginner PHP Programming
Basic HTML
Moodle Administration

Make Your Own Custom Report in Moodle


Be familiar with the Moodle LMS


In this course you will learn to make your very own custom report in Moodle. Whether you’re a teacher, a trainer, a Moodle administrator, or an IT professional, if you want to learn how to customize Moodle, then this course is for you! This course assumes you’ve never even seen PHP or HTML before… and I will walk you through this project step by step. This will include learning about three database tables in Moodle and how to query data from those tables. I’ll show you how to use some of Moodle’s built in functions to display data. We’re also going to learn some PHP: Conditional statements, foreach statements, string functions, and more. We are going to make a report template, install it, and access it through the admin menu. I’m also going to show you how to add language support: I’ll be adding support for English and Spanish, and you can add support for any languages you would like. I will show you how to add a form so you can send parameters to the report, and we’ll also add a bar chart using Moodle’s Charts API! Even if you’ve never written any code before, I will walk you through all the details, and you will have access to complete versions all of the report files every step of the way. So, are you ready to learn about Moodle customization? Join me, and let’s get started.


Section 1: Introduction

Lecture 1 Introduction

Section 2: Making the Custom Report Framework

Lecture 2 Making a Report Template

Lecture 3 Upgrading a Report Using the version.php File

Lecture 4 Challenge

Section 3: Bulk Importing Test Data

Lecture 5 Importing Test Data

Lecture 6 Viewing Data In the Database & Schema

Section 4: Querying and Displaying Data

Lecture 7 Querying the Database & Displaying the Data

Lecture 8 Querying for Cohort Membership

Lecture 9 Querying for User Information

Section 5: Making the Report Look Nice

Lecture 10 Cleanup and PHP Functions

Lecture 11 Making an HTML table using Moodles output API

Lecture 12 User Picture Bulk Import

Lecture 13 Adding User Pictures to the Report

Section 6: Supporting an Additional Language

Lecture 14 Adding Support for Additional Languages

Lecture 15 Review of index.php

Section 7: Adding a Form for Parameters

Lecture 16 Making a Library File and a Function

Lecture 17 Moodle’s Form API

Lecture 18 Drop-down List and Multi-Select Field

Lecture 19 Submit and Cancel Buttons

Lecture 20 Submit and Cancel Logic

Lecture 21 Filtering Report Results

Lecture 22 Setting a Default Value

Lecture 23 Date Range Fields

Lecture 24 Date Range Logic

Lecture 25 Better Date Range Logic

Lecture 26 Select Yes/No Field

Section 8: Adding a Bar Chart

Lecture 27 Moodle’s Charts API

Lecture 28 Adding a Data Series

Lecture 29 Adding Data Series Labels

Lecture 30 Sorting with arsort()

Lecture 31 Limiting Results with array_slice()

Section 9: Pagination and Download

Lecture 32 Pagination and Download Overview

Lecture 33 A Simple User Report with Pagination and Download

Lecture 34 The table_sql Class / Simple Table Options

Lecture 35 #35 Extending table_sql With a Custom Class

Lecture 36 #36 Email Challenge

Lecture 37 Adding User Pictures

Section 10: Pagination and Download Part 2

Lecture 38 38: The Cohort Membership Report and table_sql

Lecture 39 39: Adding table_sql to index.php

Lecture 40 40: Making a String of Cohort IDs & the rtrim() function

Lecture 41 41 Showing Members of the Selected Cohorts

Lecture 42 42 Adding a URL parameter

Lecture 43 43 Catching and Using a URL parameter

Lecture 44 44 Addressing Cohort ID Data Issues

Lecture 45 45 Adding Custom Column Headers

Lecture 46 46 Showing Selected Cohort Membership

Moodle Administrators,Trainers,Teachers,IT Professionals,Instructors

Course Information:

Udemy | English | 4h 51m | 3.45 GB
Created by: Brian Kremer

You Can See More Courses in the Developer >> Greetings from

New Courses

Scroll to Top