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

Empty Username column (+notices) on Participants page if username is in showuseridentity fields

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_34_STABLE
    • MDL-61549-master
    • Hide

      1. Add the "username" column to your $CFG->showuseridentity variable (must be in config.php, because the "Username" field is not shown in the admin interface by default).
      2. As an administrator, navigate into a course with one or more enrolled users and go to "Participants"
      3. Make sure that all enrolled users exhibit a username.

      Show
      1. Add the "username" column to your $CFG->showuseridentity variable (must be in config.php, because the "Username" field is not shown in the admin interface by default). 2. As an administrator, navigate into a course with one or more enrolled users and go to "Participants" 3. Make sure that all enrolled users exhibit a username.

      In our production system, the username column is part of $CFG->showuseridentity. Therefore, (accordingly privileged) users can see a Username column on the participants page (/user/index.php?courseid=xxx). Until Moodle 3.3, that column was filled with respective usernames. However, starting with Moodle 3.4, that column is empty. With the according development settings, PHP notices are displayed as well:

      {Notice: Undefined property: stdClass::$username in <snip>/user/classes/participants_table.php on line 420

      For organisational reasons we need the contents of the username column to be displayed in Moodle 3.4 as well.

            jan.dagefoerde Jan Dageförde
            jan.dagefoerde Jan Dageförde
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.