Skip to content

Commit

Permalink
Admissions: post-merge tweaks for #1817, add HOY and form tutors by d…
Browse files Browse the repository at this point in the history
…efault
  • Loading branch information
SKuipers committed Apr 18, 2024
1 parent 8752ce1 commit 524b513
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGEDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
";
17 changes: 17 additions & 0 deletions modules/Admissions/studentEnrolment_manage_editProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 524b513

Please sign in to comment.