-
Sub-task
-
Resolution: Duplicate
-
Major
-
None
-
4.5
In summary, the penalty feature works as below:
- A module, for example assignment, apply a grade to a submission as usual
- Then, the module, should call apply_grade_penalty_to_user (lib/gradelib.php) to apply penalty to the submission (if applicable)
- The function will do the followings:
- before_penalty_applied: this is implemented in penalty plugins to calculate deducted marks
- upgrade the finaly grade with the deducted marks
- after_penalty_applied: can be used to log the penalty details
The re-caculation works as below:
- Penalty rules are changed
- User can optionally choose to run recalculation
- Once the re-calcuation is triggered, adhoc tasks will be queued for the re-calculation