Fix rails database method (renders TAs unable to access grading page)