scottquach/Canvas-Assignments-Transfer-For-Todoist

Locked assignments

Closed this issue · 1 comments

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... :)

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.