Esempio n. 1
0
 def _track_event(self, interactionType, **kwargs):
     kwargs['interactionType'] = interactionType
     problem_fields = dict(
         learnTutorialId=self.tutorial_id,
         questionId=self.questionId,
     )
     kwargs.update(problem_fields)
     tracking.track(kwargs)
    def _track_event(self, interactionType, **kwargs):
        kwargs['interactionType'] = interactionType

        if isinstance(self.problem, EqualityCheckProblem):
            kwargs['questionType'] = tracking.QuestionType.EQUALITYCHECKPROBLEM
        elif isinstance(self.problem, CodingProblem):
            kwargs['questionType'] = tracking.QuestionType.CODINGPROBLEM
        elif isinstance(self.problem, FunctionProblem):
            kwargs['questionType'] = tracking.QuestionType.FUNCTIONPROBLEM
        elif isinstance(self.problem, ThoughtExperiment):
            kwargs['questionType'] = tracking.QuestionType.THOUGHTEXPERIMENT

        problem_fields = dict(questionId=self.questionId, )
        kwargs.update(problem_fields)
        tracking.track(kwargs)