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

Grade book averages are wrong if a student has multiple roles or has been deleted

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.6, 1.9.11
    • Fix Version/s: 1.9.12, 2.0.3, 2.1
    • Component/s: Gradebook
    • Labels:
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE

      Description

      Moodle version: 1.9.6 (Build: 20091021)
      Grades selected for column averages set to 'Non-empty grades'
      Graded roles as enrolled student and manually assigned student.

      If a student has multiple roles, the averages are counted multiple times.

      John & Jeff got 50% for the quiz and James didn't get anything.
      John is an enrolled student and manually assigned student.
      Jeff & James is are enrolled students.

      Average was 50 * 2 + 50 + 0 = 150 / 1 = 150.
      Average should be 50 + 50 + 0 = 100 / 2 = 50.

      Reason for difference is the scores were added multiple times to the total and non-emply grades were less because the count of students with graders was greater because of the multiple roles. ie: 14 students - 9 grades = 5 non empty grades when it should be 6.

      Fix attached.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  5 Vote for this issue
                  Watchers:
                  10 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    5/May/11