More API issues with assignments...(or just documentation)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
More issues with the Assignments API...or just perhaps the docs?
// (Optional) If 'submission' is included in the 'include' parameter, includes a
// Submission object that represents the current user's (user who is requesting
// information from the api) current submission for the assignment. See the
// Submissions API for an example response. If the user does not have a
// submission, this key will be absent.
"submission": null,
But this is not true. Here is an assignment with no submission:
"only_visible_to_overrides": false,
"submission": {
"id": 16290561,
"body": null,
"url": null,
"grade": null,
"score": null,
"submitted_at": null,
"assignment_id": 713759,
"user_id": 34475,
"submission_type": null,
"workflow_state": "unsubmitted",
"grade_matches_current_submission": true,
"graded_at": null,
"grader_id": null,
"attempt": null,
"cached_due_date": "2020-09-28T04:59:59Z",
"excused": null,
"late_policy_status": null,
"points_deducted": null,
"grading_period_id": null,
"extra_attempts": null,
"posted_at": null,
"late": false,
"missing": false,
"seconds_late": 0,
"entered_grade": null,
"entered_score": null,
"preview_url": "https://xxxx.instructure.com/courses/41166/assignments/713759/submissions/34475?preview=1&version=0"
},
"locked_for_user": false,
Many fields within this are null. It shows workflow_state unsubmitted, the preview_url shows "No Submission", but this submission field is clearly not a null field. It must be enumerated and parsed for other info.
Also, there are many attributes on the assignment response which are not listed in the documentation. For instance, it too has a workflow_state, but this is not explained in the documentation.
It would appear that to truly find unsubmitted assignments we need to parse (at least) the workflow_state and locked status for the assignment, ensure that submission_types is not 'none' and then parse through "submission" to see if the value is actually unsubmitted within its workflow_state?
I'm confused. Either I'm missing something major here or else we are not being provided with accurate information that allows us access to pull data that is impossible to easily do within the UI.