Table des matières

Klassplace: A flat design theme: Expression engine to drive the items in the panels

Introduction

This engine drives the display of the panels, sections or items of the theme's home page, logged in or not, on the basis of an expression to evaluate: Moodle custom profile fields, cohort membership, etc.

The examples show the expressions, and a test result depending on a given current user in the context. If the result is 1 the element is displayed. '*' for users stands for “all users”.

Examples 1: profile field

A custom profile field “pet” is created for the users' pet. Harry has a pet named Hedwig Hermione has a pet named Crosshawk

If the profile field “pet” contains “Hedwig”, the panel is displayed because the answer is true. So for harry the panel will be displayed, not for hermione.

If the profile field “pet” does not contain “Hedwig”, the panel is displayed because the answer is true.

Examples 2: cohort membership

The cohorts G1 (Griffindor 1st year) and S1 (Slytherin - Serpentar - 1st year) having been created and populated.

Examples 3: course located in a category

Examples 4: concatenated evaluations

Complete reference of the rule syntax

Syntax of evaluable expressions


Credits

Index du thème - Index guide d'utilisation - Back to plugins index - Back to catalogue index