def createSet(self): global flashcard_set flashcard_set = classes.Set(db_x.get_id(mail), self.description.text) # print(flashcard_set.ID) # print(flashcard_set.Flashcards) self.reset() sm.current = "createFlashcard"
def rateSet(self): x = db_x.add_rating(self.score.text, self.desc.text, db_x.get_id(mail), config.flashcard_set.ID) if x == -1: show_popup("You have already rated this set!") if x == -2: show_popup("Your mark has to be a number between 0 and 5") if x == 1: show_popup("You have successfully rated this set!") self.reset()
def addFlashcard(self): flashcard = classes.Flashcard(self.front.text, self.back.text, db_x.get_id(mail), flashcard_set.ID) flashcard_set.addFlashcard(flashcard) show_popup("You have created a flashcard!") self.reset()