Details
Description
Students can view the grading for hidden assignments. This can be extremely harmful from a pedagogical way, since many times teachers want a hidden place to keep their own thoughts about a student's work, a different place from the "official" grading presented to the student. A way to do this is adding a hidden assignment that can be used for that purpose.
First I supposed there could be something wrong with a capability, but I could temporarily solve it by changing line 3059 of grade/lib.php:
FROM: if (empty($mod->modname))
{ continue; // Just in case, see MDL-7150 }TO: if (empty($mod->modname) || empty($mod->visible))
{ continue; // Just in case, see MDL-7150 }Maybe ther should be a check for capabilities in place of this.