예제 #1
0
 public function __construct()
 {
     parent::__construct();
     // Check permissions
     if (UserStatus::isAdmin()) {
         if (Current_User::allow('hms', 'learning_community_maintenance')) {
             $this->addCommandByName('Add/Edit Communities', 'ShowEditRlc');
         }
         if (Current_User::allow('hms', 'view_rlc_applications')) {
             $this->addCommandByName('Assign Applicants to RLCs', 'ShowAssignRlcApplicants');
             $this->addCommandByName('View Denied Applications', 'ShowDeniedRlcApplicants');
         }
         if (Current_User::allow('hms', 'learning_community_maintenance')) {
             $this->addCommandByName('Send RLC Email Invites', 'ShowSendRlcInvites');
         }
         if (Current_User::allow('hms', 'view_rlc_members')) {
             $this->addCommandByName('View RLC Members by RLC', 'ShowSearchByRlc');
             $this->addCommandByName('View RLC Assignments', 'ViewRlcAssignments');
         }
         if (Current_User::allow('hms', 'email_rlc_rejections')) {
             // Using JSConfirm, ask user if the _really_ want to send the emails
             $onConfirmCmd = CommandFactory::getCommand('SendRlcRejectionEmails');
             $cmd = CommandFactory::getCommand('JSConfirm');
             $cmd->setLink('Send RLC Rejection Emails');
             $cmd->setTitle('Send RLC Rejection Emails');
             $cmd->setQuestion('Send notification emails to denied RLC applicants for selected term?');
             $cmd->setOnConfirmCommand($onConfirmCmd);
             $this->addCommand('Send RLC Rejection Emails', $cmd);
         }
     }
 }
예제 #2
0
 public function __construct()
 {
     parent::__construct();
     // Check-in
     if (Current_User::allow('hms', 'checkin')) {
         $this->addCommandByName('Check-in', 'ShowCheckinStart');
     }
     // Check-out
     if (Current_User::allow('hms', 'checkin')) {
         $this->addCommandByName('Check-out', 'ShowCheckoutStart');
     }
     // Room Damage Assessment
     if (Current_User::allow('hms', 'damage_assessment')) {
         $this->addCommandByName('Damage Assessment', 'ShowRoomDamageAssessment');
     }
     // Room Damage Notifications
     if (Current_User::allow('hms', 'damage_notification')) {
         $this->addCommandByName('Send Room Damage Notices', 'SendRoomDamageNotifications');
         $cmd = CommandFactory::getCommand('JSConfirm');
         $cmd->setLink('Send Room Damage Notices');
         $cmd->setTitle('Send Room Damage Notices');
         $cmd->setQuestion('Send room damage notification emails for the selected term?');
         $cmd->setOnConfirmCommand(CommandFactory::getCommand('SendRoomDamageNotifications'));
         $this->addCommand('Send Room Damage Notices', $cmd);
     }
     /*
     if (UserStatus::isAdmin()) {
     
         if(Current_User::allow('hms', 'package_desk')){
             $this->addCommandByName('Package Desk', 'ShowPackageDeskMenu');
         }
     }
     */
 }
예제 #3
0
 public function __construct()
 {
     parent::__construct();
     // Check permissions
     if (UserStatus::isAdmin()) {
         if (Current_User::allow('hms', 'hall_view')) {
             $residenceHallCmd = CommandFactory::getCommand('SelectResidenceHall');
             $residenceHallCmd->setTitle('Edit a Residence Hall');
             $residenceHallCmd->setOnSelectCmd(CommandFactory::getCommand('EditResidenceHallView'));
             $this->addCommand('Edit a residence hall', $residenceHallCmd);
         }
         if (Current_User::allow('hms', 'floor_view')) {
             $floorCmd = CommandFactory::getCommand('SelectFloor');
             $floorCmd->setTitle('Edit a Floor');
             $floorCmd->setOnSelectCmd(CommandFactory::getCommand('EditFloorView'));
             $this->addCommand('Edit a floor', $floorCmd);
         }
         if (Current_User::allow('hms', 'room_view')) {
             $roomCmd = CommandFactory::getCommand('SelectRoom');
             $roomCmd->setTitle('Edit a Room');
             $roomCmd->setOnSelectCmd(CommandFactory::getCommand('EditRoomView'));
             $this->addCommand('Edit a room', $roomCmd);
         }
         if (Current_User::allow('hms', 'bed_view')) {
             $bedCmd = CommandFactory::getCommand('SelectBed');
             $bedCmd->setTitle('Edit a Bed');
             $bedCmd->setOnSelectCmd(CommandFactory::getCommand('EditBedView'));
             $this->addCommand('Edit a bed', $bedCmd);
         }
     }
 }
예제 #4
0
 public function __construct()
 {
     parent::__construct();
     if (UserStatus::isAdmin()) {
         if (Current_User::allow('hms', 'assignment_maintenance')) {
             $this->addCommandByName('Assign student', 'ShowAssignStudent');
             $this->addCommandByName('Unassign student', 'ShowUnassignStudent');
             $this->addCommandByName('Set move-in times', 'ShowMoveinTimesView');
         }
         if (Current_User::allow('hms', 'run_hall_overview')) {
             $hallOverviewCmd = CommandFactory::getCommand('SelectResidenceHall');
             $hallOverviewCmd->setTitle('Hall Overview');
             $hallOverviewCmd->setOnSelectCmd(CommandFactory::getCommand('HallOverview'));
             $this->addCommand('Hall Overview', $hallOverviewCmd);
         }
         if (Current_User::allow('hms', 'assign_by_floor')) {
             $floorAssignCmd = CommandFactory::getCommand('AssignByFloor');
             $floorAssignCmd->setOnSelectCmd(CommandFactory::getCommand('ShowFloorAssignmentView'));
             $floorAssignCmd->setTitle('Assign Students to Floor');
             $this->addCommand('Assign students by floor', $floorAssignCmd);
         }
         if (UserStatus::isAdmin() && Current_User::allow('hms', 'roommate_maintenance')) {
             $this->addCommandByName('Edit freshmen roommate requests', 'EditRoommateGroupsView');
         }
         if (Current_User::allow('hms', 'autoassign')) {
             $autoAssignCmd = CommandFactory::getCommand('JSConfirm');
             $autoAssignCmd->setLink('Auto-assign');
             $autoAssignCmd->setTitle('Auto-assign');
             $autoAssignCmd->setQuestion('Start auto-assign process for the selected term?');
             $autoAssignCmd->setOnConfirmCommand(CommandFactory::getCommand('ScheduleAutoassign'));
             $this->addCommand('Start Autoassigner', $autoAssignCmd);
         }
         if (Current_User::allow('hms', 'withdrawn_search')) {
             $withdrawnSearchCmd = CommandFactory::getCommand('JSConfirm');
             $withdrawnSearchCmd->setLink('Withdrawn search');
             $withdrawnSearchCmd->setTitle('Withdrawn search');
             $withdrawnSearchCmd->setQuestion('Start search for withdrawn students for the selected term?');
             $withdrawnSearchCmd->setOnConfirmCommand(CommandFactory::getCommand('WithdrawnSearch'));
             $this->addCommand('Withdrawn search', $withdrawnSearchCmd);
         }
         $hms_perm = new HMS_Permission();
         $memberships = $hms_perm->getMembership('room_change_approve', NULL, UserStatus::getUsername());
         if (!empty($memberships)) {
             $RDRoomChangeCmd = CommandFactory::getCommand('ShowRDRoomChangeList');
             $this->addCommand('Room Change Approval (RD)', $RDRoomChangeCmd);
         }
         if (Current_User::allow('hms', 'admin_approve_room_change')) {
             $adminRoomChangeCmd = CommandFactory::getCommand('ShowAdminRoomChangeList');
             $this->addCommand('Room Change Approval (Admin)', $adminRoomChangeCmd);
         }
     }
 }
예제 #5
0
 public function __construct()
 {
     parent::__construct();
     //if(UserStatus::isAdmin() && (Current_User::allow('hms', 'email_hall') || Current_User::allow('hms', 'email_all'))){
     $this->addCommandByName('Send messages by Hall', 'ShowHallNotificationSelect');
     //}
     if (UserStatus::isAdmin() && Current_User::allow('hms', 'assignment_notify')) {
         $cmd = CommandFactory::getCommand('JSConfirm');
         $cmd->setLink('Send assignment notifications');
         $cmd->setTitle('Send assignment notification emails');
         $cmd->setQuestion('Send assignment notification emails for the selected term?');
         $cmd->setOnConfirmCommand(CommandFactory::getCommand('SendAssignmentNotification'));
         $this->addCommand('Send assignment notifications', $cmd);
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (UserStatus::isAdmin()) {
         if (Current_User::allow('hms', 'lottery_admin')) {
             $this->addCommandByName('Settings', 'ShowLotterySettings');
             $this->addCommandByName('Create entry', 'ShowLotteryAdminEntry');
             $this->addCommandByName('Set automatic winners', 'ShowLotteryAutoWinners');
             $this->addCommandByName('Eligibility waivers', 'ShowLotteryEligibilityWaiver');
         }
         if (Current_User::allow('hms', 'special_interest_approval')) {
             $this->addCommandByName('Interest group approval', 'ShowSpecialInterestGroupApproval');
         }
         if (Current_User::allow('hms', 'lottery_admin')) {
             $this->addCommandByName('Send Lottery Invites', 'ShowSendLotteryInvites');
             $this->addCommandByName('Re-Application waiting list', 'ShowLotteryWaitingList');
             $this->addCommandByName('Open Waiting list', 'ShowOpenWaitingList');
         }
     }
 }