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

XMLWordPrintable

    • Any
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE

      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.

            andyjdavis Andrew Davis
            tlock Tim Lock
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.