When exporting gradebook, and choosing no grade items, the preview shows only the user data fields, but when the actual file is downloaded, all of the grade items are included. Looking at the code, in /grade/export/lib.php in the grade_export function I see a place where if the itemlist provided is empty, it populates the columns property with all available grade items. This seems counter intuitive. I'm attaching a patch that removes this code, and seems to solve the problem for me. I'm wondering if anyone else has experienced this problem or sees any problems with removing this code.