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

PHP errors when minimising grader report without capability 'moodle/grade:viewhidden'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.9.5, 3.0.3
    • 2.9.2
    • Gradebook
    • MOODLE_29_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-52218_master_alt
    • Hide
      Test 1
      1. Ensure debugging is turned on.
      2. Create a course with an assignment.
      3. Enrol a user as a 'Non-editing teacher'.
      4. Visit 'Course administration' > 'Users' > 'Permissions'.
      5. Choose the 'Non-editing teacher' role from the drop down.
      6. In the 'Filter' text input type 'moodle/grade:viewhidden'.
      7. Set this capability to 'Prevent' and save your changes.
      8. Log in as the non-editing teacher and go to the course.
      9. Visit 'Grade administration' > 'Grader report'.
      10. Click on the icon next to the course name to expand what is shown (Assignment with course total, just the assignment, just course total) and check there are no errors.
      Test 2
      1. Run all the behat tests with the tag @gradereport_grader.
      Show
      Test 1 Ensure debugging is turned on. Create a course with an assignment. Enrol a user as a 'Non-editing teacher'. Visit 'Course administration' > 'Users' > 'Permissions'. Choose the 'Non-editing teacher' role from the drop down. In the 'Filter' text input type 'moodle/grade:viewhidden'. Set this capability to 'Prevent' and save your changes. Log in as the non-editing teacher and go to the course. Visit 'Grade administration' > 'Grader report'. Click on the icon next to the course name to expand what is shown (Assignment with course total, just the assignment, just course total) and check there are no errors. Test 2 Run all the behat tests with the tag @gradereport_grader.
    • 3.1 Stable Sprint 2, 3.1 Sprint 3

      If a user that has the rights to do gradings but has not the capability to view hidden grades minimizes elements of the grading table, he is not able to maximize it anymore.

      With debugging enabled, following messages occur:

      Strict Standards: Only variables should be passed by reference in /var/www/html/moodle_test/grade/report/grader/lib.php on line 896
      Notice: Undefined offset: 9598 in /var/www/html/moodle_test/lib/grade/grade_grade.php on line 708
       
      Warning: array_merge(): Argument #2 is not an array in /var/www/html/moodle_test/lib/grade/grade_grade.php on line 708
       
      Warning: array_unique() expects parameter 1 to be array, null given in /var/www/html/moodle_test/lib/grade/grade_grade.php on line 708
       
      Warning: sort() expects parameter 1 to be array, null given in /var/www/html/moodle_test/lib/grade/grade_grade.php on line 709
       
      Notice: Undefined offset: 9602 in /var/www/html/moodle_test/lib/grade/grade_grade.php on line 708
      

      It's should be somehow prevented that Moodle ends up stucked in that scenario.

            markn Mark Nelson
            kosswa Kathrin Osswald
            cameron1729 cameron1729
            Dan Poltawski Dan Poltawski
            John Okely John Okely
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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