Restriction by language

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

Restriction by language 3.5+

Moodle 3.5, 3.6, 3.7
Released: Tuesday, 4 June 2019, 3:24 AM

moodle-availability_language

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: https://docs.moodle.org/en/Conditional_activities_settings

Installation:

  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.

DONE: * Standard hidden for participants * Behat testing * Unit testing * userid bug * MOODLE_37_STABLE code coverage changes * GPL 3 licence * GDPR

travis Coverage Status

Version information

Version build number
2019060300
Version release name
3.5+
Can be updated to
3.5+ (2019100200), 3.7+ (2020050801), 3.7+ (2020062600), 3.8+ (2020102300), 3.8+ (2020112700), 3.9+ (2021060600)
Maturity
Stable version
MD5 Sum
478bec061c3df3774be7befb22400caf
Supported software
PHP 7.0, PHP 7.1, PHP 7.2, Moodle 3.5, Moodle 3.6, Moodle 3.7

Version control information

Version control system (VCS)
GIT
VCS repository URL