Restriction by language

Availability conditions ::: availability_language
Maintained by RenaatRenaat Debleu
Restrict module and section access based on user language.

Restriction by language 3.4+

Moodle 3.4, 3.5, 3.6
Released: Tuesday, September 4, 2018, 3:55 AM


Restrict module and section access based on user language.

Language filters are great, but sometimes they can make your resources and activities very complex. This availability condition makes it easy to show an English resource only to English users and an activity in French only to French speaking students.

This plugin only pops up when 1. There is more than 1 language installed in the system (obvious, we need a least 2 languages installed to restrict) 2. When the language of the course is NOT forced. (Course - Edit settings - Appearance - Force language). When a course has a forced language, everything will be shown in this language and we are certain no user will ever arrive with another language enabled. On that moment there is no need to show the restriction, as it would only create the illusion that people could be restricted.

WARNING: The Moodle Mobile app relies on the user profile language and/or course language to show or hide a resource: the language selected in the app does NOT prevail.

Check the global documentation about conditional availability conditions:


  1. Unpack the zip file into the availability/condition/ directory. A new directory will be created called language.
  2. Go to Site administration > Notifications to complete the plugin installation.

TODO: * Mobile app. * grabthelot functionality

DONE: * Standard hidden for participants * Behat testing * Unit testing * userid bug

travisCoverage Status

Version information

Version build number
Version release name
Can be updated from
1.0, 1.0, 1.0, 1.0, 1.0, 1.0 (2014091200), 2.7 (2014092000), 3.1+, 3.2, 3.1 (2017050600), 2.7 (2017050600), 3.2+, 3.2+ (2017080300), 3.3+, 3.3+ (2018030400), 3.4+, 3.4+, 3.4+
Can be updated to
3.5+ (2019022800), 3.5+ (2019051200), 3.5+ (2019100200), 3.7+ (2020050801), 3.7+ (2020062600), 3.8+ (2020102300), 3.8+ (2020112700)
Stable version
MD5 Sum
Supported software
PHP 7.0, PHP 7.1, Moodle 3.4, PHP 7.2, Moodle 3.5, Moodle 3.6

Version control information

Version control system (VCS)
VCS repository URL