gateway4labs/labmanager

Support more responses

Opened this issue · 3 comments

There are no responses for:
When an LMS is not recognised on the Labmanger.
When a Student/Learner tries to launch a Tool.
When an Instructor launches a tool and has no access for it.

Basically, for every 400 range errors, there are no responses in the LTI schema.

I was reviewing this and apparently in Moodle, when a 400 error is raised, the template is not rendered.
This might be a Moodle's way to treat errors since I started to respond (from the labmanager) to 404 errors with a 200 and the "404 not found" template got rendered.

When an LMS is not recognised on the Labmanger.

I don't see when a LMS won't be recognised by the Lab Manager after it has been added. I mean, when the LMS admin adds the Lab Manager, we could give him a "test this" option. If he entered something wrong, we could easily display a "Something's wrong" template with a 200 response code (is in fact not a 4xx). Otherwise, there should be no problem with the LMS inside the lab manager (other than deleting it).

I don't think is good it's a good idea to use 200 error codes.

When a Student/Learner tries to launch a Tool.

Should be a 403, which means "You are logged in but have no permissions". A 401 is "you are not logged in" but the user is logged in so IMO a 403 is better here.

When an Instructor launches a tool and has no access for it.

Same as above, I'm +1 for a 403.

I agree that responding an error with 200 is not ideal, but the issue I am trying to raise is that the LMS, in this case Moodle, is not rendering anything that is not coming with a 200 response.

I was trying to get the 403 and 412 templates rendered, but it was only when I said that everything was OK (with a 200 response) that the LMS would show anything.