CLC-1100 Do not lose Canvas assignments due earlier today

Refactor to reduce code duplication.

https://jira.media.berkeley.edu/jira/browse/CLC-1100