def student_view_reports(self, f): f.destroy() f = Form() feedback = self.search(thing_to_match=self.user.get_student_id(), file_name_to_search="studentReports", split_type=",") #t(feedback[0]) edu_list = list() feedback_list = list() for x in feedback: count = 0 for y in x: if count == 0: count += 1 continue elif count == 1: edu = self.search(str(y), "educators", "\t") edu_list.append(edu[0][4] + " " + edu[0][5]) else: feedback_list.append(y) count += 1 f.view_edu_feedback(edu_list[0], feedback_list[0]) frame = tk.Frame() frame.pack(pady=10) button_frame = tk.Frame(frame) button_frame.pack() back_button = tk.Button(button_frame, text="Back", command=lambda: self.main_screen(self.user.accessLevel, self.user, f)) back_button.pack(pady=2) return None
def view_feedback(self, data, f): f.destroy() f = Form() name = None for edu in self.edu_list: if edu.get_id() == data: name = edu.get_name() f.view_edu_feedback(name, edu.get_feedback()) frame = tk.Frame() frame.pack(pady=10) button_frame = tk.Frame(frame) button_frame.pack() back_button = tk.Button(button_frame, text="Back", command=lambda: self.main_screen(self.user.accessLevel, self.user, f)) back_button.pack(pady=2) return None