Renderers
In previous chapters, we have encountered renderers (for example the three-dimensional model viewer we developed in Chapter 5,Creative Teaching - Developing Custom Resources and Activities) without delving into too much detail regarding why they exist and how they can be used. In fact, renderers aren't obligatory at all: in the previous chapter, we created dashboard blocks that didn't include renderers. Let us use the Courses available block as an example. This block outputs its HTML straight from the get_content()
function. That's fine as far as it goes, but if we were wanting to alter the form and layout of the Courses available block in any meaningful way, we would need to alter the block itself. This is especially true if we were going to be installing the block in different Moodle installations, where each installation had its own distinctive look-and-feel. It's certainly true that we could change the look of the block using CSS but, again, that will only take us so far. Implementing...