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

Removing $a->firstname or $a->lastname from the fullnamedisplay string results in errors.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6, BACKEND
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide

      Settings

      • fullnamedisplay (location) [Administration ► Site administration ► Users ► Permissions ► User policies].
      • fullnamedisplay language string - I would just alter the lang/en/moodle.php file rather then load up the language file in the moodle instance itself as it is much quicker.

      Test instruction

      1. Create the set up with the combination of settings below and then go to the profile edit page. [Test] Check that no errors are displayed.
      2. Run the following unit test - lib/tests/moodlelib_test.php

      Combinations to try

      • fullnamedisplay set to "lastname firstname". "Surname" should be displayed before "First name".
      • fullnamedisplay set to "alternatename middlename". "First name" should be displayed before "Surname" and then "alternatename" should be before "middlename".
      • fullnamedisplay set to "alternatename middlename" with the fullnamedisplay string changed to "{$a->firstname}" only. "First name" should be displayed before "Surname" and then "alternatename" should be before "middlename".
      • fullnamedisplay set to "language". The textboxes should be in the same order as the language setting.
      • fullnamedisplay set to "language" and the fullnamedisplay string changed to "{$a->firstname}" only. The edit profile page should show "First name" and then "Surname".
      Show
      Settings fullnamedisplay (location) [Administration ► Site administration ► Users ► Permissions ► User policies] . fullnamedisplay language string - I would just alter the lang/en/moodle.php file rather then load up the language file in the moodle instance itself as it is much quicker. Test instruction Create the set up with the combination of settings below and then go to the profile edit page. [Test] Check that no errors are displayed. Run the following unit test - lib/tests/moodlelib_test.php Combinations to try fullnamedisplay set to "lastname firstname". "Surname" should be displayed before "First name". fullnamedisplay set to "alternatename middlename". "First name" should be displayed before "Surname" and then "alternatename" should be before "middlename". fullnamedisplay set to "alternatename middlename" with the fullnamedisplay string changed to "{$a->firstname}" only. "First name" should be displayed before "Surname" and then "alternatename" should be before "middlename". fullnamedisplay set to "language". The textboxes should be in the same order as the language setting. fullnamedisplay set to "language" and the fullnamedisplay string changed to "{$a->firstname}" only. The edit profile page should show "First name" and then "Surname".
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-42177-master-three
    • Sprint:
      BACKEND Sprint 6

      Description

      Areas around moodle no rely on the string 'fullnamedisplay' containing both firstname and lastname. It is possible that either one of these could be removed.
      Perhaps we could remove the need for this string or at least the reliance upon this string with the current code.

      replication steps

      1. Alter the fullnamedisplay string and remove either firstname or lastname.
      2. Try to edit your profile. (errors occur)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/13