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

Quiz overall feedback incorrect as based on rounded result

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.7
    • 1.9.11
    • Quiz
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Moderate

    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

            timhunt Tim Hunt
            davosmith Davo Smith
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              21/Feb/11