lesander / magister-calendar

:date: Automatically plan your Magister appointments in your Google calendar.
https://git.io/magister
MIT License
11 stars 6 forks source link

Cancelled Classes not being removed #27

Closed Jellepepe closed 8 years ago

Jellepepe commented 8 years ago

Cancelled classes are not being removed from google calendar, The script seems to get the appointments, though cancelled, from magister, and doesn't seem to understand that they are cancelled.

The difference visible in api response (debug) compared to a regular appointment is that the status = 4, and scrapped= true, where regular appointments seem to always have status = 1 and scrapped = false.

lesander commented 8 years ago

Hi Jelle,

Thanks for creating the issue after our conversation on Twitter.

Magister Calendar checks if a class has been cancelled by checking the value of status, which (for my school back then) appeared to be 5. I currently do not have a Magister account anymore, so I'm unable to verify with the newer versions of Magister.

Note to self:

if ( status === 5 || _scrapped === true ) cancelled = true;

😅

@lieuwex Do you have a list of all status values and their meanings? Also, I do not remember seeing _scrapped anywhere when I first built Magister Calendar. Is that new? Does MagisterJS provide a changelog?

lieuwex commented 8 years ago

Do you have a list of all status values and their meanings?

From Magister's client side code:

0: "GeenStatus" 1: "GeroosterdAutomatisch" 2: "GeroosterdHandmatig" 3: "Gewijzigd" 4: "VervallenHandmatig" 5: "VervallenAutomatisch" 6: "InGebruik" 7: "Afgesloten" 8: "Ingezet" 9: "Verplaatst" 10: "GewijzigdEnVerplaatst"

Also, I do not remember seeing _scrapped anywhere when I first built Magister Calendar. Is that new?

It's there from the beginning (https://github.com/simplyGits/MagisterJS/commit/3d69989517fcfae6badf0f24f76902b69265267b#diff-76bbcd061a8274c306dd84278bd728deR214), but it was broken, it was fixed in https://github.com/simplyGits/MagisterJS/commit/3abfcb11dffae9ba270b5e73a5aeb7feac9dfd15. And finally fixed for good in https://github.com/simplyGits/MagisterJS/commit/be78f98b5e26621094b4c7b8520d07482f594e22

Does MagisterJS provide a changelog?

Not really, I tag each release tho, so you can use git log or the compare feature of github to see the changes between versions.

lieuwex commented 8 years ago

Offtopic:

I currently do not have a Magister account anymore, so I'm unable to verify with the newer versions of Magister.

You've finished high school? 😞 I was hoping on finding a maintainer for magister.js beginning next year since I'm in my final year and I thought of you initially.

lesander commented 7 years ago

offtopic @lieuwex I've got contacts at my old school (IT department), they should be able to provide a demo Magister account for the sake of keeping MagisterJS alive.

lieuwex commented 7 years ago

@lesander whoo nice! 🎉 Does that contain stuff like mock appointments. That would make it more useful :)