MDL-47172 print_overview: Show assignments only when needed
MDL-47172 print_overview: Show assignments only when needed

The intended behaviour is not to display this notification when:-
1) The assignment is closed.
2) User is a student and has a valid submission in place.
3) User is a teacher and there is nothing to grade.

Beisdes the above changes the patch also includes minor other fixes such as:-
1) Fixed phpdocs
2) Fixed inconsistent return value.
3) Fixed unit tests that had arguments in wrong order.

dilawar/moodle