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

Profile field institution repeated in department and idnumber fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9, 2.9 regressions
    • Fix Version/s: 2.9.2
    • Component/s: User management
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as the admin and go to [Site administration  ► Users  ► Permissions  ► User policies].
      2. Scroll down to "Show user identity" and check "ID number" and "Department".
      3. Edit some student records and include "ID numbers" and "Department" information.
      4. Visit a students profile that has ID number and department information.
      5. Ensure that this information is displayed correctly.
      Show
      Log in as the admin and go to [Site administration  ► Users  ► Permissions  ► User policies] . Scroll down to "Show user identity" and check "ID number" and "Department". Edit some student records and include "ID numbers" and "Department" information. Visit a students profile that has ID number and department information. Ensure that this information is displayed correctly.
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-50962-master

      Description

      In Moodle 2.9 there are a bug in myprofilelib.php; the field institution is repeated in depatment and idnumber.

      myprofilelib.php

          if (isset($identityfields['institution']) && $user->institution) {
              $node = new core_user\output\myprofile\node('contact', 'institution', get_string('institution'), null, null,
                      $user->institution);
              $tree->add_node($node);
          }
          if (isset($identityfields['department']) && $user->department) {
              $node = new core_user\output\myprofile\node('contact', 'department', get_string('department'), null, null,
                  $user->institution);
              $tree->add_node($node);
          }
          if (isset($identityfields['idnumber']) && $user->idnumber) {
              $node = new core_user\output\myprofile\node('contact', 'idnumber', get_string('idnumber'), null, null,
                  $user->institution);
              $tree->add_node($node);
          }
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Sep/15