A Moodle renderer is a class that handles all the output for a component of Moodle and it should not contain any logic other than what is required to generate the display. This is the standard description of a Moodle renderer but how to make full use of the Moodle renderers and code the display logic for your plugin.
If you are also getting started with the Moodle theming and would like to learn about the renderers and templating then you can get started with this Moodle docs guide and this guide. However, if you would like to refer a practical hands on experience with overriding the renderers and templating mechanism in a plugin, then here is nice hands on tutorial for you.
The tutorial series written by Mike Churchward, Executive Director of POET group is good starting point for all Moodle theme designers who would like to get started with the Moodle renderers and templates. During the hands on experience tutorial, Mike refactored the “Questionnaire” plugin and improved the plugin output. The tutorial series covers the following topics:
- Part 1 – Setting up the Renderer
- Part 2 – Using the Renderer
- Part 3 – Setting up Templates
- Part 4 – Using the Template
- Part 5 – Further discussion