autolab / Autolab

Course management service that enables auto-graded programming assignments.
http://www.autolabproject.com/
Apache License 2.0
741 stars 209 forks source link

Better arity and return type checking for hooks #2135

Open damianhxy opened 3 months ago

damianhxy commented 3 months ago

Currently, there is insufficient validation that a user-defined assessment hook takes the correct number of arguments (arity) or that it returns the expected type.

This can lead to a difficult-to-recover situation, especially if it has to do with a hook like listOptions which is called every time the user views an assessment's landing page. (they would have to navigate directly to the edit page to reload the config file)