Details
-
Bug
-
Resolution: Fixed
-
Major
-
COmanage Registry 4.0.2 (Purple Jade MR2)
Description
If a CO has Sponsor Eligibility Mode set to "CO or COU Admin" AND the admin group for a COU has status Suspended, then the code in CoGroup.php in the function adminCoGroupId() will throw an InvalidArgumentException.
That exception will NOT be caught when an admin attempts to add an enrollment attribute to an enrollment flow. The code in CoEnrollmentAttributesController.php in the beforeRender() function will attempt to find the eligible sponsors, and since the CO has sponsor eligibility configured for "CO or COU Admin" adminCoGroupId() will be called for each COU, but since the admin group for the COU is Suspended it will not be found and the exception thrown.
The simple fix is probably to edit the function sponsorList() in CoPerson.php and in the look over COUs catch the exception and just continue on, effectively excluding the COU where the admin group is Suspended.