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

Incorrect total on user grade report when showing totals excluding hidden items and sum of grades aggregation

XMLWordPrintable

    • MOODLE_22_STABLE

      Here are the category items and their totals for an example.

      grade                   score/
      item    score   Max     max
      ====	=====	===     ======
      1790    32      60      0.5333		
      1821    38      80      0.475		
      1773    76     320      0.2375		
      1778    45      45      1		
      1779    13      45      0.2889		
      1785     0      80      0		
      1822    23.2    64      0.3625   extra credit
      ====   =====   ===      ======
      1746   227.2   694      2.8972 (summation from above)
       
      Count of category items included: 7

      The grader report shows a total of 227.2.
      The user report shows a total of 260.75, which is calculated from 2.8972/7 * (694 - 64) = 260.75

      This is clearly faulty logic because it sums and averages the percentages for each category as if they each have the same weight.

      The path through the code is roughly as follows:

      blank_hidden_total (in grade/report/lib.php) calls get_hiding_affected (in lib/grade/grade_grade.php).
      get_hiding_affected calls standardise_score (which essentially computes percentages in this case).
      get_hiding_affected calls aggregate_values (which sums the percentages)
      get_hiding_affected calls standardise_score to rescale relative to max grade.

            Unassigned Unassigned
            colin Colin Campbell (Inactive)
            Votes:
            16 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:

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