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

Custom user profile field in participants table not formatted correctly

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.9.8, 3.10.5, 3.11.1
    • None
    • General
    • None
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MDL-72185_311
    • MDL-72185_master
    • Easy
    • Hide
      1. Login as admin
      2. Navigate to the "User profile fields" settings page (Site administration > Users > Accounts >User profile fields)
      3. Click on "Create a new profile field"
      4. Choose "Text input" as field type
      5. Input "multilang" as short name
      6. Input "<span lang="en" class="multilang">Multi lang</span><span lang="de" class="multilang">Mehrsprachig</span>" as Name
      7. Set "Who is this field visible to?" to "Visible to user, teachers and admins"
      8. Set "Maximum length" to "255"
      9. Click on "Save changes"
      10. Activate new custom user profile field on the "User policies" settings page ((Site administration > Users > P(Site administration > Users > Permissions > User policies)
      11. Navigate to your profile
      12. Click on "Edit profile"
      13. Scroll down to the section "Other fields"
      14. Set "<span lang="en" class="multilang">English</span><span lang="de" class="multilang">Deutsch</span>" as field value
      15. Click on "Update profile"
      16. Navigate to a course where this user is enrolled
      17. Click on "Participants" to view the participants table list
      18. Verify that the new user profile field row is visible
      19. Verify that the value of the user field is translated correctly
      20. Change the language and redo steps 18-19
      Show
      Login as admin Navigate to the "User profile fields" settings page (Site administration > Users > Accounts >User profile fields) Click on "Create a new profile field" Choose "Text input" as field type Input "multilang" as short name Input "<span lang="en" class="multilang">Multi lang</span><span lang="de" class="multilang">Mehrsprachig</span>" as Name Set "Who is this field visible to?" to "Visible to user, teachers and admins" Set "Maximum length" to "255" Click on "Save changes" Activate new custom user profile field on the "User policies" settings page ((Site administration > Users > P(Site administration > Users > Permissions > User policies) Navigate to your profile Click on "Edit profile" Scroll down to the section "Other fields" Set "<span lang="en" class="multilang">English</span><span lang="de" class="multilang">Deutsch</span>" as field value Click on "Update profile" Navigate to a course where this user is enrolled Click on "Participants" to view the participants table list Verify that the new user profile field row is visible Verify that the value of the user field is translated correctly Change the language and redo steps 18-19

    Description

      It is possible to add custom course fields with text input. This input allows storing multi-lang HTML code.

      It will be processed afterwards correctly in the user profile but not on the participants table, when the admin adds this field as user identity to be listed (setting: showuseridentity).

      Instead of using the s($var) function we should use the format_string($var) function.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pead Adrian Perez
            Paul Holden Paul Holden
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m