When viewing all submissions in an assignment, the function grading_disabled is called twice for each user and seems responsible for up to 40% of the db queries on the page (after MDL-72052 and MDL-72054 are fixed) - just to return a boolean "true/false" - we should make it more efficient.