Petr:
I don't think that MDL-12380 resolves this issue.
I went back and played with version 1.8 and then imported that site to 1.9. The feature is not available in the new version as best as I can tell.
To reproduce:
1. Create a new course with two activities (say assignments). One worth 100 points (call it 100 points required) and one worth 10 points (call it 10 points Extra Credit).
2. With 5 or so students in that course, give them various combinations of scores and some missing scores. Allow at least one student to have the combined scores go over 100%.
3. Note the computations. You can put these into categories and weight them, but it is not needed. Note that before 1.9, percents over 100% were supported. Note also, that if the user interface of a module allowed it, the gradebook let activities go over 100% also.
4. Now, import the site to 1.9, with or without the current gradebook patch. You will note that the extra credit feature is dropped both from the computation and the user interface. The "aggregation coefficient" field of the extra credit assignment is set to 1, but it does not seem to affect the computations. There is no obvious way to restore this feature with Moodle currently, including with the MDL-12380 patch, even with supplemental patches like new aggregation types.
5. We do have it patched at our school and it has withstood the test of time. A core fix would require a better implementation; sites can just hack things to meet their needs. But it can be done.
The way I look at it, this type of feature was added and then iteratively developed in the early stages of Moodle based on user input. It was then dropped in the 1.9 gradebook and the issue keeps coming up. Ideally, it would be great if you and Nicholas would be able to better understand why this feature is needed in practice as you control what gets put into the code. But I don't think this problem is going to go away until fixed.
Frankly, the problem is resolved on my site and I will only be vocal about it when people ask about it persistently in the community. But I do think it is best for the product to restore it as a feature.
--Gary
Petr:
As you implement this, you will probably encounter the problems we have had with extra-credit. There are really three types of extra-credit activities:
1. Extra-credit points are added to an activity. This can bring points over 100% which is what we were addressing in
MDL-12380,2. Those activities that add points to a category that already has required activities. Then for any type of average, in effect, you just increase the numerator for those assignments without increasing the denominator (my hack is to designate such activities with ** at the end of the name, but core would need a better solution).
3. Those that are in a category that that have no required activities. The problem in that case is that you are dividing by zero when computing an average, so you can't use the same type of computation as with #2.
For #3, it is not a big issue if the category is designated as extra credit rather than the activities. Then if the category is worth 5%, and they have earned, say, 40 of 50 points in that category, it would increase the final grade by 4 percentage points. But it is an issue if you want to use the same type of computation as #2. And at the start of a course, the early activities in a category might be extra-credit, but later, required activities may be added.
You might find a more clever way to implement this, or may just have it apply to certain aggregation types, but the above are the problems we have encountered in trying to implement the types of extra credit that is used at our school.
MDL-12380, 2. Those activities that add points to a category that already has required activities. Then for any type of average, in effect, you just increase the numerator for those assignments without increasing the denominator (my hack is to designate such activities with ** at the end of the name, but core would need a better solution). 3. Those that are in a category that that have no required activities. The problem in that case is that you are dividing by zero when computing an average, so you can't use the same type of computation as with #2. For #3, it is not a big issue if the category is designated as extra credit rather than the activities. Then if the category is worth 5%, and they have earned, say, 40 of 50 points in that category, it would increase the final grade by 4 percentage points. But it is an issue if you want to use the same type of computation as #2. And at the start of a course, the early activities in a category might be extra-credit, but later, required activities may be added. You might find a more clever way to implement this, or may just have it apply to certain aggregation types, but the above are the problems we have encountered in trying to implement the types of extra credit that is used at our school.