diff --git a/CHANGEDB.php b/CHANGEDB.php index 43d59233ad..a9fb173ba9 100644 --- a/CHANGEDB.php +++ b/CHANGEDB.php @@ -804,5 +804,5 @@ UPDATE `gibbonCountry` SET `printable_name` = 'Ivory Coast (Côte d\'Ivoire)', `iddCountryCode` = '225' WHERE `gibbonCountry`.`printable_name` = 'Cote D\'Ivoire';end CREATE TABLE `gibbonBehaviourFollowUp` ( `gibbonBehaviourFollowUpID` INT(11) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonBehaviourID` INT(12) UNSIGNED ZEROFILL NOT NULL, `gibbonPersonID` INT(10) UNSIGNED ZEROFILL NOT NULL, `followUp` TEXT, `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`gibbonBehaviourFollowUpID`), KEY `gibbonBehaviourID` (`gibbonBehaviourID`));end ALTER TABLE `gibbonReportingCriteriaType` ADD `options` TEXT NULL AFTER `gibbonScaleID`;end -INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Student Form Group Changed', 'Admissions', 'View Student Profile', 'Core', 'All,gibbonYearGroupID', 'Y');end +INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Student Form Group Changed', 'Admissions', 'View Student Profile_full', 'Core', 'All,gibbonYearGroupID', 'Y');end "; diff --git a/modules/Admissions/studentEnrolment_manage_editProcess.php b/modules/Admissions/studentEnrolment_manage_editProcess.php index 7967e30f50..fc0b10f8d6 100644 --- a/modules/Admissions/studentEnrolment_manage_editProcess.php +++ b/modules/Admissions/studentEnrolment_manage_editProcess.php @@ -25,6 +25,7 @@ use Gibbon\Forms\CustomFieldHandler; use Gibbon\Domain\FormGroups\FormGroupGateway; use Gibbon\Domain\Timetable\CourseEnrolmentGateway; +use Gibbon\Domain\School\YearGroupGateway; require_once '../../gibbon.php'; @@ -171,6 +172,22 @@ $event->setNotificationText($notificationString); $event->setActionLink('/index.php?q=/modules/Students/student_view_details.php&gibbonPersonID='.$gibbonPersonID.'&search=&sort=&allStudents=on'); + // Head of Year + $yearGroup = $container->get(YearGroupGateway::class)->getByID($gibbonYearGroupID); + $event->addRecipient($yearGroup['gibbonPersonIDHOY']); + + // Form Tutor: original + $formGroup = $container->get(FormGroupGateway::class)->getByID($gibbonFormGroupIDOriginal); + $event->addRecipient($formGroup['gibbonPersonIDTutor']); + $event->addRecipient($formGroup['gibbonPersonIDTutor2']); + $event->addRecipient($formGroup['gibbonPersonIDTutor3']); + + // Form Tutor: new + $formGroup = $container->get(FormGroupGateway::class)->getByID($gibbonFormGroupID); + $event->addRecipient($formGroup['gibbonPersonIDTutor']); + $event->addRecipient($formGroup['gibbonPersonIDTutor2']); + $event->addRecipient($formGroup['gibbonPersonIDTutor3']); + // Add event listeners to the notification sender $event->sendNotifications($pdo, $session); }