Restriction by language

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

Restriction by language 3.9+

Moodle 3.9, 3.10
Released: Monday, March 8, 2021, 1:00 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: * MOODLE_10_STABLE language compability * Standard hidden for participants * Behat testing * Unit testing * userid bug * MOODLE_37_STABLE code coverage changes * GPL 3 licence * GDPR

Build Status Coverage Status

Version information

Version build number
2021030700
Version release name
3.9+
Maturity
Stable version
MD5 Sum
fff3efc25b05100ba000ff140c76c97c
Supported software
PHP 7.2, PHP 7.3, PHP 7.4, Moodle 3.9, Moodle 3.10
  • Latest release for Moodle 3.9
  • Latest release for Moodle 3.10

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS branch
main