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

Quiz overall feedback incorrect as based on rounded result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.11
    • Component/s: Quiz
    • Labels:
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      1. Create a quiz with 15 questions
      2. Set the overall feedback to display "You passed!" for 70% => 100% and "Try again" for 0% => 70%
      3. Attempt the quiz and get 10 questions right (i.e. 66.7%)
      4. View any of the feedback reports

      Expected result:
      "Try again" is displayed (as student did not reach the 70% pass mark)

      Actual result:
      "You passed!" is displayed

      The problem seems to be that 'quiz_report_feedback_for_grade' is called using the output of 'quiz_rescale_grade'. However, the third parameter is left as the default 'true', so the grade is rounded to 7 (out of 10), before it is returned.

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            davosmith Davo Smith
            Tester:
            Eloy Lafuente (stronk7)
            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:
              21/Feb/11