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

Gradebook fails to properly calculate score when using "drop X lowest" and "exclude assignment"



    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.3
    • 1.9.1
    • Gradebook
    • None
    • Moodle 1.8.3 (2007021534), MySQl 5.0.27, PHP 5.2.0
    • MySQL


      If the Gradebook is configured to drop the lowest grade AND is setup to exclude an assignment for certain students, it will incorrectly calculate the grades for the excluded students. This bug is shared with Gradebook Plus, as documented here:


      Recreating the Problem

      • Assign three students to a course.
      • Create four offline quizzes with a 100 point scale.
      • Create one offline extra credit assignment with a 100 point scale.
      • Give everyone in the first event a 25/100.
      • For the next three events, give them 100 grades.
      • Leave the last event blank; don't given anyone grades.
      • Go to Set Perfences and Turn on Advanced Feature

      This will cause the gradebook to add the five quizzes together and divide by 5. The point total is

      325/500 because the fifth quiz hasn't been taken and has a score of 0. The score is 65%.

      If we go to "Set weights" and set "Drop X Lowest" to 1, then the point total becomes 325/400 as number

      of quizzes is reduced by one and the maximum score drops from 500 to 400. The score is 81.25% because we

      dropped the lowest grade. Note that the lowest grade in this case is the 0 in extra credit NOT the 25 on

      Offline #1 as might first be expected.

      Because students will only receive a grade if they participate in it, we want to exclude the Extra

      Credit results unless someone has a grade. To do this, we use "Grade Exceptions" to omit the students

      with no grade from the Extra Credit assignment.

      **This does not have the effect we were expecting for the excluded students.**

      There is a total of 400 points for the 5 assignments, because we are chosing to drop the lowest grade.

      However, the lowest grade (the 25 from Offline Quiz #1) is still being included in the total, making the

      student's grade 325/400 when it should be 300/400.

      At the same time, the Gradebook is still dividing the student's score as though it had dropped the

      lowest grade AND excluded the Extra Credit column – it divides 325 by 3. That gives us a percentage

      grade of 108.33.

      If we assign a grade to the extra credit assignment, say a 100/100, then everything works properly: the

      lowest grade is dropped and we're given a total of 400 out of 400 points, yielding our student a 100%


      The remaining students still have wonky grades however.

      As a work around, We can assign one of them a score of 0/100 for the extra credit assignmnet continue to

      exclude the assignment. If we do this, the "total" remains 400, but the student's grade becomes 300.

      Moodle then correctly excludes the Extra Credit assignment and drops the lowest grade (the "25" for

      Offline Quiz #1). This yields us a grade of 100% as well.

      The student we didn't change – which still has no value for the excluded assignment – still has a

      grade of 108.33%

      This is not a problem if we remove the "Drop X Lowest Grade" option. In this case, the excluded grades

      are calculated correctly regardless of whether they have a 0 value or not.


        1. backup-mdl-12842-20080107-2109.zip
          5 kB
        2. backup-mdl-12842-20080107-2225.zip
          5 kB
        3. backup-mdl-12842p-20080223-0915.zip
          6 kB
        4. backup-ts101-20080109-1104.zip
          5 kB
        5. backup-ts101-20080109-1146.zip
          5 kB
        6. grade_exceptions_fix.diff
          1 kB
        7. MDL-12842_SampleDataAnalysis.ods
          14 kB
        8. MDL-12842-analysis.png
          155 kB
        9. MDL-12842-applied.png
          133 kB
        10. MDL-12842-gradebook.png
          117 kB
        11. MDL-12842-notes.diff
          5 kB
        12. MDL-12842p.png
          131 kB
        13. TS101_Grades.ods
          3 kB

        Issue Links



              aborrow Anthony Borrow
              lafayettenuke Kenneth Newquist
              Kenneth Newquist Kenneth Newquist
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski
              8 Vote for this issue
              5 Start watching this issue