When using the gradebook to select grades by group with the dropdown box, the error message is given:
No category to view by
This is because the drop down box will generate a url like this: /grade/index.php?id=7&action=vcats&cview=&group=1
Which doesn't have the vcat.
From what I can see thisis because grade_download_form uses the global variable $cview in creating its groups menu ($url sent to setup_and_print_groups).
When grade_view_all_grades is called on line 75 of grades/index.php, this global variable is not set.
Ideally refactoring all of this code to get rid of such externsive use of the global $cview variable would seem like the best solution, but this resolves it in the interim.