Course Units

Core Units example

This filter will display a list of courses in the current category as a linked list, filtered to the courses that contain a specific custom attribute value. It automatically excludes a link to the current course.

It can display courses that have one of these custom attribute values:

  • Core
  • Elective
  • Optional
  • Introduction

It is a filter rather than a course format, activity type or block simply so that it can be used inside an activity such as a page or label. This is especially helpful for single-activity courses such as course homepages or standalone information pages.

The custom attribute value is currently hardcoded with the name ‘unittype’ of type ‘dropdown’ with the values shown in the list above in that order, but this will be made configurable in a future version.

Example scenario

Set up a single-activity course that is a page, then in the page description or content use the filter to link to your grouped courses. Use the shortcode shown below to list courses matching the attribute filter:

Welcome to the XYZ Doohickey Course. Click on the units below to get started.

Core units


Elective units



Each figure is rendered using the classnames ‘coursebox’ and the value of the custom attribute. For instance, <figure class='coursebox elective'>... This allows you to apply different styling based on the type of figure rendered. For instance, you could recolour the images based on the unit type:

/* assumes <div class='unit-list'>[[units::Core]]</div> */
.unit-list {
    display: grid;
    grid-template-columns: repeat(3,minmax(250px,1fr));
    grid-template-rows: auto;
    grid-template-areas: ". . .";
    width: 100%;
    gap: 1rem;
.unit-list>.elective img {
    filter: sepia(1) hue-rotate(135deg); /* blueish tint */
.unit-list>.core img {
    filter: sepia(1); /* yellowish tint */


You can download this plugin on my Github page.

Nosey Notifications

Leverages Moodle events for some common events within courses such as enrolling, unenrolling, completing activities and courses, creating updating and deleting courses. It notifies an external URL and posts the record that changed.

Open Sesame

Send in the [encrypted] user id, the user will be logged on and the first course this user is enrolled in will open. Handy for launching courses from an external management portal.


A local plugin for executing artbitary SQL statements (not just SELECT’s) through the cron. Relies on the DB permissions to execute/insert to be set for the moodle db user.

Category Tiles

This block plugin will display categories as tiles in a similar way to dashboard course tiles. If the description field of the category contains an image tag, it will use the first one encountered as the image for that category (internal or external). If no image is found a dynamic image will be generated for that category.

Categories images are used where available


A filtered list will only list categories that contain courses that the user is already enrolled in or can enrol themselves in. You can turn filtering on or off in the block settings.


You can download this plugin on my Github page.

Restore All MBZ

A command-line admin script to restore all course backups (*.mbz) in a particular folder to multiple categories. It tries to match to the category specified within the backup file, creating them if necessary.

Public Files

This block duplicates the functionality of the built-in ‘Private Files’ block with the exception that all files are public (to authenticated users). Administrators can use this to share files or folders with everybody on the site. This is very handy for links to policy-type documents that have no specific context within courses.

Linking to URLS

Supports macos and Windows URL shortcuts. Drag a URL to your desktop from your browser to create a shortcut to that page / site. On macos it gets a ‘.webloc’ extension; on Windows it gets a ‘.url’ extension. Then drag that shortcut to the Manage Files tab – it will attach like any regular file. When the user clicks the link, it will open the URL in a new tab.


You can download this plugin on the Moodle plugins directory.

Rapid User Creation block

This block creates and optionally enrols/groups users. It’s designed to be a simple way to enter the bare essentials of a user record without having to spend time in the [sometimes slow] internal user creation screens.

It has some time-savers for user creation.

  • Users with the same email address as existing users will be skipped.
  • Usernames are set to the email address.
  • Passwords are generated and sent to the user if an option is set. Otherwise the password is set to ‘secret’ and the user record is set so the user has to change their password on the next login.

You can also optionally enrol a user into a course. Only courses with the ‘manual’ enrolment plugin are shown.

If you specify any value in the Organisation field, it will set the users Institution to that value and also create a group within the course (if a course is specified) with the organisation name – or re-use an existing one – and make the user a member of that group.


You can download this plugin on my Github page.

Activity Completions via CSV

Ever needed to complete a bunch of users who studied externally? That’s what this admin tool is for. It can manually enrol users if need be.

You can import completion results (as overrides) for any activity type (including custom plugins) using a simple CSV format.

You can also run this from the CLI – for externally scheduled result transfers or similar advanced functionality.