Moodle

Reports:Grades page: questions averages are missing where quiz attempts is set to "1 attempt"

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.6
  • Component/s: Quiz
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

It does not show question averages when the quiz set to "1 attempt". The attached patch fixes the issue.

Activity

Hide
Tim Hunt added a comment -

Ah, acutally, half this fix is already in Moodle 1.9 in a slightly different way, but not all of it. The bit in quiz_get_average_grade_for_questions is done using the ? : operator in the SQL, as

...
                        WHERE " .
                        ($qmfilter?$qmfilter.' AND ':'') .
                        "qa.userid $usql AND " .
                        "qa.quiz = ? ".
                        "GROUP BY qns.questionid";
Show
Tim Hunt added a comment - Ah, acutally, half this fix is already in Moodle 1.9 in a slightly different way, but not all of it. The bit in quiz_get_average_grade_for_questions is done using the ? : operator in the SQL, as
...
                        WHERE " .
                        ($qmfilter?$qmfilter.' AND ':'') .
                        "qa.userid $usql AND " .
                        "qa.quiz = ? ".
                        "GROUP BY qns.questionid";
Hide
Tim Hunt added a comment -

Fix committed.

Show
Tim Hunt added a comment - Fix committed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: