From 7bb30b6e0f67fb0aa9267a03d9c3e64fc59610c2 Mon Sep 17 00:00:00 2001 From: tylercraig9332 Date: Thu, 2 Nov 2017 16:48:35 -0400 Subject: [PATCH 1/3] Record Assignment Notice gets recorded in the activity log --- class/Command/SendAssignmentNotificationCommand.php | 2 ++ class/HMS_Activity_Log.php | 3 ++- inc/defines.php | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/class/Command/SendAssignmentNotificationCommand.php b/class/Command/SendAssignmentNotificationCommand.php index 0f00040a..3b23a2f5 100644 --- a/class/Command/SendAssignmentNotificationCommand.php +++ b/class/Command/SendAssignmentNotificationCommand.php @@ -7,6 +7,7 @@ use \Homestead\HMS_Bed; use \Homestead\HMS_RLC_Assignment; use \Homestead\HMS_Email; +use \Homestead\HMS_Acivity_Log; use \Homestead\StudentFactory; use \Homestead\NotificationView; use \Homestead\Exception\PermissionException; @@ -160,6 +161,7 @@ public function execute(CommandContext $context) // Send the email HMS_Email::sendAssignmentNotice($student, $student->getName(), $term, $location, $roommates, $movein_time); + HMS_Activity_Log::log_activity(UserStatus::getUsername(), ACTIVITY_ASSIGNMENT_NOTICE, $student->getUsername()) // Mark the student as having received an email $db->reset(); diff --git a/class/HMS_Activity_Log.php b/class/HMS_Activity_Log.php index 33a90d0c..b5a5dcc5 100755 --- a/class/HMS_Activity_Log.php +++ b/class/HMS_Activity_Log.php @@ -236,7 +236,8 @@ public static function getActivityMapping() ACTIVITY_CONTRACT_STUDENT_SIGN_EMBEDDED => 'Student Signed Contract via Embedded Signing', ACTIVITY_CONTRACT_REMOVED_VOIDED => 'Removed Voided Contract', ACTIVITY_MEAL_PLAN_SENT => 'Meal Plan Reported to Banner', - ACTIVITY_ROOM_DAMAGE_NOTIFICATION => 'Room damage notification sent' + ACTIVITY_ROOM_DAMAGE_NOTIFICATION => 'Room damage notification sent', + ACTIVITY_ASSIGNMENT_NOTICE => 'Assignment notice sent' ); } diff --git a/inc/defines.php b/inc/defines.php index 57943589..05e0bb4d 100755 --- a/inc/defines.php +++ b/inc/defines.php @@ -395,7 +395,8 @@ define('ACTIVITY_MEAL_PLAN_SENT', 83); // Meal plan reported to Banner -define('ACTIVITY_ROOM_DAMAGE_NOTIFICATION', 84); // Room damage notification +define('ACTIVITY_ROOM_DAMAGE_NOTIFICATION', 84); // Room damage notification +define('ACTIVITY_ASSIGNMENT_NOTICE', 85); /** * Errors From 4aae62a6d73d70445168120bdc50b96d29c22614 Mon Sep 17 00:00:00 2001 From: tylercraig9332 Date: Thu, 2 Nov 2017 17:20:14 -0400 Subject: [PATCH 2/3] forgot a simicolon lol --- class/Command/SendAssignmentNotificationCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/Command/SendAssignmentNotificationCommand.php b/class/Command/SendAssignmentNotificationCommand.php index 3b23a2f5..f863bf29 100644 --- a/class/Command/SendAssignmentNotificationCommand.php +++ b/class/Command/SendAssignmentNotificationCommand.php @@ -161,7 +161,7 @@ public function execute(CommandContext $context) // Send the email HMS_Email::sendAssignmentNotice($student, $student->getName(), $term, $location, $roommates, $movein_time); - HMS_Activity_Log::log_activity(UserStatus::getUsername(), ACTIVITY_ASSIGNMENT_NOTICE, $student->getUsername()) + HMS_Activity_Log::log_activity(UserStatus::getUsername(), ACTIVITY_ASSIGNMENT_NOTICE, $student->getUsername()); // Mark the student as having received an email $db->reset(); From ee9451881238287ef7539ea7b6581dc949ac79d7 Mon Sep 17 00:00:00 2001 From: tylercraig9332 Date: Thu, 2 Nov 2017 17:45:43 -0400 Subject: [PATCH 3/3] Fixed a bug with some imports and namespacing --- class/Command/SendAssignmentNotificationCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/class/Command/SendAssignmentNotificationCommand.php b/class/Command/SendAssignmentNotificationCommand.php index f863bf29..36d579c2 100644 --- a/class/Command/SendAssignmentNotificationCommand.php +++ b/class/Command/SendAssignmentNotificationCommand.php @@ -7,7 +7,8 @@ use \Homestead\HMS_Bed; use \Homestead\HMS_RLC_Assignment; use \Homestead\HMS_Email; -use \Homestead\HMS_Acivity_Log; +use \Homestead\HMS_Activity_Log; +use \Homestead\UserStatus; use \Homestead\StudentFactory; use \Homestead\NotificationView; use \Homestead\Exception\PermissionException;