Fix rails database method
Merge pull request #1803 from david-yz-liu/results-missing-template

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