adlnet / Moodle-mod_cmi5launch

A Moodle plugin which allows teachers to upload cmi5 packaged lessons within a Moodle Course Activity and then assign the activity to students
Apache License 2.0
5 stars 5 forks source link

Better handle user input errors / empty fields #45

Closed mudrd8mz closed 1 month ago

mudrd8mz commented 3 months ago

When the module instance form is submitted with default (empty) values, the next screen dies with fatal error messages.

This seems to be a consequence of leaving the endpoint URL empty, which is something that the form allows you to do. I think there might be more "user friendly" way of communicating this rather than "Exception - array_key_exists(): Argument #2 ($array) must be of type array, null given"

image

ADLMeganBohland commented 3 months ago

Hi, @mudrd8mz , Thanks for the input. I am currently working on creating specialized exception messages to not only fail more gracefully but try to capture what went wrong and give better info to the user. I will close this issue out when it's done.

ADLMeganBohland commented 1 month ago

I forgot to close this issue, this should be handled in the pushed branch 'better-hanlde-errors'