Beispiel #1
0
 def add_all(self):
     for l in self.all:
         if l not in self.avail: 
             if l[1] == "Created Words":
                 tkMessageBox.showwarning("Warning", "Cannot assign created "+
                     "words list to student. All other lists were assigned.")
             else:
                 self.avail.append(l)    
                 self.available_lister.listbox.insert(END, l[1].split("/")[-1].split(".")[0])
                 database.add_available_list(l[0], self.student[0])
     self.set_button_states()
Beispiel #2
0
 def add(self):
     list_to_add = self.all[self.list_index]
     if list_to_add not in self.avail:
         if list_to_add[1] == "Created Words":
             tkMessageBox.showwarning("Warning", "Cannot assign created "+
                                      "words list to student.")
             return
         else:
             self.avail.append(list_to_add)    
             self.available_lister.listbox.insert(END, list_to_add[1].split("/")[-1].split(".")[0])
             database.add_available_list(list_to_add[0], self.student[0])
     self.set_button_states()