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

Exception "array_merge" on grader report without grade items and category total

      There is an error "Exception - array_merge(): Argument #2 must be of type array, null given" on grader report having no grade items and having no category total.

      Steps to reproduce:

      1. As an admin ensure Grades > Grade category settings > Available aggregation types contains "Mean of grades"
      2. Create a new course
      3. Go to "Grades" in the created course
      4. Go to "Gradebook setup"
      5. Under Action choose "Edit category"
      6. Set Aggregation to "Mean of grades", set Grade type to "None" and Save
      7. Go to "Grader report"
      8. Following error appears: "Exception - array_merge(): Argument #2 must be of type array, null given"

      Warning: foreach() argument must be of type array|object, null given in /var/www/html/grade/report/grader/lib.php on line 794
       
      Warning: Undefined array key 1 in /var/www/html/grade/report/grader/lib.php on line 1216
       
      Warning: Attempt to read property "cells" on null in /var/www/html/grade/report/grader/lib.php on line 1216
       
      Exception - array_merge(): Argument #2 must be of type array, null given
       
      More information about this error
      Debug info:
      Error code: generalexceptionmessage
      Stack trace:
       
          line 1216 of /grade/report/grader/lib.php: TypeError thrown
          line 1216 of /grade/report/grader/lib.php: call to array_merge()
          line 182 of /grade/report/grader/index.php: call to grade_report_grader->get_grade_table()
      

       

            jayce.birrell@moodle.com Jayce Birrell
            voegi Sascha Vogel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 58 minutes
                3h 58m

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