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

Error being logged when navigating from gradebook to quiz

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Make sure you have Debugging set to developer level.
      2. Create a course.
      3. Add a quiz.
      4. Add a true-false question.
      5. Attempt the quiz as a student.
      6. As a teacher, go to the gradebook, grader report.
      7. Find the student's grade, and click the 'Grade analysis' magnifying glass icon.
      8. Verify that no PHP Notice is output during the redirect.
      Show
      Make sure you have Debugging set to developer level. Create a course. Add a quiz. Add a true-false question. Attempt the quiz as a student. As a teacher, go to the gradebook, grader report. Find the student's grade, and click the 'Grade analysis' magnifying glass icon. Verify that no PHP Notice is output during the redirect.
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull Master Branch:

      Description

      To reproduce:

      1. Create a course.
      2. Add a quiz.
      3. Add a true-false question.
      4. Attempt the quiz as a student.
      5. As a teacher, go to the gradebook, grader report.
      6. Find the student's grade, and click the 'Grade analysis' magnifying glass icon.

      Actual result: an error appears in the logs:

      Warning: count(): Parameter must be an array or an object that implements Countable in /.../www/html/vle/mod/quiz/attemptlib.php on line 1501 Call Stack:

      0.0012   424440 1. {main}() /.../www/html/vle/mod/quiz/grade.php:0
      1.3443 40166040 2. quiz_attempt->review_url() /.../www/html/vle/mod/quiz/grade.php:84
      1.3443 40166040 3. quiz_attempt->page_and_question_url() /.../www/html/vle/mod/quiz/attemptlib.php:1492
      1.3443 40166040 4. quiz_attempt->get_default_show_all() /.../www/html/vle/mod/quiz/attemptlib.php:2151
      

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            timhunt Tim Hunt
            Peer reviewer:
            Mahmoud Kassaei Mahmoud Kassaei
            Integrator:
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Tester:
            Anna Carissa Sadia Anna Carissa Sadia
            Participants:
            Component watchers:
            Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Mar/20

                Time Tracking

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