def initComponents(self, controller): buttonFrame = tk.Frame(self) courseNames = database.select_courses() tk.Label(self.operationsFrame, text="Course :").grid(column=0, row=0) tk.Spinbox(self.operationsFrame, fg="blue", font=12, textvariable=self.CourseName, values=courseNames).grid(column=1, row=0) tk.Button(self.operationsFrame, text="Confirm", command=self.next_step, borderwidth=3, width=6, height=1).grid(column=3, row=0, pady=10) b1 = tk.Button( buttonFrame, text="Lecture Files ", command=lambda: controller.show_frame(StudentApp.CheckFiles), borderwidth=4, width=24, height=3) b2 = tk.Button(buttonFrame, text="Assignments", command=lambda: controller.show_frame( StudentApp.StudentAssignment), borderwidth=4, width=24, height=3) b3 = tk.Button( buttonFrame, text="Grades", command=lambda: controller.show_frame(StudentApp.StudentGrades), borderwidth=4, width=24, height=3) b4 = tk.Button(buttonFrame, text="Announcements", command=lambda: controller.show_frame( StudentApp.StudentAnnouncements), borderwidth=4, width=24, height=3) b5 = tk.Button( buttonFrame, text="Log Out", command=lambda: controller.show_frame(StudentApp.LoginWindow), borderwidth=4, width=24, height=3) b1.grid(column=0, row=0) b2.grid(column=0, row=1) b3.grid(column=0, row=2) b4.grid(column=0, row=3) b5.grid(column=0, row=5) buttonFrame.grid(column=0, row=0) self.operationsFrame.grid(column=1, row=0, padx=5)
def adminOperations(self, controller): operationsFrame = tk.Frame(self) buttonFrame = tk.Frame(self) courseNames = database.select_courses() studentNames = database.select_students() tk.Label(operationsFrame, text="Course 1 :").grid(column=0, row=0) tk.Spinbox(operationsFrame, fg="blue", font=12, textvariable=self.fCourseName, values=courseNames).grid(column=1, row=0) tk.Label(operationsFrame, text="Course 2 :").grid(column=0, row=1) tk.Spinbox(operationsFrame, fg="blue", font=12, textvariable=self.sCourseName, values=courseNames).grid(column=1, row=1) tk.Label(operationsFrame, text="Course 3 :").grid(column=0, row=2) tk.Spinbox(operationsFrame, fg="blue", font=12, textvariable=self.tCourseName, values=courseNames).grid(column=1, row=2) tk.Label(operationsFrame, text="Student Name :").grid(column=0, row=3) tk.Spinbox(operationsFrame, fg="blue", font=12, textvariable=self.StudentName, values=studentNames).grid(column=1, row=3) tk.Button(operationsFrame, text="submit", command=lambda: controller.add_course_student( self.StudentName.get(), self.fCourseName.get(), self.sCourseName.get(), self.tCourseName.get()), borderwidth=3, width=6, height=1).grid(column=1, row=6, pady=10) b1 = tk.Button( buttonFrame, text="Create Users", command=lambda: controller.show_frame(StudentApp.AdminCreateUser), borderwidth=4, width=24, height=3) b2 = tk.Button(buttonFrame, text="Create Courses", command=lambda: controller.show_frame( StudentApp.AdminCreateCourse), borderwidth=4, width=24, height=3) b3 = tk.Button(buttonFrame, text="Assign Teacher", command=lambda: controller.show_frame( StudentApp.AdminAssignTeacher), borderwidth=4, width=24, height=3) b4 = tk.Button( buttonFrame, text="Add Student", command=lambda: controller.show_frame(StudentApp.AdminAddStudent), borderwidth=4, width=24, height=3) b5 = tk.Button( buttonFrame, text="Log Out", command=lambda: controller.show_frame(StudentApp.LoginWindow), borderwidth=4, width=24, height=3) b1.grid(column=0, row=0) b2.grid(column=0, row=1) b3.grid(column=0, row=3) b4.grid(column=0, row=4) b5.grid(column=0, row=5) operationsFrame.grid(column=1, row=0, padx=5) buttonFrame.grid(column=0, row=0)
def initComponents(self, controller): buttonFrame = tk.Frame(self) operationsFrame = tk.Frame(self) courseNames = database.select_courses() studentNames = database.select_students() tk.Label(operationsFrame, text="Course 1 :").grid(column=0, row=0) tk.Spinbox(operationsFrame, fg="blue", font=12, textvariable=self.fCourseName, values=courseNames).grid(column=1, row=0) tk.Label(operationsFrame, text="Course 2 :").grid(column=0, row=1) tk.Spinbox(operationsFrame, fg="blue", font=12, textvariable=self.sCourseName, values=courseNames).grid(column=1, row=1) tk.Label(operationsFrame, text="Course 3 :").grid(column=0, row=2) tk.Spinbox(operationsFrame, fg="blue", font=12, textvariable=self.tCourseName, values=courseNames).grid(column=1, row=2) tk.Label(operationsFrame, text="Student Name :").grid(column=0, row=3) tk.Spinbox(operationsFrame, fg="blue", font=12, textvariable=self.StudentName, values=studentNames).grid(column=1, row=3) tk.Button(operationsFrame, text="submit", command=lambda: controller.add_course_student( self.StudentName.get(), self.fCourseName.get(), self.sCourseName.get(), self.tCourseName.get()), borderwidth=3, width=6, height=1).grid(column=1, row=6, pady=10) b1 = tk.Button( buttonFrame, text="Lecture Files ", command=lambda: controller.show_frame(StudentApp.CourseFiles), borderwidth=4, width=24, height=3) b2 = tk.Button(buttonFrame, text="Assignments", command=lambda: controller.show_frame( StudentApp.CourseAssignments), borderwidth=4, width=24, height=3) b3 = tk.Button( buttonFrame, text="Add a student", command=lambda: controller.show_frame(StudentApp.CourseStudents), borderwidth=4, width=24, height=3) b4 = tk.Button( buttonFrame, text="Grades", command=lambda: controller.show_frame(StudentApp.CourseGrades), borderwidth=4, width=24, height=3) b5 = tk.Button(buttonFrame, text="Announcements", command=lambda: controller.show_frame( StudentApp.CourseAnnouncements), borderwidth=4, width=24, height=3) b6 = tk.Button( buttonFrame, text="Log Out", command=lambda: controller.show_frame(StudentApp.LoginWindow), borderwidth=4, width=24, height=3) b1.grid(column=0, row=0) b2.grid(column=0, row=1) b3.grid(column=0, row=3) b4.grid(column=0, row=4) b5.grid(column=0, row=5) b6.grid(column=0, row=6) buttonFrame.grid(column=0, row=0) operationsFrame.grid(column=1, row=0, padx=5)
def initComponents(self, controller): buttonFrame = tk.Frame(self) courseNames = database.select_courses() tk.Label(self.operationsFrame, text="Course :").grid(column=0, row=0) tk.Spinbox(self.operationsFrame, fg="blue", font=12, textvariable=self.CourseName, values=courseNames).grid(column=1, row=0) tk.Label(self.operationsFrame, text="Title :").grid(column=0, row=1, pady=4) tk.Entry(self.operationsFrame, width=25, textvariable=self.announcementTitle).grid(column=1, row=1, pady=4) tk.Label(self.operationsFrame, text="Announcement :").grid(column=0, row=2, pady=4) self.text.grid(column=1, row=2, pady=4) tk.Button(self.operationsFrame, text="Add", command=lambda: self.method_annoc(), borderwidth=3, width=6, height=1).grid(column=0, row=3, pady=10) tk.Button(self.operationsFrame, text="cancel", borderwidth=3, width=6, height=1).grid(column=1, row=3, pady=10) b1 = tk.Button( buttonFrame, text="Lecture Files ", command=lambda: controller.show_frame(StudentApp.CourseFiles), borderwidth=4, width=24, height=3) b2 = tk.Button(buttonFrame, text="Assignments", command=lambda: controller.show_frame( StudentApp.CourseAssignments), borderwidth=4, width=24, height=3) b3 = tk.Button( buttonFrame, text="Add a student", command=lambda: controller.show_frame(StudentApp.CourseStudents), borderwidth=4, width=24, height=3) b4 = tk.Button( buttonFrame, text="Grades", command=lambda: controller.show_frame(StudentApp.CourseGrades), borderwidth=4, width=24, height=3) b5 = tk.Button(buttonFrame, text="Announcements", command=lambda: controller.show_frame( StudentApp.CourseAnnouncements), borderwidth=4, width=24, height=3) b6 = tk.Button( buttonFrame, text="Log Out", command=lambda: controller.show_frame(StudentApp.LoginWindow), borderwidth=4, width=24, height=3) b1.grid(column=0, row=0) b2.grid(column=0, row=1) b3.grid(column=0, row=3) b4.grid(column=0, row=4) b5.grid(column=0, row=5) b6.grid(column=0, row=6) buttonFrame.grid(column=0, row=0) self.operationsFrame.grid(column=1, row=0, padx=5)
def teacherOperations(self, controller): buttonFrame = tk.Frame(self) self.filename = self.fileDialog courseNames = database.select_courses() tk.Label(self.operationsFrame, text="Course :").grid(column=0, row=0) tk.Spinbox(self.operationsFrame, fg="blue", font=12, textvariable=self.CourseName, values=courseNames).grid(column=1, row=0) tk.Label(self.operationsFrame, text="Assignment Name :").grid(column=0, row=1, pady=4) tk.Entry(self.operationsFrame, width=25, textvariable=self.Assignment).grid(column=1, row=1, pady=4) tk.Label(self.operationsFrame, text="Assignment File :").grid(column=0, row=2, pady=4) tk.Button(self.operationsFrame, text="upload", command=self.filename, borderwidth=3, width=6, height=1).grid(column=1, row=2, pady=10) tk.Button(self.operationsFrame, text="Submit", command=lambda: controller.add_assignemnt_file( database.course_id(self.CourseName.get()), self.Assignment.get(), self.filename), borderwidth=3, width=6, height=1).grid(column=0, row=6, pady=10) tk.Button(self.operationsFrame, text="Cancel", borderwidth=3, width=6, height=1).grid(column=1, row=6, pady=10) b1 = tk.Button( buttonFrame, text="Lecture Files ", command=lambda: controller.show_frame(StudentApp.CourseFiles), borderwidth=4, width=24, height=3) b2 = tk.Button(buttonFrame, text="Assignments", command=lambda: controller.show_frame( StudentApp.CourseAssignments), borderwidth=4, width=24, height=3) b3 = tk.Button( buttonFrame, text="Add a student", command=lambda: controller.show_frame(StudentApp.CourseStudents), borderwidth=4, width=24, height=3) b4 = tk.Button( buttonFrame, text="Grades", command=lambda: controller.show_frame(StudentApp.CourseGrades), borderwidth=4, width=24, height=3) b5 = tk.Button(buttonFrame, text="Announcements", command=lambda: controller.show_frame( StudentApp.CourseAnnouncements), borderwidth=4, width=24, height=3) b6 = tk.Button( buttonFrame, text="Log Out", command=lambda: controller.show_frame(StudentApp.LoginWindow), borderwidth=4, width=24, height=3) b1.grid(column=0, row=0) b2.grid(column=0, row=1) b3.grid(column=0, row=3) b4.grid(column=0, row=4) b5.grid(column=0, row=5) b6.grid(column=0, row=6) buttonFrame.grid(column=0, row=0) self.operationsFrame.grid(column=1, row=0, padx=5)