Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-73156

Custom user profile field names not processed through Moodle filters in Browse List of Users

    XMLWordPrintable

Details

    • Bug
    • Status: Waiting for peer review
    • Minor
    • Resolution: Unresolved
    • 3.9.11, 3.10.8, 3.11.4
    • None
    • User management
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MDL-73156-M311
    • Hide

      These instructions assume that Moodle was installed in English.

      1. Login to Moodle as a site administrator.
      2. Install the French language pack. You can find instructions on how to do that by going to https://docs.moodle.org/en/Language_packs.
      3. Install and activate the Multi-Language Content (v2) filter. You can get it and the installation/activation instructions from: https://moodle.org/plugins/filter_multilang2. Be sure you set it to filter Content and Headings.
      4. Navigate to Site Administration > Users > Accounts > User profile fields.
      5. Create a new Text Input profile field. Shortname: location. Name: {mlang en}Location{mlang} {mlang fr}

        Endroit{mlang}. Save.

      6. Navigate to Site Administration > Users > Accounts > Browse List of Users.
      7. Use the Show More... link to display additional filter criteria.
      8. VERIFY: For User Profile Fields, look for the field called "Location".
      9. Select the Location field.
      10. Change "Contains" to "is empty".
      11. Click the "Add filter" button.
      12. VERIFY: In the "Active Filters" section, the checkbox field should say "User profile field: Location is empty".

      If the two (2) verifications passed, the issue has been resolved.

      Let me know if you have any questions or concerns.

      Best regards,

      Michael Milette

      Show
      These instructions assume that Moodle was installed in English. Login to Moodle as a site administrator. Install the French language pack. You can find instructions on how to do that by going to https://docs.moodle.org/en/Language_packs . Install and activate the Multi-Language Content (v2) filter. You can get it and the installation/activation instructions from: https://moodle.org/plugins/filter_multilang2 . Be sure you set it to filter Content and Headings. Navigate to Site Administration > Users > Accounts > User profile fields. Create a new Text Input profile field. Shortname: location. Name: {mlang en}Location{mlang} {mlang fr} Endroit{mlang}. Save. Navigate to Site Administration > Users > Accounts > Browse List of Users. Use the Show More... link to display additional filter criteria. VERIFY: For User Profile Fields, look for the field called "Location". Select the Location field. Change "Contains" to "is empty". Click the "Add filter" button. VERIFY: In the "Active Filters" section, the checkbox field should say " User profile field: Location is empty ". If the two (2) verifications passed, the issue has been resolved. Let me know if you have any questions or concerns. Best regards, Michael Milette

    Description

      Although they are processed through Moodle filters in most places in Moodle, the names of custom User Profile Fields are not passed through Moodle filters in the Browser List of Users. As a result, attempts to create custom profile fields with multi-language names display all languages.

      In the following example, I am using the Multi-Language Content (v2) "{mlang} tags to create a user profile field called "Location" in English and "Endroit" in French. Using {mlang} tags, the name of the tag is:

      In the Browse List of Users, the result is as follows. Note that it is not filtered in the New Filter (1) section and the Active Filters (2) section.

      Let me know if you have any questions.

      Michael Milette

      Attachments

        Activity

          People

            Unassigned Unassigned
            michael-milette Michael Milette
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: