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

sql_fullname() should respect the system or language settings

    XMLWordPrintable

    Details

    • Database:
      Any
    • Testing Instructions:
      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)'
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_23_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull Master Branch:

      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

              Assignee:
              pholden Paul Holden
              Reporter:
              sunner Sunner Sun
              Peer reviewer:
              David Matamoros David Matamoros
              Integrator:
              Ilya Tregubov Ilya Tregubov
              Tester:
              Anna Carissa Sadia Anna Carissa Sadia
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, David Mudrák (@mudrd8mz), Helen Foster, Víctor Déniz Falcón
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Dec/21

                  Time Tracking

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