scottquach / Canvas-Assignments-Transfer-For-Todoist

Transfer your school assignments from Canvas to Todoist
MIT License
41 stars 19 forks source link

Locked assignments #18

Closed stacksjb closed 2 years ago

stacksjb commented 2 years ago

I have a significant number of teachers who use the "lock" function within Canvas to prevent you from submitting or editing old assignments (often don't accept late work) and/or to keep you from working too far ahead.

This creates the problem of assignments you can't do because they are locked, or can't submit.

The problem is that we probably don't want to just not sync all locked assignments, because if they are due in the future, they will become unlocked and you want to work on them.

So, I'm thinking the best logic would probably be locked_for_user": true" AND "unlock_at" is in the PAST

(If it's locked but will unlock in the future OR if it is unlocked but will lock in the future we will still want to sync it)

Has anyone else run into this? My school/teachers seem to do a lot of weird stuff in Canvas... :)

stacksjb commented 2 years ago

I added logic into my script that compares unlock_at date and doesn't sync tasks if unlock_at is in the future. I ended up having to add both logic rules, because sometimes assignments are locked and are not scheduled to be unlocked; other times they are locked but will be unlocked in the future.