ucfopen / UDOIT

The Universal Design Online content Inspection Tool, or UDOIT (pronounced, “You Do It”) enables faculty to identify accessibility issues in their Learning Management System. It will scan a course, generate a report, and provide resources on how to address common accessibility issues.
GNU General Public License v3.0
108 stars 65 forks source link

Re-resolving issues leads to spinning UI state, 404 in backend #867

Open ssciolla opened 1 year ago

ssciolla commented 1 year ago

Expected behavior

Users are able to resolve and un-resolve issues repeatedly without issue. Furthermore, users will see an indication of errors in the UI.

Actual behavior

When users try to resolve an issue that was previously un-resolved, they see a loading indicator that goes on perpetually. An inspection of the Web console shows two errors:

POST https://{app_url}/udoit3/api/issues/{issue id}/resolve 404
Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

Steps to reproduce

1) Once UDOIT is loaded in a course, open an issue in the modal. 2) Check the resolve checkbox; wait for the action to occur. 3) Uncheck the resolve checkbox; wait for the action to occur. 4) Check the resolve checkbox again; observe that the action never completes.

Commentary

This problem appears to be because un-resolving an issue leads to a new issue being created (with a different ID) rather than an update to the existing issue. There might be a way to resolve this through significant refactoring in the backend, but the frontend could also be modified so that the former issue is replaced with the new issue, or at least an unresolved one. Regarding the lack of an error message, I'm not sure if there's an existing mechanism for reporting an HTTP error, or if there was some design choice related to this. The React application could probably benefit from a consistent error handling strategy if not.