def getResult(self): if self.listTest.curselection() != (): index = self.listTest.curselection()[0] testname = str(self.listTest.get(index)) testType = [i[3] for i in test_list if i[0] == testname] testType = str(testType[0]) t1 = Toplevel() if testType == 'S': #> this is horrible... duedate = self.turnDueDateToObject(testname) print(duedate) fdbck = Feedback.Show_Results(t1, login.username, testname, testType, duedate) elif testType == 'F': fdbck = Feedback.Show_Results(t1, login.username, testname, testType) else: messagebox.showwarning( "Error", "Is your testtype a string other than 'F' or 'S'?")
def getStudentResult(self): # retrieve their results if self.listtests.curselection() != (): index = self.listtests.curselection()[0] testname = str(self.listtests.get(index)) #username = userno[studentName] #print(testname,username) #t1 = Toplevel() fdbck = Feedback.Show_Results(Toplevel(), studentNo, testname, testType, 0, True) else: messagebox.showerror("Error", "Select a test!")