autolab / Autolab

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

Should use less ! and do more inline error checking and form redisplay #885

Open cg2v opened 7 years ago

cg2v commented 7 years ago

There are many situations where autolab uses the ! form of an activerecord function, which will trigger donkey kong if a validation or other error occurs, instead of catching the validation error and redisplaying whatever form triggered it. Recent high-profile examples of this include all the error emails we've been getting about "You cannot submit because it is past the deadline" and some earlier errors when the the end time of an assessment was not updated when the start time changed.

zyx-billy commented 6 years ago

Agree. Overall, the entire site needs more error handlers instead of simply crashing on the user. It's really frustrating when editing an assessment, one error causes all changes to be discarded. However, since there's many such problems, we'll need to focus on the more important and frequently occurring ones. But at least when writing new code, we should keep this in mind.