Adding checks to the alerts for student training.

Fix for ORA-728 and ORA-729 - Alert messages when there are no training examples and alerts when student training is disabled.

Now checking both scenarios before display an alert. Added tests accordingly. 

@wedaly @gradyward 
It might be slightly more succinct to use `$.each` here instead of a `for` loop.