mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-78082 core_grades: Fix locking issue with natural aggregation
Problem: When the aggregation method is set to "natural," grade items' weights and the maximum grade of the grade category's item get recalculated, causing the needsupdate flag to be set to true. As a result, the locking process was skipped, leading to unexpected behaviour. Solution: To address the issue, the set_locked method has been modified. Instead of skipping the locking process, the method now schedules the locking of grade items to occur slightly in the past, specifically one second in the past. This ensures that the grade item will be automatically locked after the recalculations are completed. Explanation: By making this adjustment, we ensure that the locking process is not skipped during natural aggregation, maintaining consistent behaviour and preventing any unintended consequences related to grade item locking.
- Loading branch information
Showing
3 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters