Details
Description
Steps to reproduce
============
0. create a new empty course
1. create a new scale and name it e.g. "3 Nuts for Cinderella" (put an integer as a first part of the name)
2. create two new assignments - let us call them A and B
3. set maximum grade for the assignment A to 10 points
4. set the scale "3 Nuts for Cinderella" as a grading method of the assignment B
5. grade some submissions in both assignments
4. go to the grade book and see the total number of points in the header
What I expected to see
==============
Total points is 10 - because of assignment A. Scale grades are displayed but do not influence the total points.
What actually happened
===============
Total points is 13. Assignment A has maximum grade 10 points. Assignment B is considered to have maximum grade 3 points. Even students with 10 points from assignment 10 and the best scale item from assignment B can not reach 100% of points; they still have only 10 points of 13.
This happens always when the scale name may be casted into non-zero integer number.
David - Here is a patch that seems to address this issue. I've done some preliminary testing and I think it should help you out. The issue was that maxgrade was being used to store the name of the scale and if it contained a number it was being treated like a number. By adding an if statement to check that the value of the maxgrade string is in fact a number and not just contains one we should be able to differentiate enough to keep the total correct. If you could test it and let me know if this resolves the issue I will go ahead and commit it. Peace - Anthony