mirror of https://github.com/stijndcl/didier
Schedule implementation
parent
bd3c3d0745
commit
cec78f0d5f
13
data/les.py
13
data/les.py
|
@ -4,8 +4,17 @@ from functions.timeFormatters import timeFromInt
|
||||||
|
|
||||||
# A container class for schedules
|
# A container class for schedules
|
||||||
class Schedule:
|
class Schedule:
|
||||||
pass
|
def __init__(self, schedule: dict):
|
||||||
# TODO extra's & special classes
|
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
|
# A container class for courses
|
||||||
|
|
Loading…
Reference in New Issue