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

Gradebook Sum of grades shows wrong total if items are hidden

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Run all gradebook unit tests and behat tests.

      1. Create a new empty course.
      2. Set the aggregation for the course grade item to be sum of grades.
      3. Enrol 1 student to the course.
      4. Create 3 assignments in the course with default settings.
      5. Go to gradebook and grade the student with scores of 10, 20, 30.
      6. Configure the grade display type to "Real (percentage)".
      7. Configure the "Hide totals if they contain hidden items" to "Show totals excluding hidden items" for both the user report and the overview report.
      8. Hide the first grade column.
      9. View the overview report for the student.
      10. The grade for the student for this course should show as "60.00 (20.00 %)".
      11. Login as the student and go to grades overview report.
      12. See the course grade should be "50.00 (25.00 %)".
      Show
      Run all gradebook unit tests and behat tests. Create a new empty course. Set the aggregation for the course grade item to be sum of grades. Enrol 1 student to the course. Create 3 assignments in the course with default settings. Go to gradebook and grade the student with scores of 10, 20, 30. Configure the grade display type to "Real (percentage)". Configure the "Hide totals if they contain hidden items" to "Show totals excluding hidden items" for both the user report and the overview report. Hide the first grade column. View the overview report for the student. The grade for the student for this course should show as "60.00 (20.00 %)". Login as the student and go to grades overview report. See the course grade should be "50.00 (25.00 %)".
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Epic Link:
    • Pull from Repository:
    • Pull Master Branch:
      MDL-35984-master
    • Story Points:
      20
    • Sprint:
      BACKEND Sprint 15

      Description

      When using the Sum of grades aggregation, if one of more items are hidden the total shown to students is no longer the correct Sum and appears to be the 'Mean of grades'

      Steps to reproduce:
      Make 4 Assignments (or just grade items), set their max grades to 10, 20, 30 and 40 (total = 100 to make it easy)
      Find a student and mark them for each so their scores are 5/10, 10/20, 15/30, 20/40 (50% for all)

      Set the Aggregation in Grades to 'Sum of grades'
      ('Extra credit' and 'Aggregate only non-empty grades' all unticked)
      View User report and you'll see a total of 50/100 for the student (or login with the student account for the same view)

      Asmt1 5.00 0-10
      Asmt2 10.00 0-20
      Asmt3 15.00 0-30
      Asmt4 20.00 0-40
      Total 50.00 0-100

      Go to "Full view' and hide assignment 4 (I used with the 'eye' in the Actions list but other methods produce the same result)
      Go to 'Course grade settings',
      Change 'Hide totals if they contain hidden items' to 'Show totals excluding hidden items'
      And change 'Show hidden items' to 'Do not show'
      View User report
      The 3 remaining items are 5, 10, 15 which total 30 however total shown is now 37.5/100

      Asmt1 5.00 0-10
      Asmt2 10.00 0-20
      Asmt3 15.00 0-30
      Total 37.50 0-100

      Whichever item is hidden the total is always 37.5/100, if 2 items are hidden the total is 25/100.

      Expecting that when an item is hidden the Sum total should not include it so when item 4 was hidden the total should be 60 and the student score 30/60 however the total remains at 100.

      I've tested this in 2.3, 2.1 and 2.0 all do the same.

      I couldn't find anything similar in the tracker but found this which may be related:
      http://tracker.moodle.org/browse/MDL-14831

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              damyon Damyon Wiese
              Reporter:
              mal Malcolm Abel
              Peer reviewer:
              Andrew Davis
              Integrator:
              Marina Glancy
              Tester:
              Mark Nelson
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              21 Vote for this issue
              Watchers:
              25 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Sep/14