Exemplo n.º 1
0
 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"
Exemplo n.º 2
0
 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()
Exemplo n.º 3
0
 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()