Note: You are currently viewing documentation for Moodle 2.9. Up-to-date documentation for the latest stable version of Moodle may be available here: Gradebook calculation changes.

Gradebook calculation changes: Difference between revisions

From MoodleDocs
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''As decided in MDL-50582 and MDL-50222 all the bug fixes in grades calculations do not apply during upgrade if they can change the existing grades.'''
{{Grades}}


During upgrade Moodle will identify which courses are affected by the bug fix and '''freeze the gradebook calculation methods''' to the previous version. The message will be displayed to the teacher and teacher must manually accept the potential changes in the grades.
<p class="note">Note: The following information only applies if you see a message displayed in the gradebook following a site upgrade, or after restoring a course backup from a different version of Moodle.</p>


Below is the list of all the fixes since gradebook versioning was introduced. The 8-digit version number is the date of the fix. Your Moodle release number also contains the 8-digit number that refers to the date when this version was build. Accepting the changes will progress your "gradebook code version" from the one when it was freezed to the latest available in your current version. Please note that if you are not using the latest weekly release this page may contain the fixes that are not yet available in your Moodle.
== Overview ==


Occasionally there are error fixes which can affect gradebook calculations in certain courses. As part of the upgrade process, such courses are identified and a message is displayed in the gradebook informing teachers that error fixes may result in some grades being changed. Details of these changes are provided below. The 8-digit version number is the date of the fix.


=== 20150619 MDL-49257 Calculation of the extra credit items weights in Natural aggregation method (version 2.8 and above) ===
It is recommended that the errors are fixed by clicking the button 'Accept grade changes and fix calculation errors'. Until this is done, the message will continue to be displayed in the gradebook (only for teachers; students can't see it). The old gradebook calculations will still be used (ensuring grades remain unchanged), however they are likely to result in more errors if grades are updated in the future.


Two bugs were fixed here. First, very critical: overriding the weight of the extra credit item can lead to changes in other items' weights and pretty random final grades. Second, the automatic weight of extra credit item was dependent on the overrides of the normal item's weights (and it should not). This especially becomes noticeable for the students that have grade items excluded them from totals (for example, when they are hidden or empty). [https://tracker.moodle.org/browse/MDL-49257?focusedCommentId=358765&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-358765 Here] you can find lots of the screenshots of before/after behaviour (note that table is very wide and the horizontal scrollbar appears underneath).
== How to find all courses that are affected ==
 
    select * from mdl_config where name like 'gradebook_calculations_freeze_%';
 
That will return rows containing things like "gradebook_calculations_freeze_211". That means that course 211 is affected. So, the URL to get to the gradebook for that course is .../grade/index.php?id=211 within your Moodle site. With a bit of clever search-and-replace, you can probably turn the output from the gradebook query into a set of URLs. For example the following is a more sophisicated version of this query that works well with the [https://moodle.org/plugins/view/report_customsql Ad-hoc database queries] plugin.
 
    SELECT substr(cfg.name, 31) AS Course_id,
        course.shortname AS Course_shortname,
        cfg.value AS Affected_by_changes_from,
        CONCAT('%%WWWROOT%%', '/grade/report/grader/index.php', CHR(63), 'id=', substr(cfg.name, 31)) AS Grader_report_url
   
    FROM {config} cfg
    JOIN {course} course ON course.id = CAST(substr(name, 31) AS INT)
   
    WHERE name LIKE 'gradebook_calculations_freeze_%'
   
    ORDER BY course.shortname
 
==Which uses will see this warning message and button in the gradebook?==
 
Only users with the [[Capabilities/moodle/grade:manage|moodle/grade:manage]] capability. The same one you need to edit categories and items in the gradebook. By default that is (editing) Teacher, Manager and Admin.
 
== How can I see what grades will change before I click this button? ==
 
The only real way to do this is to have a copy of your live site where you can test. (Some places always do this as part of the testing the do before upgrading Moodle.)
 
In that test copy you can use the report above to find all the gradebooks that are affected. Then, by using the [[Grade history]] report, you can see which grades change when you click the button, and confirm you are happy with this before doing this on your live site.
 
== Particular changes ==
 
=== 20150619 - Calculation of extra credit item weights when using natural aggregation ===
 
Two errors were fixed:
# Overriding the weight of the extra credit item can lead to changes in other items' weights and random final grades
# The automatic weight of an extra credit item was dependent on the overrides of the normal item's weights
 
The second error was especially noticeable for students with excluded grade items (for example, when they are hidden or empty).  
 
For example, a category has two normal grade items and one extra credit item. If the maximum grades for each item are the same, the weights of the three items will be: 50%, 50% and 50%. However if the weights of the normal items are overridden to be 50% and 50%, then the weight of the extra credit item would become 0%. If the teacher overrode the weight of the first item to 80%, the second item would automatically become 20% (correct) and the extra credit would also become 20% (incorrect).
 
The correct behaviour (after the fix): If the weight of extra credit item is not overridden, it should be itemmaxgrade / totalmaxgrade , where totalmaxgrade does not include the extra credit item. In the example, the weight of the extra credit item should always be 50%.
 
See MDL-49257 for further details including screenshots.
 
=== 20150627 - Calculated grade items ===
 
Two errors affecting grades were fixed:
# Changing the maxgrade for a category item with a calculation that has existing grades results in grades displayed out of the old maximum grade, not the updated one. This can cause flow on affects for automatic weights with Natural Aggregation.
# Values for grade items with a calculation are always displayed from 0 to 100 regardless of the minimum and maximum grades for the grade item. This can cause flow on affects for automatic weights with Natural Aggregation.
 
These fixes will impact existing grades by correcting the maximum grade for existing grade items.
 
See MDL-48239 for further details.

Latest revision as of 16:00, 19 November 2015


Note: The following information only applies if you see a message displayed in the gradebook following a site upgrade, or after restoring a course backup from a different version of Moodle.

Overview

Occasionally there are error fixes which can affect gradebook calculations in certain courses. As part of the upgrade process, such courses are identified and a message is displayed in the gradebook informing teachers that error fixes may result in some grades being changed. Details of these changes are provided below. The 8-digit version number is the date of the fix.

It is recommended that the errors are fixed by clicking the button 'Accept grade changes and fix calculation errors'. Until this is done, the message will continue to be displayed in the gradebook (only for teachers; students can't see it). The old gradebook calculations will still be used (ensuring grades remain unchanged), however they are likely to result in more errors if grades are updated in the future.

How to find all courses that are affected

   select * from mdl_config where name like 'gradebook_calculations_freeze_%';

That will return rows containing things like "gradebook_calculations_freeze_211". That means that course 211 is affected. So, the URL to get to the gradebook for that course is .../grade/index.php?id=211 within your Moodle site. With a bit of clever search-and-replace, you can probably turn the output from the gradebook query into a set of URLs. For example the following is a more sophisicated version of this query that works well with the Ad-hoc database queries plugin.

   SELECT substr(cfg.name, 31) AS Course_id,
       course.shortname AS Course_shortname,
       cfg.value AS Affected_by_changes_from,
       CONCAT('%%WWWROOT%%', '/grade/report/grader/index.php', CHR(63), 'id=', substr(cfg.name, 31)) AS Grader_report_url
   
   FROM {config} cfg
   JOIN {course} course ON course.id = CAST(substr(name, 31) AS INT)
   
   WHERE name LIKE 'gradebook_calculations_freeze_%'
   
   ORDER BY course.shortname

Which uses will see this warning message and button in the gradebook?

Only users with the moodle/grade:manage capability. The same one you need to edit categories and items in the gradebook. By default that is (editing) Teacher, Manager and Admin.

How can I see what grades will change before I click this button?

The only real way to do this is to have a copy of your live site where you can test. (Some places always do this as part of the testing the do before upgrading Moodle.)

In that test copy you can use the report above to find all the gradebooks that are affected. Then, by using the Grade history report, you can see which grades change when you click the button, and confirm you are happy with this before doing this on your live site.

Particular changes

20150619 - Calculation of extra credit item weights when using natural aggregation

Two errors were fixed:

  1. Overriding the weight of the extra credit item can lead to changes in other items' weights and random final grades
  2. The automatic weight of an extra credit item was dependent on the overrides of the normal item's weights

The second error was especially noticeable for students with excluded grade items (for example, when they are hidden or empty).

For example, a category has two normal grade items and one extra credit item. If the maximum grades for each item are the same, the weights of the three items will be: 50%, 50% and 50%. However if the weights of the normal items are overridden to be 50% and 50%, then the weight of the extra credit item would become 0%. If the teacher overrode the weight of the first item to 80%, the second item would automatically become 20% (correct) and the extra credit would also become 20% (incorrect).

The correct behaviour (after the fix): If the weight of extra credit item is not overridden, it should be itemmaxgrade / totalmaxgrade , where totalmaxgrade does not include the extra credit item. In the example, the weight of the extra credit item should always be 50%.

See MDL-49257 for further details including screenshots.

20150627 - Calculated grade items

Two errors affecting grades were fixed:

  1. Changing the maxgrade for a category item with a calculation that has existing grades results in grades displayed out of the old maximum grade, not the updated one. This can cause flow on affects for automatic weights with Natural Aggregation.
  2. Values for grade items with a calculation are always displayed from 0 to 100 regardless of the minimum and maximum grades for the grade item. This can cause flow on affects for automatic weights with Natural Aggregation.

These fixes will impact existing grades by correcting the maximum grade for existing grade items.

See MDL-48239 for further details.