@Override
  public SubmissionReceipt[] getAllSubmissionReceiptsForUser(Problem problem, User user)
      throws CloudCoderAuthenticationException {
    // Make sure user is authenticated
    User authenticatedUser =
        ServletUtil.checkClientIsAuthenticated(
            getThreadLocalRequest(), GetCoursesAndProblemsServiceImpl.class);

    // Make sure authenticated user is an instructor
    CourseRegistrationList regList =
        Database.getInstance().findCourseRegistrations(authenticatedUser, problem.getCourseId());
    if (!regList.isInstructor()) {
      return new SubmissionReceipt[0];
    }

    return Database.getInstance().getAllSubmissionReceiptsForUser(problem, user);
  }