Theme Rules for Moodle™: dynamic themes and logos

IBERFORMA SISTEMAS > Open source extensions for Moodle™ > Theme Rules for Moodle™: dynamic themes and logos

Dynamic themes and logos for Moodle™

Theme Rules: a distinct visual experience for every audience

Automatically apply a theme and logo by user, cohort, course, category, group, tag, profile field or device. Everything is managed with visual rules and no code changes.

Moodle 4.5+No external dependenciesGNU GPL v3+Beta v0.1.0
Theme Rules rule list in Moodle
Ordered, auditable rules control themes and logos from a single screen.

Branding by audience

Give each company, cohort or audience its own theme and logo on one platform.

Exam mode

Enable a clean theme for every course carrying a tag such as exam-mode.

Design by device

Use a lighter interface on mobile without changing the desktop experience.

Powerful rules without coding

The visual builder combines conditions through nested AND/OR groups. Each rule can change the theme, navigation logo or both; if none matches, Moodle™ keeps its normal behaviour.

  • Conditions by user, course, category and descendants, cohort, group, tag, profile or device.
  • Assisted user and course search, with selectors based on the site's real data.
  • Top-to-bottom evaluation, with theme and logo resolved independently.
  • Reusable logo library with no duplicate files.
  • A simulator explains which rules match and what result would apply.
  • JSON export and import; imported rules remain disabled for review.

Safe control before affecting real users

Explainable simulation

Test a user, course and device and see matches, reasons and the result without altering any session.

Deliberate activation

An installation with no rules changes nothing. Imported rules arrive disabled.

Moodle™ privacy

It only reads data already held by Moodle and declares that it stores no personal data.

Technical sheet

Componentlocal_themerules
TypeMoodle™ local plugin
CompatibilityMoodle 4.5 or later
ThemesBoost-compatible
StatusBeta, version 0.1.0
LicenseGNU GPL v3 or later
DependenciesNone external
ActionsTheme and navigation logo

Installation and first steps

  1. Download the release and copy the folder as local/themerules.
  2. Open Site administration → Notifications or run php admin/cli/upgrade.php.
  3. Go to Appearance → Theme rules and upload logos to the library if needed.
  4. Create a rule, simulate it and enable it when the result is as expected.

Illustrated user guide

A real walkthrough of setup, three use cases and the validation tools.


1. Start without changing Moodle

With an empty list, the site keeps its normal theme selection. This screen provides access to rules, logos, simulation, import and export.

Empty Theme Rules list
Nothing changes until a rule is enabled.
2. Create branding rules for several companies

The form combines one condition with a theme, a logo or both. Here, two cohorts receive different identities on the same platform.

Empty rule creation form
New rule form.
Cohort rule with theme and logo
Nimbus cohort with its own theme and logo.
Two active branding rules
Visible evaluation order.
3. Check each audience's experience

The condition follows the person across the site. Two learners connected to the same installation see their own visual identity.

Learner with Nimbus branding
Nimbus Robotics experience.
Learner with Solaris branding
Solaris Retail experience.
4. Enable exam mode with a course tag

A course tag can activate a distraction-free theme. Adding or removing it is enough to control future exam sessions.

Course with the default theme
Course before the rule applies.
Rule for the exam-mode tag
Tag-based rule.
Adding the exam-mode tag to a course
Activation in course settings.
Course with the exam theme applied
Distraction-free result.
5. Adapt the theme to mobile

The device condition applies a lightweight theme only when Moodle detects a phone; desktop remains unchanged.

Rule for mobile devices
Condition by device type.
Course with a mobile theme
The same course with a dedicated mobile experience.
6. Simulate, order and move rules

The simulator explains every match before changes are enabled. The final list lets administrators order rules and export or import them between environments.

Theme Rules simulator
Rule diagnostics and final result.
Final ordered rule list
Complete, portable configuration.


Professional support

Iberforma can help design the branding strategy, model rules, validate priorities and move configurations between Moodle™ environments.