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

Error in user report when viewed within an empty course

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.1 regressions, 4.1.2
    • 4.1.3
    • Gradebook

    Description

      This seems to be a problem introduced by MDL-75513. To replicate:

      1. Create a course but don't enrol any students.
      2. Go to Gradebook -> User report
      3. Notice the following error on the page:

        Warning:  Undefined variable $users in /home/jake/moodledata/s401/moodle/grade/report/user/renderer.php on line 150
         
        Exception - array_keys(): Argument #1 ($array) must be of type array, null givenMore information about this error
        Debug info:  
        Error code: generalexceptionmessage
            
        Stack trace:  line 150 of /grade/report/user/renderer.php: TypeError thrownline 150 of /grade/report/user/renderer.php: call to array_keys()line 171 of /grade/report/user/index.php: call to gradereport_user_renderer->user_navigation() 

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              jaked Jake Dallimore
              Mathew May Mathew May
              Ilya Tregubov Ilya Tregubov
              Kim Jared Lucas Kim Jared Lucas
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                24/Apr/23

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 51 minutes
                  51m