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

Manual grade items default to extra credit when added to Natural category with course aggregation set to Weighted Means

    XMLWordPrintable

    Details

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

      Description

      The aggregation for the course is Weighted mean of grades. A category within the course is set to Natural aggregation. A manual grade item is added to the category using Natural aggregation. The manual grade item defaults to having Extra Credit selected. The extra credit field is not visible during creation of the grade item.

      [Investigation Details]
      1. Replicated in a 2.8.6 environment.
      2. This seems similar to MDL-50062, but I think might be a separate issue.
      3. As documented at https://tracker.moodle.org/browse/MDL-50062?focusedCommentId=357330&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-357330 the weighted mean of grades and natural aggregation methods use the mdl_grade_items.aggregationcoef and aggregationcoef2 fields differently. When a new manual grade item is added to a category using Natural aggregation within a course using Weighted means of grades, it looks like the weight is being applied to the wrong field.

      Course Aggregation Category Aggregation New Manual Grade Item aggregationcoef New Manual Grade Item aggregationcoef2
      Natural Natural 0 1
      Weighted mean of grades Natural 1 0

      4. Repeated the steps to replicate cycling through each of the possible aggregation values. Only weighted mean of grades produced the problem.
      5. Alternate steps to replicate demonstrate that the issue can be replicated when the system default aggregation is set to something other than weighted mean of grades so long as the course's aggregation is later set to weighted mean of grades. I also tested variations of these steps. Creation of the Natural category before or after changing the course aggregation made no difference. In either case, new grade items created in a category using Natural aggregation default to having extra credit selected once the course aggregation is set to Weighted means of grades.

      [Steps to Replicate]
      1. Go to Site Administration > Grades > Grade category settings.
      2. Set Aggregation to Weighted means of grades
      3. Create a new course.
      4. In the new course go to Course Administration > Grades > Setup > Categories and items.
      5. Add a new category with aggregation set to Natural.
      6. Add a new manual grade item assigned to the category created in the previous step.
      7. Edit the new grade item.

      Observed behavior:
      The Extra Credit checkbox is selected.

      Expected behavior:
      The Extra Credit checkbox is not selected.

      [Alternative Steps to Replicate]
      1. Go to Site Administration > Grades > Grade category settings.
      2. Set Aggregation to Natural.
      3. Create a new course.
      4. In the new course go to Course Administration > Grades > Setup > Categories and items.
      5. Edit the course category.
      6. Set Aggregation to Weighted mean of grades.
      7. Add a new category with aggregation set to Natural.
      8. Add a new manual grade item assigned to the category created in the previous step.
      9. Edit the new grade item.

      Observed behavior:
      The Extra Credit checkbox is selected.

      Expected behavior:
      The Extra Credit checkbox is not selected.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              brian.winstead Brian Winstead
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              8 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: