mirror of https://github.com/stijndcl/didier
Merge pull request #7 from stijndcl/active_reminds
Fix bug in Les for 1ba classes, update schedulepull/8/head
commit
e364d964a2
|
@ -1,7 +1,6 @@
|
|||
[
|
||||
{
|
||||
"course": "Programmeren",
|
||||
"icon": "laptop-code",
|
||||
"slots": [
|
||||
{
|
||||
"campus": "Sterre",
|
||||
|
@ -32,7 +31,6 @@
|
|||
},
|
||||
{
|
||||
"course": "Databanken",
|
||||
"icon": "database",
|
||||
"slots": [
|
||||
{
|
||||
"campus": "Sterre",
|
||||
|
@ -40,8 +38,8 @@
|
|||
"room": "A3",
|
||||
"time": [
|
||||
"donderdag",
|
||||
1000,
|
||||
1100
|
||||
1130,
|
||||
1245
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -50,8 +48,8 @@
|
|||
"room": "A3",
|
||||
"time": [
|
||||
"vrijdag",
|
||||
1430,
|
||||
1530
|
||||
1300,
|
||||
1415
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -96,8 +94,6 @@
|
|||
},
|
||||
{
|
||||
"course": "Computergebruik",
|
||||
"icon": "linux",
|
||||
"icon_type": "fab",
|
||||
"slots": [
|
||||
{
|
||||
"campus": "Sterre",
|
||||
|
@ -142,7 +138,6 @@
|
|||
},
|
||||
{
|
||||
"course": "RAF",
|
||||
"icon": "brain",
|
||||
"slots": [
|
||||
{
|
||||
"campus": "Sterre",
|
||||
|
@ -178,12 +173,10 @@
|
|||
},
|
||||
{
|
||||
"course": "Discrete Wiskunde",
|
||||
"icon": "square-root-alt",
|
||||
"zoom": "https://ufora.ugent.be/d2l/ext/rp/232374/lti/framedlaunch/556e197e-e87b-4c27-be5d-53adc7a41826",
|
||||
"slots": [
|
||||
{
|
||||
"campus": "Sterre",
|
||||
"building": "S9",
|
||||
"room": "A3",
|
||||
"online": "ZOOM",
|
||||
"time": [
|
||||
"maandag",
|
||||
1000,
|
||||
|
|
|
@ -97,11 +97,11 @@ def getCourses(schedule, day, week):
|
|||
|
||||
# Add online links for those at home
|
||||
# Check if link hasn't been added yet
|
||||
if not any(el["course"] == course["course"] and
|
||||
# Avoid KeyErrors: if either of these don't have an online link yet,
|
||||
# add it as well
|
||||
("online" not in el or "online" not in slot or el["online"] == slot["online"])
|
||||
for el in onlineLinks):
|
||||
if "online" in slot and not any(el["course"] == course["course"] and
|
||||
# Avoid KeyErrors: if either of these don't have an online link yet,
|
||||
# add it as well
|
||||
("online" not in el or el["online"] == slot["online"])
|
||||
for el in onlineLinks):
|
||||
# Some courses have multiple links on the same day,
|
||||
# add all of them
|
||||
if "bongo" in slot["online"].lower():
|
||||
|
@ -317,16 +317,16 @@ def parseArgs(day):
|
|||
# elif: calling a weekday is automatically handled below,
|
||||
# so checking is obsolete
|
||||
else:
|
||||
# TODO check other direction (di 1) in else
|
||||
# Both were passed
|
||||
if day[0].isdigit():
|
||||
if 0 < int(day[0]) < years_counter + 1:
|
||||
year = int(day[0])
|
||||
day = []
|
||||
# day = []
|
||||
else:
|
||||
return [False, "Dit is geen geldige jaargang."]
|
||||
# Cut the schedule from the string
|
||||
day = day[1:]
|
||||
|
||||
day = getWeekDay(None if len(day) == 0 else day)[1]
|
||||
dayDatetime = findDate(timeFormatters.weekdayToInt(day))
|
||||
|
||||
|
|
Loading…
Reference in New Issue