def bulk_create_models(cls, student, subsection_grades, course_key): """ Saves the subsection grade in a persisted model. """ return PersistentSubsectionGrade.bulk_create_grades( [subsection_grade._persisted_model_params(student) for subsection_grade in subsection_grades], # pylint: disable=protected-access course_key, )
def bulk_create_models(cls, student, subsection_grades, course_key): """ Saves the subsection grade in a persisted model. """ return PersistentSubsectionGrade.bulk_create_grades( [subsection_grade._persisted_model_params(student) for subsection_grade in subsection_grades], # pylint: disable=protected-access course_key, )
def bulk_create_models(cls, student, subsection_grades, course_key): """ Saves the subsection grade in a persisted model. """ subsection_grades = filter(lambda subs_grade: subs_grade._should_persist_per_attempted, subsection_grades) return PersistentSubsectionGrade.bulk_create_grades( [subsection_grade._persisted_model_params(student) for subsection_grade in subsection_grades], # pylint: disable=protected-access course_key, )
def bulk_create_models(cls, student, subsection_grades, course_key): """ Saves the subsection grade in a persisted model. """ subsection_grades = filter(lambda subs_grade: subs_grade._should_persist_per_attempted, subsection_grades) return PersistentSubsectionGrade.bulk_create_grades( [subsection_grade._persisted_model_params(student) for subsection_grade in subsection_grades], # pylint: disable=protected-access course_key, )
def bulk_create_models(cls, student, subsection_grades, course_key): """ Saves the subsection grade in a persisted model. """ params = [ subsection_grade._persisted_model_params(student) for subsection_grade in subsection_grades # pylint: disable=protected-access if subsection_grade._should_persist_per_attempted() # pylint: disable=protected-access ] return PersistentSubsectionGrade.bulk_create_grades(params, course_key)
def bulk_create_models(cls, student, subsection_grades, course_key): """ Saves the subsection grade in a persisted model. """ params = [ subsection_grade._persisted_model_params(student) # pylint: disable=protected-access for subsection_grade in subsection_grades if subsection_grade if subsection_grade._should_persist_per_attempted() # pylint: disable=protected-access ] return PersistentSubsectionGrade.bulk_create_grades(params, course_key)