'Bulk creation of grades.'

@classmethod
def bulk_create_grades(cls, grade_params_iter, course_key):

    if (not grade_params_iter):
        return
    map(cls._prepare_params, grade_params_iter)
    VisibleBlocks.bulk_get_or_create([params['visible_blocks'] for params in grade_params_iter], course_key)
    map(cls._prepare_params_visible_blocks_id, grade_params_iter)
    map(cls._prepare_first_attempted_for_create, grade_params_iter)
    grades = [PersistentSubsectionGrade(**params) for params in grade_params_iter]
    grades = cls.objects.bulk_create(grades)
    for grade in grades:
        cls._emit_grade_calculated_event(grade)
    return grades
