Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove call to Submission.edit() in Submission.upload_comment().
Lots of weirdness around how uploading files to a submission works. (see for example ucfopen#496 ucfopen#554 ucfopen#631). This isn't really a fix for any of those. This is just a quick hack to make it work for my use case. At present, a call to Submission.upload_comment() to upload a file to attach to a comment, includes an implicit call to Submission.edit() that creates an empty comment (i.e, no text) on the submission, or, attached the file to any previous comment. This doesn't seem to fit with the description in the Canvas API documentation and is never what you actually want. This change removes that implicit call to .edit(). To comment on a submission and attache a file, first call .upload_comment() to upload the file, and then call .edit() including your comment text, grade etc. as well as the file id returned by .upload_comment().
- Loading branch information