Restriction by language

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

Restriction by language 3.8+

Moodle 3.8, 3.9, 3.10
Released: Saturday, 28 November 2020, 4:27 PM

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
2020112700
Version release name
3.8+
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+, 3.4+ (2018090300), 3.5+ (2019022800), 3.5+ (2019051200), 3.5+ (2019060300), 3.5+ (2019100200), 3.7+ (2020050801), 3.7+ (2020062600), 3.8+, 3.8+ (2020102300)
Can be updated to
3.9+ (2021060600)
Maturity
Stable version
MD5 Sum
65992bbfcbf677adc7caba74e52c7805
Supported software
Moodle 3.8, Moodle 3.9, Moodle 3.10

Version control information

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