Project: moodle
Issue MDL-46577: Restructure Unit tests for gradebook aggregation, include natural weight
Some tests will need to be added, based these on the ["Calculation examples" section in the spec|http://docs.moodle.org/dev/Natural_weighting#Calculation_examples]. These should be written very early to prove the state of the code. Also the items under ["Logic changes" should be covered|http://docs.moodle.org/dev/Natural_weighting#Logic_changes]. In particular "Sum of Grades aggregation must be fixed to exclude hidden items and to exclude non-graded items" and "Determination of range (in Grader and User report) and Max grade (in Setup screen) must be fixed to exclude extra credit items". For developers who are unclear on how this new functionality works, the new unit tests should be there to explain in detail what is going on. vendor/bin/phpunit --testsuite core_grade_testsuite Relevant tests that will need to be looked at and upgraded: * lib/grade/tests * grade/tests * grade/grading/tests
Story points: 40