def assignment_question(cls, assignment, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment parent=ActivityList([XAPIObject.assignment(assignment)]), # grouping is course grouping=ActivityList([XAPIObject.course(assignment.course)])) cls._add_sis_data(context, assignment.course) return context
def answer_attachment(cls, answer, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment answer parent=ActivityList([XAPIObject.answer(answer)]), # grouping is course + assignment + assignment question grouping=ActivityList([ XAPIObject.assignment_question(answer.assignment), XAPIObject.assignment(answer.assignment), XAPIObject.course(answer.assignment.course) ])) cls._add_sis_data(context, answer.assignment.course) return context
def assignment_question(cls, assignment, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment parent=ActivityList([ XAPIObject.assignment(assignment) ]), # grouping is course grouping=ActivityList([ XAPIObject.course(assignment.course) ]) ) cls._add_sis_data(context, assignment.course) return context
def self_evaluation_attempt(cls, answer_comment, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment parent=ActivityList([ XAPIObject.self_evaluation_question(answer_comment.answer.assignment) ]), # grouping is course grouping=ActivityList([ XAPIObject.assignment(answer_comment.answer.assignment), XAPIObject.course(answer_comment.answer.assignment.course) ]) ) cls._add_sis_data(context, answer_comment.answer.assignment.course) return context
def comparison_attempt(cls, comparison, current_comparison, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is comparison question + criterion parent=ActivityList([ XAPIObject.comparison_question(comparison.assignment, current_comparison) ]), # grouping is course + assignment + answer1 + answer2 grouping=ActivityList([ XAPIObject.assignment(comparison.assignment), XAPIObject.course(comparison.assignment.course) ]) ) cls._add_sis_data(context, comparison.assignment.course) return context
def self_evaluation_attempt(cls, answer_comment, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment parent=ActivityList([ XAPIObject.self_evaluation_question(answer_comment.answer.assignment) ]), # grouping is course grouping=ActivityList([ XAPIObject.assignment(answer_comment.answer.assignment), XAPIObject.course(answer_comment.answer.assignment.course) ]) ) cls._add_sis_data(context, answer_comment.answer.assignment.course) return context
def comparison_attempt(cls, comparison, current_comparison, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is comparison question + criterion parent=ActivityList([ XAPIObject.comparison_question(comparison.assignment, current_comparison) ]), # grouping is course + assignment + answer1 + answer2 grouping=ActivityList([ XAPIObject.assignment(comparison.assignment), XAPIObject.course(comparison.assignment.course) ]) ) cls._add_sis_data(context, comparison.assignment.course) return context
def answer_attachment(cls, answer, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment answer parent=ActivityList([ XAPIObject.answer(answer) ]), # grouping is course + assignment + assignment question grouping=ActivityList([ XAPIObject.assignment_question(answer.assignment), XAPIObject.assignment(answer.assignment), XAPIObject.course(answer.assignment.course) ]) ) cls._add_sis_data(context, answer.assignment.course) return context
def assignment(cls, assignment, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is course parent=ActivityList([XAPIObject.course(assignment.course)])) cls._add_sis_data(context, assignment.course) return context
def answer(cls, answer, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment question parent=ActivityList( [XAPIObject.assignment_question(answer.assignment)]), # grouping is course + assignment grouping=ActivityList([ XAPIObject.assignment(answer.assignment), XAPIObject.course(answer.assignment.course) ])) if answer.attempt_uuid: context.context_activities.parent.append( XAPIObject.answer_attempt(answer)) cls._add_sis_data(context, answer.assignment.course) return context
def answer(cls, answer, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment question parent=ActivityList([ XAPIObject.assignment_question(answer.assignment) ]), # grouping is course + assignment grouping=ActivityList([ XAPIObject.assignment(answer.assignment), XAPIObject.course(answer.assignment.course) ]) ) if answer.attempt_uuid: context.context_activities.parent.append(XAPIObject.answer_attempt(answer)) cls._add_sis_data(context, answer.assignment.course) return context
def self_evaluation_response(cls, answer_comment, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is self-evaulation question parent=ActivityList([ XAPIObject.self_evaluation_question(answer_comment.answer.assignment), XAPIObject.answer(answer_comment.answer) ]), # grouping is course + assignment + answer grouping=ActivityList([ XAPIObject.assignment(answer_comment.answer.assignment), XAPIObject.course(answer_comment.answer.assignment.course) ]) ) if answer_comment.attempt_uuid: context.context_activities.parent.append(XAPIObject.self_evaluation_attempt(answer_comment)) cls._add_sis_data(context, answer_comment.answer.assignment.course) return context
def evaluation_response(cls, answer_comment, evaluation_number, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment parent=ActivityList([ XAPIObject.evaluation_question(answer_comment.answer.assignment, evaluation_number), XAPIObject.answer(answer_comment.answer) ]), # grouping is course grouping=ActivityList([ XAPIObject.assignment(answer_comment.answer.assignment), XAPIObject.course(answer_comment.answer.assignment.course) ]) ) if answer_comment.attempt_uuid and evaluation_number: context.context_activities.parent.append(XAPIObject.evaluation_attempt(answer_comment, evaluation_number)) cls._add_sis_data(context, answer_comment.answer.assignment.course) return context
def assignment(cls, assignment, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is course parent=ActivityList([ XAPIObject.course(assignment.course) ]) ) cls._add_sis_data(context, assignment.course) return context
def self_evaluation_response(cls, answer_comment, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is self-evaulation question parent=ActivityList([ XAPIObject.self_evaluation_question(answer_comment.answer.assignment), XAPIObject.answer(answer_comment.answer) ]), # grouping is course + assignment + answer grouping=ActivityList([ XAPIObject.assignment(answer_comment.answer.assignment), XAPIObject.course(answer_comment.answer.assignment.course) ]) ) if answer_comment.attempt_uuid: context.context_activities.parent.append(XAPIObject.self_evaluation_attempt(answer_comment)) cls._add_sis_data(context, answer_comment.answer.assignment.course) return context
def evaluation_response(cls, answer_comment, evaluation_number, **kwargs): context = cls.basic(**kwargs) context.context_activities = ContextActivities( # parent is assignment parent=ActivityList([ XAPIObject.evaluation_question(answer_comment.answer.assignment, evaluation_number), XAPIObject.answer(answer_comment.answer) ]), # grouping is course grouping=ActivityList([ XAPIObject.assignment(answer_comment.answer.assignment), XAPIObject.course(answer_comment.answer.assignment.course) ]) ) if answer_comment.attempt_uuid and evaluation_number: context.context_activities.parent.append(XAPIObject.evaluation_attempt(answer_comment, evaluation_number)) cls._add_sis_data(context, answer_comment.answer.assignment.course) return context