def save_quest_results(self, is_correct, time): if self.experiment_part == "training": result = self.save_quest_training(is_correct, time) else: result = self.save_quest_experiment(is_correct, time) db_session.add(result) db_session.commit()
def save_scores_experiment(self): for index in range(len(self.sentences)): rating, time = self.scores[str(index + 1)] result = AcceptabilityExperiment(self.sentences[index]["test"], rating, time, self.participant.id) db_session.add(result) db_session.commit()
def save_sent_experiment(self): for word, time_code in zip(self.full_text, self.time_codes): result = SelfPacedExperimentSentences( self.sentence_id, word, time_code, self.participant.id ) db_session.add(result) db_session.commit()
def save_sent_results(self): name = SocioLingScreen.choices["name"] self.participant = Participant.query.filter(Participant.name == name).first() self.sentence_id = self.current_sentence for word, time_code in zip(self.full_text, self.time_codes): result = SelfPacedTrainingSentences( self.sentence_id, word, time_code, self.participant.id ) db_session.add(result) db_session.commit()