catalyst / moodle-local_sitenotice

https://moodle.org/plugins/local_sitenotice
4 stars 6 forks source link

PHP notice when configured cohort was deleted #42

Open dmitriim opened 2 years ago

dmitriim commented 2 years ago

Notice: Undefined offset: 2521 in /var/www/site/local/sitenotice/classes/helper.php on line 609

I think we should automatically disable a notice once a related cohort is deleted. Also on a try to enable it we should display a meaningful error and don't let to enable until a cohort is fixed.

As a bonus point we may want to add some validation to the form if we try to save non-existing cohort.