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

sql_fullname() should respect the system or language settings

    XMLWordPrintable

Details

    • Any
    • MOODLE_20_STABLE, MOODLE_23_STABLE, MOODLE_39_STABLE
    • MOODLE_400_STABLE
    • Hide

      Manual test

      1. Login as admin
      2. Navigate to Users > Permissions > User policies in site administration
      3. Set Alternative full name format to the following:

        firstname middlename lastname
        

      4. Create a new user:
        • First name: David
        • Middle name: Charlie
        • Surname: Carrot
      5. Create a second user:
        • First name: David
        • Middle name: Richard
        • Last name: Lettuce
      6. Create a new course
      7. Enrol both users on course as students
      8. On the course participants page, use the filters
        • Match: Any
        • Keyword
        • David Charlie
      9. Hit return
      10. Press Apply filters
      11. Confirm "David Charlie Carrot" test user matches the filter
      12. Confirm "David Richard Lettuce" test user does not match the filter

      Automated tests

      $ vendor/bin/phpunit --testsuite core_user_testsuite --filter '(test_keywords_filter|test_get_sql_fullname)'
      

      Show
      Manual test Login as admin Navigate to Users > Permissions > User policies in site administration Set Alternative full name format to the following: firstname middlename lastname Create a new user: First name: David Middle name: Charlie Surname: Carrot Create a second user: First name: David Middle name: Richard Last name: Lettuce Create a new course Enrol both users on course as students On the course participants page, use the filters Match: Any Keyword David Charlie Hit return Press Apply filters Confirm "David Charlie Carrot" test user matches the filter Confirm "David Richard Lettuce" test user does not match the filter Automated tests $ vendor/bin/phpunit --testsuite core_user_testsuite --filter '(test_keywords_filter|test_get_sql_fullname)'

    Description

      Improved to search/store/display users' real fullname in all
      the languages which do not use the "firstname lastname" style,
      such as zh-cn, zh-tw and ja.

      patch: https://github.com/hit-moodle/moodle/commit/3856abfb97737397b859e7b1eae92bedb5326fa0

      P.S. dongsheng should understand this patch better

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              sunner Sunner Sun
              David Carrillo David Carrillo
              Ilya Tregubov Ilya Tregubov
              Anna Carissa Sadia Anna Carissa Sadia
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                19/Apr/22

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h