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

Gradebook overall average row is miscalculated with suspended users

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.7.3, 2.9
    • Gradebook
    • None
    • MOODLE_27_STABLE, MOODLE_29_STABLE

      The gradebook overall average is miscalculating when one or more users have suspended enrolments in the following conditions.

      • "Show only active enrolments" is set to yes
      • "Grades selected for column averages" is set to Non-empty grades
      • There is a user who has a suspended enrolment

      This is relatively easy to reproduce -

      • Add a new course with standard defaults
      • Enrol three students as manual enrolments
      • Edit one of the manual enrolments and set status to suspended
      • Create an assignment activity with standard defaults and grade the two (active) users with 50 out of 100
      • Go to the Gradebook, making sure these settings are set in "My preferences" (they are standard defaults anyway)
      • "Show only active enrolments" is set to yes
      • "Grades selected for column averages" is set to Non-empty grades
      • Note Overall average shown in Grader report
        EXPECTED: Overall average should be 50
        ACTUAL: Overall average is 100

      This is because it is calculating the average based on 1 student instead of 2. It seems to be taking the number of suspended students away from the number of active students, and using this as the total to be divided by. Continuing on from above steps

      • enrol two more students and suspend their enrolments
      • Note Overall average shown in Grader report
        EXPECTED: Overall average should be 50
        ACTUAL: Overall average is -100

      This is calculated by a -1 total number of students (2 active - 3 suspended).

      Seems like a serious bug, and able to reproduce in 2.7.3 and latest Moodle 2.9dev (Build: 20150129)

            Unassigned Unassigned
            hugh2323 Lloyd Powell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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