Details
Description
This issue affects 'overridable' gradebook columns. Those are columns where an automatic grade is assigned, like mod, course, calculated, ... items. See grade_item::is_overridable_item().
Let me first explain what happens with a custom (non-overridable) column, because that currently works correctly.
1. On Administration ? Grades ? General settings, set Primary grade export methods to XML file.
2. Create a course, and add some students with idnumbers to it.
3. Add a custom grade item, with an idnumber.
4. Create an XML grade import file (in1.xml) to give grades to your students in your custom column.
5. Import test.xml.
6. Now export the column to XML (out1.xml), choosing the 'Export new or updated grades only' option. This file will contain the grades you just imported.
7. Repeat step 6, exporting out2.xml. This file will be empty, as no grades have changed.
8. Repeat step 5, importing in1.xml again.
9. Repeat step 6, exporting out3.xml. Again this file will be emtpy, as no grades have changed.
10. Change a few grades in in1.xml to create a new file in2.xml.
11. Import in2.xml, then export out4.xml. out4.xml will contain only the changed grades.
As I said above, I believe that behaviour is all correct.
The problem happens if, for example, you change step 3 above to
3*. Add an Oflline Activity to the course, with an idnumber.
If you do that, everything proceed the same up until step 9.
9*. Repeat step 6, exporting out3.xml. Now this file contains all the grades, because Moodle things they changed at step 8*.
I think this is a bug.