Moodle

1.95 Gradebook added items default to extra credit

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.6
  • Component/s: Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

If main (course) grade category is set to "Weighted mean of grades" and grade subcategory is added with "Simple weighted mean of grades" (a very common scenario) any grade items added to the subcategory default to extra credit.

Activity

Hide
Courtney Bentley added a comment -

I'm finding this happens even when "Sum of grades" is used as a subcategory. I'll check to see if changing the course category has an effect, but this is going to be a BIG issue when faculty come back in a month and all their grade items show up as extra credit.

Show
Courtney Bentley added a comment - I'm finding this happens even when "Sum of grades" is used as a subcategory. I'll check to see if changing the course category has an effect, but this is going to be a BIG issue when faculty come back in a month and all their grade items show up as extra credit.
Hide
Brian Pool added a comment -

We are trying to find a way to fix this...it is a pretty big issue for a K-12 environment as every class uses Weighted Mean of Grades for the Main category. We have to do that to make the current quarter 100% of the grade. Inside that teachers select the appropriate calculation method. However, because the main course is weighted, all added grade items are indeed extra credit. Teachers don't even see it unless they go full view as that cannot be included in the simple view. A BIG PROLEM!

Show
Brian Pool added a comment - We are trying to find a way to fix this...it is a pretty big issue for a K-12 environment as every class uses Weighted Mean of Grades for the Main category. We have to do that to make the current quarter 100% of the grade. Inside that teachers select the appropriate calculation method. However, because the main course is weighted, all added grade items are indeed extra credit. Teachers don't even see it unless they go full view as that cannot be included in the simple view. A BIG PROLEM!
Hide
Nicolas Connault added a comment - - edited

This is another problem associated with the field "aggregationcoef" meaning different things under different aggregation strategies. In Weighted mean of grades, it is the coefficient of the grade (1 by default), whereas in SUM it is a boolean (0 = not extra credit, 1 = extra credit). The only easy way to fix it for now is to convert this value to 0 automatically when a grade is transferred to a category that is set to SWM. Looking at this now.

Show
Nicolas Connault added a comment - - edited This is another problem associated with the field "aggregationcoef" meaning different things under different aggregation strategies. In Weighted mean of grades, it is the coefficient of the grade (1 by default), whereas in SUM it is a boolean (0 = not extra credit, 1 = extra credit). The only easy way to fix it for now is to convert this value to 0 automatically when a grade is transferred to a category that is set to SWM. Looking at this now.
Hide
Nicolas Connault added a comment -

OK fixed: defaulting all grade items to non-extra-credit when moving to a SWM category, except if they originally came from a SWM category and were set as extra credit there.

Show
Nicolas Connault added a comment - OK fixed: defaulting all grade items to non-extra-credit when moving to a SWM category, except if they originally came from a SWM category and were set as extra credit there.
Hide
Dakota Duff added a comment -

Nicolas, can you post the fix so we can apply it to a 1.9.5 site?

Show
Dakota Duff added a comment - Nicolas, can you post the fix so we can apply it to a 1.9.5 site?
Hide
Colin Campbell added a comment -

Nicolas, can you also fix the same problem for "Sum of grades"? As Courtney mentioned above, the problem is not limited to SWM.

I believe the logic would be that aggregationcoef should be set to zero if the item is coming from an aggregation other than SWM or "Sum of grades" and is going to either SWM or "Sum of grades".

Here is a change (on top of yours) that appears to work on our development server. Do you see any issues with this approach?

$currentparent = $this->load_parent_category();

  • if ($currentparent->aggregation != GRADE_AGGREGATE_WEIGHTED_MEAN2 && $parent_category->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN2) {
    + if ($currentparent->aggregation != GRADE_AGGREGATE_WEIGHTED_MEAN2 && $currentparent->aggregation != GRADE_AGGREGATE_SUM
    + && ($parent_category->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN2 || $parent_category->aggregation == GRADE_AGGREGATE_SUM)) { $this->aggregationcoef = 0; }
Show
Colin Campbell added a comment - Nicolas, can you also fix the same problem for "Sum of grades"? As Courtney mentioned above, the problem is not limited to SWM. I believe the logic would be that aggregationcoef should be set to zero if the item is coming from an aggregation other than SWM or "Sum of grades" and is going to either SWM or "Sum of grades". Here is a change (on top of yours) that appears to work on our development server. Do you see any issues with this approach? $currentparent = $this->load_parent_category();
  • if ($currentparent->aggregation != GRADE_AGGREGATE_WEIGHTED_MEAN2 && $parent_category->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN2) { + if ($currentparent->aggregation != GRADE_AGGREGATE_WEIGHTED_MEAN2 && $currentparent->aggregation != GRADE_AGGREGATE_SUM + && ($parent_category->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN2 || $parent_category->aggregation == GRADE_AGGREGATE_SUM)) { $this->aggregationcoef = 0; }
Hide
Robert Puffer added a comment -

This issue isn't really resolved as is indicated by MDL-21180 (patch supplied). Changing agg methods for cats will cause LOTS of extra credit.

Show
Robert Puffer added a comment - This issue isn't really resolved as is indicated by MDL-21180 (patch supplied). Changing agg methods for cats will cause LOTS of extra credit.

People

Dates

  • Created:
    Updated:
    Resolved: