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”.
A custom profile field “pet” is created for the users' pet. Harry has a pet named Hedwig Hermione has a pet named Crosshawk
user:current:profile_field_pet = “Hedwig” ⇒ harry ⇒ 1If 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.
user:current:profile_field_pet = “Hedwig” ⇒ hermione ⇒ 0If the profile field “pet” does not contain “Hedwig”, the panel is displayed because the answer is true.
user:idnumber:HP:profile_field_pet = “Hedwig” ⇒ harry ⇒ 1user:current:profile_field_house = “Griffindor” ⇒ harry ⇒ 1The cohorts G1 (Griffindor 1st year) and S1 (Slytherin - Serpentar - 1st year) having been created and populated.
user:idnumber:HG isincohort cohort:idnumber:G1 ⇒ hermione ⇒ 1user:current isincohort cohort:idnumber:“G1” ⇒ harry ⇒ 1user:current isincohort cohort:idnumber:“S1” ⇒ draco ⇒ 1user:current isincohort cohort:idnumber:“G1” ⇒ draco ⇒ 0course:idnumber:“HEM1” incategory category:idnumber:“Y1” ⇒ * ⇒ 1user:current:profile_field_house = “Griffindor” AND user:current:profile_field_house = “Slytherin” ⇒ * ⇒ 0user:current:profile_field_house = “Griffindor” AND user:current hasrolein course:idnumber:“HEM1” ⇒ harry ⇒ 1Index du thème - Index guide d'utilisation - Back to plugins index - Back to catalogue index