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

Categories with grade type set to "None" render a header cell, but no table cells, causing all other columns in the Grader report to shift to the left



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.0.1
    • Fix Version/s: None
    • Component/s: Gradebook
    • Labels:
    • Affected Branches:


      In the Gradebook, if you have a category with its grade type set to "none", the header for that category will display in the Grader report, but its corresponding column cells are not output. This has several effects:

      1. The column itself does not display, but the header does.
      2. The other columns shift to the left, appearing under the existing headers
      3. Because the category cells do not appear AND the other columns shift, it appears that you entering values for one column, when in fact your are adding them for its neighbor.
      4. As a result of this, it is entirely possible to enter values into the wrong column without realizing you've done so.

      Confirmed in 3.0.1 using Clean.

      There are several tracker issues (all marked as duplicates) that mention similar issues, but display differently. These issues were reported fixed and closed around the 2.3/2.4 era; this appears to be the main ticket regarding the earlier iteration of this issue:

      • MDL-29327 - mess grade categories and items table when categories' grade type is set as none


      1. Create a new category called "None"
      2. Set "Aggregation Method" to "Simple Weighted Mean of Grades" (or anything other than "Natural"
      3. Under "Grade Type", choose "None"
      4. Save the category.
      5. Create an additional category called "Foo" with "Aggregation Method" set to "Natural" (grade type defaults to "Value" and can't be changed)
      6. Create two new grade items with in "Foo" ("Foo-item 1" and "Foo-item 2")
      7. Create an additional category called "Bar" with "Aggregation Method" set to "Natural" (grade type defaults to "Value" and can't be changed)
      8. Create two new grade items with in "Bar" ("Bar-item 1" and "Bar-item 2")
      9. Go to the Grader Report
      10. The initial "None" category has a header, but no cells. This causes all of the subsequent cells to shift one step to the left.


      Given that the category header is appearing in the Grader report, I would expect the cells associated with that column to appear in the gradebook as well. They would be empty, but they would be there (thus preventing the neighboring columns from shifting to the left).

      A few additional notes:

      • This only happens if the aggregation method is set to something other than Natural because Natural won't allow you to set a grade value to "none".
      • This is not a problem if the category in question has a grade item in it.
      • Setting the weight for the category to "0" is not equivalent; the column displays just fine in that scenario.


          Issue Links



              Unassigned Unassigned
              lafayettenuke Kenneth Newquist
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              5 Vote for this issue
              5 Start watching this issue