Moodle
  1. Moodle
  2. MDL-26576

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      16353

      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

        Activity

        Hide
        Tim Hunt added a comment -

        This was a regression from fe6ce2348945f267b3d90ed74442a221c0a9808d, MDL-16094.

        Show
        Tim Hunt added a comment - This was a regression from fe6ce2348945f267b3d90ed74442a221c0a9808d, MDL-16094 .
        Hide
        Helen Foster added a comment -

        James, thanks for your report and Tim, thanks for fixing the problem. The fix is available in the latest Moodle 2.0.2+ weekly.

        Show
        Helen Foster added a comment - James, thanks for your report and Tim, thanks for fixing the problem. The fix is available in the latest Moodle 2.0.2+ weekly.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: