'Simple helper method to iterate through student grades and give us
two dictionaries -- one that has all students and their respective
course grades, and one that has only students that could not be graded
and their respective error messages.'

def _course_grades_and_errors_for(self, course, students):

    students_to_course_grades = {}
    students_to_errors = {}
    for (student, course_grade, error) in CourseGradeFactory().iter(students, course):
        students_to_course_grades[student] = course_grade
        if error:
            students_to_errors[student] = error
    return (students_to_course_grades, students_to_errors)
