scottquach/Canvas-Assignments-Transfer-For-Todoist

External Tool Submission Assignments

Closed this issue · 2 comments

After PR#15 (#15) several assignments which didn't sync before synced, which are all completed.

Investigating these showed that they are all assignments which are submitted external to Canvas using third party systems, so the status does not show submitted, as submitting shows "An external tool".

I'm wondering the best way to handle these - One possibility could be to not sync assignments where the grade is 100% (in this case they all have 10/10), but that wouldn't work if they aren't 100%. Or add an option to use score recorded instead of submitted status.

It looks like for external tool submission assignments the workflow_state is "published" on both, so the workflow_state isn't usable.

It looks like there is a section for "has_submitted_submissions" which is either True/False which should work, though that doesn't appear to be true for all of my assignments.

Two other potential options I could investigate based on
https://canvas.instructure.com/doc/api/assignments.html

  1. If I specifically request the "can_submit" parameter, what does that include?
  2. What about just returning "unsubmitted" assignments, based on the unsubmitted bucket? (https://canvas.instructure.com/doc/api/assignments.html)
    If that works the way it seems to sound like it does, it could potentially address a significant portion of the logic in the script as we would not longer need to determine or do the logic based on what assignments are submitted.

FYI, this should be resolved now; I modified logic by using
" assignment["has_submitted_submissions"] is False
or assignment["submission"]["workflow_state"] == "unsubmitted"

It appears "has_submitted_submissions" takes care of this

The can_submit isn't an option because that would include assignments with open attempts even if they are already graded (which would be a nightmare to handle so we just ignore those)