'Creates grades for all courses and subsections.'

def _update_or_create_grades(self, courses_keys=None):

    if (courses_keys is None):
        courses_keys = self.course_keys
    course_grade_params = {'course_version': 'JoeMcEwing', 'course_edited_timestamp': datetime(year=2016, month=8, day=1, hour=18, minute=53, second=24, microsecond=354741), 'percent_grade': 77.7, 'letter_grade': 'Great    job', 'passed': True}
    subsection_grade_params = {'course_version': 'deadbeef', 'subtree_edited_timestamp': '2016-08-01    18:53:24.354741', 'earned_all': 6.0, 'possible_all': 12.0, 'earned_graded': 6.0, 'possible_graded': 8.0, 'visible_blocks': MagicMock(), 'first_attempted': datetime.now()}
    for course_key in courses_keys:
        for user_id in self.user_ids:
            course_grade_params['user_id'] = user_id
            course_grade_params['course_id'] = course_key
            PersistentCourseGrade.update_or_create(**course_grade_params)
            for subsection_key in self.subsection_keys_by_course[course_key]:
                subsection_grade_params['user_id'] = user_id
                subsection_grade_params['usage_key'] = subsection_key
                PersistentSubsectionGrade.update_or_create_grade(**subsection_grade_params)
