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

$CFG->forcelastname in config.php affects Messaging for Teachers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: 3.4.8, 3.4.9, 3.6.3
    • Fix Version/s: None
    • Component/s: Messages
    • Labels:
      None
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_36_STABLE

      Description

      The implementation of this "little hack" (documented in the config-dist.php file), affects everyone -  including teachers, managers, and admin - in the Moodle messaging interface. I also happened to have noticed that the "Student" surname shows up also in the "Latest Announcements" and the "Online users" block, as well as the Moodle profile menu. (This may be a clue to someone other than me as to why this is happening.)

      // Force displayed usernames
      // A little hack to anonymise user names for all students. If you set these
      // then all non-teachers will always see these for every person.
      // $CFG->forcefirstname = 'Bruce';
      // $CFG->forcelastname = 'Simpson';

      You can see in the attached image, from Moodle 3.4.9, when logged in as Admin I can see full names in the grader report, as expected. However, I see "Student" for all lastnames in the Messaging interface. (I used $CFG->forcelastname = 'Student';

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            bfriesen B. Friesen
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: