instructure / canvas-lms

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

Submissions no longer work with external tool (e.g. Portflow) #2216

Closed pjsmits closed 11 months ago

pjsmits commented 1 year ago

Summary:

We are experiencing major issues with submissions. Without the feature option 'Assignment enhancements' enabled, users can no longer use the LTI placed tool for submission (of their portfolio - Portflow). The users are only able to submit their portfolio when the feature option 'Assignment Enhancements' is enabled.

Steps to reproduce:

  1. Have an LTI tool with placement (Portflow) installed and have a snapshot in your portfolio ready.
  2. Have an assignment of the type Website URL without the feature option of Assignment Enhancements enabled).
  3. Go to the assignment and select the tab that refers to the tool (Portflow)
  4. Choose the desired snapshot and see the infinite loading screen.

Expected behavior:

The user should be able to select their snapshot from Portflow, it should become visible, and then they should be able to submit the assignment.

Actual behavior:

After selecting the snapshot, an infinite loading screen appears, which makes it impossible to submit the assignment.

image

Additional notes:

I understand that it is hard to reproduce without Portflow installed, however, we have some pointers towards the cause of the issue:

We could trace it back to this commit in the source code:

  1. The HomeworkSubmissionLtiContainer calls to processSingleContentItem
  2. Before the commit, this returned a Promise, see this file and the file it calls into.
  3. After the commit, the processSingleContentItem does not return a Promise, see this file
  4. The HomeworkSubmissionLtiContainer fails on the call to .then since it's trying to call .then on an array. This fails with Uncaught TypeError: (0 , X.Z)(...).then is not a function.

The same error does not occur in the new way (with Assignment Enhancements enabled) because it probably uses a different code path which was updated in that same commit.

maths22 commented 11 months ago

Looks like this was resolved in 003416768632a375a3ea617b14b3f30a43fd3226