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

Quiz Grades report has inconsistent students logic

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.2.5, 3.3.2
    • None
    • Quiz
    • MOODLE_32_STABLE, MOODLE_33_STABLE

    Description

      The Quiz Grades report has inconsistent students logic depending on if you are filtering by a group or not. If you are reporting without a group you get all students ever enrolled but if you filter on a group you get only currently enrolled students.

      From mod/quiz/report/attemptsreport.php in get_students_joins are these lines.

      $studentsjoins = get_enrolled_with_capabilities_join($this->context);

      // We have a currently selected group.
      $groupstudentsjoins = get_enrolled_with_capabilities_join($this->context, '',
      array('mod/quiz:attempt', 'mod/quiz:reviewmyattempts'), $currentgroup);

      This change came from MDL-27072. Before that both cases used the capabilities so you only reported on currently enrolled students. I did not see in the discussion of MDL-27072 where this was done intentionally.

      I think this is a bug and both cases should use the same logic for selecting students. I would favor adding the capabilities back to the first case as that returns the logic from before MDL-27072. Once I know which should be correct I can supply a patch.

      Note for this problem to show you need an uneroll action of Disable and remove roles rather than Unenroll from course.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              jsw Jeff Webster
              Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Raquel Ortega, Sabina Abellan, Sander Bangma, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: