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

People block broken when changing role in a course as admin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Navigation
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      To reproduce...

      1. log in as admin

      2. go to any course and add the People block (make sure there are some users in the course)

      3. In the Navigation block change your role to (say) Teacher

      4. Click on Participants in the People block

      5. Click one of the User names - Error: "Call to a member function add() on a non-object in /..../moodle/lib/navigationlib.php on line 1526"

      Discussion...

      Looking at the code around that line, it looks like if $issitecourse is true then the bit of code that instantiates $usersnode will never be called and the current operations on that object fail.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10