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

Errors on Quiz review page if there is no entry for the quiz in the quiz_feedback table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Quiz
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      When reviewing a quiz that has no entry in the quiz_feedback table I get the following errors (below) because it is trying to use the id and feedbacktextformat retrieved feedback row.

      In the quiz_feedback_for_grade() function it is already setting feedbacktext = '' if it's empty, maybe in there it could check if there was an id retrieved, and if not just bomb out of the function?

      ! ) Notice: Undefined property: stdClass::$id in /fs1/www_root/jecb5/ou-moodle2/mod/quiz/locallib.php on line 471
      Call Stack

      1. Time Memory Function Location
        1 0.0000 626216 {main}( ) ../review.php:0
        2 1.0203 17787944 quiz->get_overall_feedback( ) ../review.php:203
        3 1.0203 17787944 quiz_feedback_for_grade( ) ../attemptlib.php:293

        ( ! ) Notice: Undefined property: stdClass::$feedbacktextformat in /fs1/www_root/jecb5/ou-moodle2/mod/quiz/locallib.php on line 472
        Call Stack
        # Time Memory Function Location
        1 0.0000 626216 {main}

        ( ) ../review.php:0
        2 1.0203 17787944 quiz->get_overall_feedback( ) ../review.php:203
        3 1.0203 17787944 quiz_feedback_for_grade( ) ../attemptlib.php:293

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            mrbriz James Brisland
            Tester:
            Helen Foster
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/May/11