Dashboard progress overview

Having created a new block to chart a learner's progress through a course, we now need to develop a set of charts showing the progress through all the courses on which a learner is enrolled. This can then be displayed on their dashboard.

Recall that the dashboard wireframe (agreed by the client) demands doughnut charts, rather than pie charts--with a percentage completion displayed in the center of the chart:

To display text in the center of the chart, we will need to register a new function with the Chart.js library to render the text before the doughnut chart is drawn. We need to take care to ensure that the text ...

Get Moodle 3.x Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.