I am also having this exact issue! Can you explain how you solved this problem, it's driving me CRAZY!
Hi
I confirm I had the same issue with moodle version:
$release = '3.4+ (Build: 20180112)';I had to use a work around to fix it:
* allow student to see the block from block permissions
BUT
in function get_content of the block restrict display to teachers:
$context = context_course::instance($this->page->course->id);
if(has_capability('moodle/grade:viewall', $context)) { // Show the block
....
}
Again this is only a work around.
Regards