Description
The current badge processing flow creates BadgeProgress records while checking whether a learner has already completed a badge template.
As a result, the system can create progress rows even when the learner has not actually fulfilled any requirement. This likely explains how a deployment can issue relatively few badges while still accumulating a very large number of badge progress records.
Supporting Info
BadgeProgress uses the get_or_create() method in each process_requirements() check.
There is also a second path through grouped requirement checks that can create progress records during evaluation.
Expected Result
BadgeProgress records should be created only when a learner actually earns or loses progress toward a badge.
Description
The current badge processing flow creates
BadgeProgressrecords while checking whether a learner has already completed a badge template.As a result, the system can create progress rows even when the learner has not actually fulfilled any requirement. This likely explains how a deployment can issue relatively few badges while still accumulating a very large number of badge progress records.
Supporting Info
BadgeProgress uses the
get_or_create()method in eachprocess_requirements()check.There is also a second path through grouped requirement checks that can create progress records during evaluation.
Expected Result
BadgeProgressrecords should be created only when a learner actually earns or loses progress toward a badge.