instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.62k stars 2.49k forks source link

Grades cannot be posted via LTI tool for unpublished assignments #1964

Open mattwright opened 2 years ago

mattwright commented 2 years ago

Summary:

LTI 1.3 Resource Launch of an assignment by an Instructor before the assignment is published includes the "assignment and grades" service, but attempting to use it to post a grade to the line item fails with "cannot be changed at this time: This assignment is still unpublished." There doesn't seem to be a way with the LTI api to discover whether an assignment is published, so I suggest that either 1) the "Assignment and Grades" service for LTI not be included for a resource launch until the assignment is published or 2) grades be allowed to be updated by the LTI tool prior to publishing assignment.

Steps to reproduce:

  1. Create an assignment with an external tool using LTI 1.3
  2. Launch the assignment as the instructor
  3. Assignment and grades endpoint (https://purl.imsglobal.org/spec/lti-ags/claim/endpoint) is included in LTI launch
  4. Attempting to PUT a score to that line item will fail with the above error message

Expected behavior:

If the assignment and grades module is included, I should be able to post grades back to Canvas LMS.

Actual behavior:

Attempt to post grades results in an error for 'grade field: "cannot be changed at this time: This assignment is still unpublished."

Additional notes:

There doesn't seem to be any way in the LTI resource launch to determine if the assignment has been published and therefore whether the assignment and grades service will work. In our scenario, students may use the tool independently to make progress towards an assignment before that assignment is published in the LMS, and upon creation by the instructor, we wish to populate any grades that have been completed thus far.

Alternatively, is there some way to determine from an LTI resource launch if an assignment has been published?

dbhynds commented 1 year ago

@mattwright did you ever find a solution for this? We're running into the same issue.

mattwright commented 1 year ago

Hi @dbhynds, I don't think I found a solution to this.