Davr1 / school-schedule

https://rozvrh.icy.cx
2 stars 0 forks source link

Teacher absence merge edge case #57

Open Davr1 opened 1 year ago

Davr1 commented 1 year ago

For some reason the web bakalari ui displays the lesson as changed while it should just be absent, which also creates inconsistencies with our data model image

{
  "type": "atom", // should be "removed"
  "subjecttext": "Německý jazyk | Mon 6/11 | 3 (10:00 - 10:45)",
  "teacher": null,
  "room": "104",
  "group": "P3.B 3.sk",
  "theme": "Zwischenstopp", // should be empty
  "notice": "",
  "changeinfo": "Merged: P3.B(3.sk), Kleinová Radka (P3.B(3.sk), Bečvářová Hana)",
  "homeworks": null,
  "absencetext": null,
  "hasAbsent": true,
  "absentInfoText": "Absc | Obecná absence učitele"
}
iCyuba commented 1 year ago

ugh this is annoying, what about the other lessons tho? why don't they have "Absc" as the abbreviation as well?

Davr1 commented 1 year ago

the empty ones are "removed"

{
  "type": "removed",
  "subjecttext": "Mon 6/11 | 4 (10:55 - 11:40)",
  "absentinfo": "Absc",
  "InfoAbsentName": null,
  "removedinfo": "Merge of lessons: TGR, Strnka Richard (P2.B(3.sk), NEJ)"
}

and the one Absc lesson is actually "absent" (bečv doesn't normally have a lesson at that time)

{
  "type": "absent",
  "subjecttext": "Mon 6/11 | 6 (12:45 - 13:30)",
  "absentinfo": "Absc",
  "InfoAbsentName": "Obecná absence učitele",
  "removedinfo": ""
}
iCyuba commented 1 year ago

that's stupid, how do you wanna handle this? render them all as absent?

Davr1 commented 1 year ago

maybe 😭 like I assume vodicka just marks a range of lessons as absent all at once the same way he can do for students

Davr1 commented 1 year ago

we should definitely add the absc text to all of them to make it consistent or make them all empty

iCyuba commented 1 year ago

I mean idk how bakalari handles it internally, either way tho, I think we should render the "Absc" text as you said.

Do you wanna do this on the current parser or nah? I'll for sure add it to the new one, but not sure if it's worth it to redo the old classes

Davr1 commented 1 year ago

I refrain touching the current parser

iCyuba commented 1 year ago

it's your creation tho😭

Davr1 commented 1 year ago

keeping it there for historical purposes

iCyuba commented 1 year ago

and for the pluses, let's be fr💀

Davr1 commented 11 months ago

Screenshot_2023-12-18-11-35-11-10_4d38fce200f96aeac5e860e739312e76 Screenshot_2023-12-18-11-35-19-73_4d38fce200f96aeac5e860e739312e76

iCyuba commented 11 months ago

This has already been fixed in the api, we just need to update the web app so it actually uses the api😭