0.
- In system settings/Plugins/Filters/Manage filters, turn on the multilang filter. Set it to apply to both headings and content.
- In system settings/Advanced features, make sure conditional availability is enabled.
- This test assumes your language is English, otherwise change the text below.
1. In system settings/Users/Accounts/User profile fields, create a new Text profile field with the following settings:
- Short name: multilangfield
- Name: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">Francais</span>
(Other values can be left default.)
Note that the field name is correctly displayed as 'English' in the user profile field list.
2. Go to any course website.
3. Turn editing on.
4. Add an activity or resource / Label.
5. In 'Restrict access' section, open dropdown 'User field'.
EXPECTED: User field list should include the field 'English'.
BEFORE FIX: User field list includes 'EnglishFrancais'.
6. Edit settings for any section in the website.
7. In 'Restrict access' section, open dropdown 'User field'.
EXPECTED: User field list should include the field 'English'.
BEFORE FIX: User field list includes 'EnglishFrancais'.
8. From the course page, add a new Forum activity with default settings except that, in 'Restrict access' section, open dropdown 'User field' and select that the 'English' field must have value 'Frog'. Save changes.
9. View course page. Check the informational text below the activity that was just added.
EXPECTED: Text should read: 'Restricted: Not available unless your English contains frog.'
BEFORE FIX: Text reads: 'Restricted: Not available unless your EnglishFrancais contains frog.'
10. Log in using a test student account. Check the same message.
EXPECTED: Text should read: 'Not available unless your English contains frog.'
BEFORE FIX: Text reads: 'Not available unless your EnglishFrancais contains frog.'