I'm not sure I agree here:
but this entire block is wrapped in 
`if pl.submitted_count()>0:` Line 360.  Also if submissions_graded>0 is a necessary condition on the user seeing a list of problems to grade, then they'll never see a problem to grade to begin with.