Schedule implementation

pull/84/head
Stijn De Clercq 2020-10-26 14:30:38 +01:00
parent bd3c3d0745
commit cec78f0d5f
1 changed files with 11 additions and 2 deletions

View File

@ -4,8 +4,17 @@ from functions.timeFormatters import timeFromInt
# A container class for schedules
class Schedule:
pass
# TODO extra's & special classes
def __init__(self, schedule: dict):
self.courses = [Course(course) for course in schedule]
self.customs = [] # Courses that only the person that called the schedule has
self.extra = [] # Courses that need special attention (canceled, online, ...)
def addCustom(self, course):
"""
Function that adds a course into the list of courses,
useful for adding a user's custom courses
"""
self.customs.append(Course(course))
# A container class for courses