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

Quiz overview report is not showing all the students when the quiz has feedback and the "Show All Studients" option is selected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.7
    • Fix Version/s: 1.8.8
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      all platforms
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      • Summary

      Quiz overview report is not showing all the participans when the quiz has feedback and the "Show All Studients" option is selected

      • Description

      We think the problem is located near line 412 (mod/quiz/report/overview.php), in this code:

      if ($hasfeedback) {
      $factor = $quiz->grade/$quiz->sumgrades;
      $select .= ', qf.feedbacktext ';
      $from .= " JOIN {$CFG->prefix}quiz_feedback qf ON " .
      "qf.quizid = $quiz->id AND qf.mingrade <= qa.sumgrades * $factor AND qa.sumgrades * $factor < qf.maxgrade";
      }

      A LEFT before the JOIN is missing, so the correct sql should be:

      $from .= " LEFT JOIN {$CFG->prefix}quiz_feedback qf ON " .
      "qf.quizid = $quiz->id AND qf.mingrade <= qa.sumgrades * $factor AND qa.sumgrades * $factor < qf.maxgrade";

      • Steps to Reproduce:
      • Go to a quiz with user attemps and feedback
      • Select Results
      • Run a report selecting "Show all students" at the bottom
      • Actual Results: Only the students with attemps
      • Expected Results: All the students in the course or group

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            juan-leyva Juan Leyva (CV&A)
            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:
              28/Jan/09