/** * function __construct * <pre> * Initialize the object. * </pre> * @param $pathModuleRoot [STRING] The path to the module's root dir. * @param $viewer [OBJECT] The viewer object. * @param $sortBy [STRING] Field data to sort listManager by. * @param $managerInit [INTEGER] Initialization value for the listManager. * @return [void] */ function __construct($pathModuleRoot, $viewer, $sortBy) { parent::__construct(page_ViewGroups::DISPLAY_FIELDS); $this->pathModuleRoot = $pathModuleRoot; $this->viewer = $viewer; //Get person ID $accessManager = new RowManager_AccessManager(); $accessManager->loadByViewerID($this->viewer->getViewerID()); $this->personID = $accessManager->getPersonID(); echo "ViewerID: " . $this->viewer->getViewerID() . " <br>personID: " . $this->personID . "<br>"; /* * The code below contains the different permission cases for view groups. * * Check 1 = check if the user is a SUPER ADMIN * Check 2 = check if the user is a STAFF and which campuses he/she is assigned to, taken from HRDB * Check 3 =check cim_sch_permissionCampusAdmin for which CAMPUSES this user is ADMIN for * Check 4 = check cim_sch_permissionGroupAdmin for which GROUPS this user is ADMIN for * If check 1-4 FAIL then ViewGroup will show nothing. (This user is a normal user and have not created any groups . */ $multiTableManager = new MultiTableManager(); $groupManager = new RowManager_GroupManager(); $superAdminManager = new RowManager_PermissionsSuperAdminManager(); //SUPER ADMIN //Check if user's Viewer_id is in the PermissionSuperAdmin table if ($superAdminManager->loadByViewerID($this->viewer->getViewerID())) { // the viewer is a super admin echo "ViewerID[" . $this->viewer->getViewerID() . "] is a super admin<br/>"; $campusGroupManager = new RowManager_CampusGroupManager(); $multiTableManager->addRowManager($groupManager); $multiTableManager->addRowManager($campusGroupManager, new JoinPair($campusGroupManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID(), JOIN_TYPE_LEFT)); } else { //STAFF // This array stores all the campuses associated to the user. //This array is continually populated $campusArray = array(); //check HRDB if the user is a staff $assignmentManager = new RowManager_AssignmentsManager(); $assignmentManager->setPersonID($this->personID); $assignmentManager->setAssignmentStatus(CA_STAFF); $assList = new ListIterator($assignmentManager); $assList->setFirst(); while ($assList->moveNext()) { $assMan = $assList->getCurrent(new RowManager_AssignmentsManager()); //for each campuses found, store in array $campusArray[] = $assMan->getCampusID(); } //CAMPUS ADMIN //Check cim_sch_permissionsCampusAdmin for the viewer id of the user $permissionsCampusAdmin = new RowManager_PermissionsCampusAdminManager(); $permissionsCampusAdmin->setViewerID($this->viewer->getViewerID()); $campusAdminList = new ListIterator($permissionsCampusAdmin); $campusAdminList->setFirst(); while ($campusAdminList->moveNext()) { $permCampus = $campusAdminList->getCurrent(new RowManager_PermissionsCampusAdminManager()); //for each campuses found, store in array $campusArray[] = $permCampus->getCampusID(); } //remove any duplicate campus ID in the array $campusArray = array_unique($campusArray); //GROUP ADMIN $permissionsGroupAdminManager = new RowManager_PermissionsGroupAdminManager(); $campusGroupManager = new RowManager_CampusGroupManager(); //send a list of campues and the viewer ID to constrict the search condition //The Viewer_id is use to check the cim_sch_permissionsGroupAdmin table for // groups that were created by the user $searchCond = $campusGroupManager->returnSearchCondition($campusArray, $this->viewer->getViewerID()); //create the appropriate join between 3 tables //Join cim_sch_group and cim_sch_permissionsGroupAdmin and cim_sch_campusGroup $multiTableManager->addRowManager($groupManager); $multiTableManager->addRowManager($campusGroupManager, new JoinPair($campusGroupManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID(), JOIN_TYPE_LEFT)); $multiTableManager->addRowManager($permissionsGroupAdminManager, new JoinPair($permissionsGroupAdminManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID(), JOIN_TYPE_LEFT)); $multiTableManager->addSearchCondition($searchCond); } /*Case 3: Group Admin - access to an individual group and can create other group admins (ex. DGL) Normal User - can only submit schedule, assume this unless given other permissions Check the group admin table check cim_sch_permissiongroupadmin -> cim_sch_campusgroup -> cim_sch_group filter on viewer id Case 4: All staff - implicit access to all groups on all campuses where their status is staff check cim_hrdb_staff table if true get all campuses from cim_hrdb_assignment where assignment status id = 3 */ /*$groupManager = new RowManager_GroupManager(); $multiTableManager = new MultiTableManager(); $campusGroupManager = new RowManager_CampusGroupManager(); $multiTableManager->addRowManager( $campusGroupManager ); $multiTableManager->addRowManager( $groupManager, new JoinPair( $campusGroupManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID(), JOIN_TYPE_RIGHT ) );*/ // $dataAccessObject = $multiTableManager; $multiTableManager->setSortOrder('campus_id'); //******Not sure this is the way to do it***** // $this->listManager = new GroupList( $sortBy ); $this->listManager = $multiTableManager->getListIterator(); // now initialize the labels for this page // start by loading the default field labels for this Module $languageID = $viewer->getLanguageID(); $seriesKey = modulecim_sch::MULTILINGUAL_SERIES_KEY; $pageKey = modulecim_sch::MULTILINGUAL_PAGE_FIELDS; $this->labels = new MultilingualManager($languageID, $seriesKey, $pageKey); // then load the page specific labels for this page $pageKey = page_ViewGroups::MULTILINGUAL_PAGE_KEY; $this->labels->loadPageLabels($pageKey); $this->labels->setSeriesKey(SITE_LABEL_SERIES_SITE); $this->labels->loadPageLabels(SITE_LABEL_PAGE_FORM_LINKS); }
/** * function getHTML * <pre> * This method returns the HTML data generated by this object. * </pre> * @return [STRING] HTML Display data. */ function getHTML() { // Uncomment the following line if you want to create a template // tailored for this page: //$path = $this->pathModuleRoot.'templates/'; // Otherwise use the standard Templates for the site: $path = SITE_PATH_TEMPLATES; /* * store the link values */ // example: // $this->linkValues[ 'view' ] = 'add/new/href/data/here'; // store the link labels $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]'); $this->linkLabels['del'] = $this->labels->getLabel('[Delete]'); $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]'); // $this->linkLabels[ 'view' ] = 'new link label here'; /* * store any additional link Columns */ // example: //$title = $this->labels->getLabel( '[title_groups]'); //$columnLabel = $this->labels->getLabel( '[groups]'); //$link = $this->linkValues[ 'groups' ]; //$fieldName = 'accessgroup_id'; //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName); /* * Update any label tags ... */ // example: // $name = $user->getName(); // $this->labels->setLabelTag( '[Title]', '[userName]', $name); // NOTE: this parent method prepares the $this->template with the // common AdminBox data. $this->prepareTemplate($path); // store the statevar id to edit $this->template->set('editEntryID', $this->permissionsSuperAdmin_id); // store all the fields to the template $this->setFormFieldsToTemplate(); /* * Form related Template variables: */ /* * Insert the date start/end values for the following date fields: */ // example: //$this->template->set( 'startYear_[fieldName]', 2000); //$this->template->set( 'endYear_[fieldName]', 2010); /* * List related Template variables : */ // Store the XML Node name for the Data Access Field List $xmlNodeName = RowManager_PermissionsSuperAdminManager::XML_NODE_NAME; $this->template->set('rowManagerXMLNodeName', $xmlNodeName); // store the primary key field name for the data being displayed $this->template->set('primaryKeyFieldName', 'permissionsSuperAdmin_id'); // store data list to the template // NOTE: we initialize it here to make sure we capture any new data // from a recent processData() call. $dataAccessManager = new RowManager_PermissionsSuperAdminManager(); $dataAccessManager->setSortOrder($this->sortBy); // $this->dataList = new PermissionsSuperAdminList( $this->sortBy ); $this->dataList = $dataAccessManager->getListIterator(); $this->template->setXML('dataList', $this->dataList->getXML()); /* * Add any additional data required by the template here */ // get a list of all viewer_id's $viewer = new RowManager_ViewerManager(); $viewer->setSortOrder('viewer_userID'); $viewerList = new ListIterator($viewer); $viewerArray = $viewerList->getDropListArray(); $this->template->set('list_viewer_id', $viewerArray); //array_flip( $templateName = 'siteAdminBox.php'; // if you are creating a custom template for this page then // replace $templateName with the following: //$templateName = 'page_ManageSuperAdmin.php'; return $this->template->fetch($templateName); }
function displayGroups() { // This array get passed back to the template multiple time $groupCollectionArray = array(); $multiTableManager = new MultiTableManager(); $groupManager = new RowManager_GroupManager(); $superAdminManager = new RowManager_PermissionsSuperAdminManager(); //SUPER ADMIN //Check if user's Viewer_id is in the PermissionSuperAdmin table //If the user is a super admin then show all gorups per campus including public groups if ($superAdminManager->loadByViewerID($this->viewer->getViewerID())) { // the viewer is a super admin echo "ViewerID[" . $this->viewer->getViewerID() . "] is a super admin<br/>"; $campusManager = new RowManager_CampusManager(); $campusArray = array(); $this->listIterator = $campusManager->getListIterator(); $this->listIterator->setFirst(); while ($this->listIterator->moveNext()) { $group = $this->listIterator->getCurrent(new RowManager_CampusManager()); $campusArray[] = $group->getCampusID(); } //echo "<pre>".print_r($campusArray)."</pre>"; foreach ($campusArray as $key => $campusID) { $campusManager = new RowManager_CampusManager($campusID); $campusGroupManager = new RowManager_CampusGroupManager(); $campusGroupManager->setCampusID($campusID); $groupManager = new RowManager_GroupManager(); $multiTableManager = new MultiTableManager(); $multiTableManager->addRowManager($groupManager); $multiTableManager->addRowManager($campusGroupManager, new JoinPair($campusGroupManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID(), JOIN_TYPE_RIGHT)); $multiTableManager->addRowManager($campusManager, new JoinPair($campusManager->getJoinOnCampusID(), $campusGroupManager->getJoinOnCampusID(), JOIN_TYPE_RIGHT)); //Go through the result and save all the groups of that campus to an array $campusGroupArray = array(); $this->listIterator = $multiTableManager->getListIterator(); $this->listIterator->setFirst(); while ($this->listIterator->moveNext()) { $group = $this->listIterator->getCurrent(new RowManager_CampusGroupManager()); $campusGroupArray[] = $group; } //set the campusID and CampusDesc for the $campusGroupArray $groupCollectionArray[] = new GroupCollection($campusManager->getShortDesc(), $campusID, $campusGroupArray); } //TODO - not a correct join //TODO - get all campus ID and groups //TODO - get all public groups } else { //STAFF OR STUDENT //If the user is a student or staff then they should have campus assignmnets in cim_hrdb_assignment //Find all the campuses and save them in the $campusAssigment array $campusAssignments = array(); $statusArray = array(); $statusArray[] = CA_STAFF; $statusArray[] = CA_STUDENT; foreach ($statusArray as $key => $statusID) { // filter from the cim_hrdb_assignment table $assignmentManager = new RowManager_AssignmentsManager(); $assignmentManager->setPersonID($this->personID); $assignmentManager->setAssignmentStatus($statusID); $assignmentList = new ListIterator($assignmentManager); $assignmentList->setFirst(); while ($assignmentList->moveNext()) { $assManager = $assignmentList->getCurrent(new RowManager_AssignmentsManager()); $campusAssignments[] = $assManager->getCampusID(); } } //CAMPUS ADMIN //some users can be admin to a campus that they are neither a student or staff for //Check cim_sch_permissionsCampusAdmin for the viewer id of the user //for each found save the campusID in the $campusAssignments table $permissionsCampusAdmin = new RowManager_PermissionsCampusAdminManager(); $permissionsCampusAdmin->setViewerID($this->viewer->getViewerID()); $campusAdminList = new ListIterator($permissionsCampusAdmin); $campusAdminList->setFirst(); while ($campusAdminList->moveNext()) { $permCampus = $campusAdminList->getCurrent(new RowManager_PermissionsCampusAdminManager()); //for each campuses found, store in array $campusAssignments[] = $permCampus->getCampusID(); } //remove any duplicate campus ID in the array $campusAssignments = array_unique($campusAssignments); //After collection all the campusIDs lets go through each campusID and get the groups //for each campusID find all the groups in $campusGroupManager table //Save the groups in an array taged with the campusID, Shortdesc foreach ($campusAssignments as $key => $campusID) { //Set the campusID so we can get the shortDesc at the end $campusManager = new RowManager_CampusManager($campusID); //Join cim_sch_Group and cim_sch_campusgroup $campusGroupManager = new RowManager_CampusGroupManager(); $campusGroupManager->setCampusID($campusID); $multiTableManager = new MultiTableManager(); $multiTableManager->addRowManager($campusGroupManager); $groupManager = new RowManager_GroupManager(); $multiTableManager->addRowManager($groupManager, new JoinPair($campusGroupManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID())); //Go through the result and save all the groups of that campus to an array $campusGroupArray = array(); $this->listIterator = $multiTableManager->getListIterator(); $this->listIterator->setFirst(); while ($this->listIterator->moveNext()) { $group = $this->listIterator->getCurrent(new RowManager_GroupManager()); $campusGroupArray[] = $group; } //set the campusID and CampusDesc for the $campusGroupArray $groupCollectionArray[] = new GroupCollection($campusManager->getShortDesc(), $campusID, $campusGroupArray); } //GROUP ADMIN //The user might be a group admin so we should display that group as well //We have to find the which groups the user is admin for in cim_sch_permissionsGroupAdmin //For each of these gorups, look in cim_sch_campusGroup table and find and store the campusID in an array //Use the campusID array and for each campusID and only save the gorups with the same campusID //Save all the gorups in the $gorupCollectionArray //Set a fillter for only show results if its the user's ViewerID $permissionsGroupAdminManager = new RowManager_PermissionsGroupAdminManager(); $permissionsGroupAdminManager->setViewerID($this->viewer->getViewerID()); //Set Fillter to only show results that are a campus group $groupManager = new RowManager_GroupManager(); $groupManager->setGroupTypeID(1); //Make the join of tables cim_sch_group, cim_sch_campusGroup, cim_sch_permissionsGroupAdmin $campusGroupManager = new RowManager_CampusGroupManager(); $multiTableManager = new MultiTableManager(); $multiTableManager->addRowManager($groupManager); $multiTableManager->addRowManager($campusGroupManager, new JoinPair($campusGroupManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID(), JOIN_TYPE_RIGHT)); $multiTableManager->addRowManager($permissionsGroupAdminManager, new JoinPair($permissionsGroupAdminManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID(), JOIN_TYPE_RIGHT)); //Go through the results and save the campusID of that group $campusGroupArray = array(); $this->listIterator = $multiTableManager->getListIterator(); $this->listIterator->setFirst(); while ($this->listIterator->moveNext()) { $group = $this->listIterator->getCurrent(new RowManager_CampusGroupManager()); $campusGroupArray[] = $group->getCampusID(); } //For each campus found, go through the result again and fillter by campusID //Only the groups of the same campusID are saved together foreach ($campusGroupArray as $key => $campusID) { //This allows us to get the campus shortDesc at the end $campusManager = new RowManager_CampusManager($campusID); //same code as before to join the tables $permissionsGroupAdminManager = new RowManager_PermissionsGroupAdminManager(); $permissionsGroupAdminManager->setViewerID($this->viewer->getViewerID()); $campusGroupManager = new RowManager_CampusGroupManager(); $campusGroupManager->setCampusID($campusID); $groupManager = new RowManager_GroupManager(); $groupManager->setGroupTypeID(1); $multiTableManager = new MultiTableManager(); $multiTableManager->addRowManager($groupManager); $multiTableManager->addRowManager($campusGroupManager, new JoinPair($campusGroupManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID(), JOIN_TYPE_RIGHT)); $multiTableManager->addRowManager($permissionsGroupAdminManager, new JoinPair($permissionsGroupAdminManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID(), JOIN_TYPE_RIGHT)); //go through the results and save the gorups $campusGroupArray = array(); $this->listIterator = $multiTableManager->getListIterator(); $this->listIterator->setFirst(); while ($this->listIterator->moveNext()) { $group = $this->listIterator->getCurrent(new RowManager_GroupManager()); $campusGroupArray[] = $group; } //set the campusID and CampusDesc for the $campusGroupArray $groupCollectionArray[] = new GroupCollection($campusManager->getShortDesc(), $campusID, $campusGroupArray); } //PUBLIC Groups //Show all groups in cim_sch_group with the groupTypeID of 2 (public) //The public gorup does not have a campus assign $campusID = 0; //The public gorup desc is public, this is shown in the template $publicGroupDesc = "Public"; //Set the public gorup fillter $thisIsAPublicGroup = 2; $groupManager = new RowManager_GroupManager(); $groupManager->setGroupTypeID($thisIsAPublicGroup); //go through the results and save the groups $groupArray = array(); $this->listIterator = $groupManager->getListIterator(); $this->listIterator->setFirst(); while ($this->listIterator->moveNext()) { $group = $this->listIterator->getCurrent(new RowManager_GroupManager()); $groupArray[] = $group; } //save the public groups to the array $groupCollectionArray[] = new GroupCollection($publicGroupDesc, $campusID, $groupArray); } //END OF IF //KSL //NORMAL /* $campusAssignments = array(); $statusArray = array(); $statusArray[] = CA_STAFF; $statusArray[] = CA_STUDENT; foreach( $statusArray as $key=>$statusID ) { // filter from the cim_hrdb_assignment table $assignmentManager = new RowManager_AssignmentsManager(); $assignmentManager->setPersonID( $this->personID ); $assignmentManager->setAssignmentStatus( $statusID ); $assignmentList = new ListIterator( $assignmentManager ); $assignmentList->setFirst(); while ( $assignmentList->moveNext() ) { $assManager = $assignmentList->getCurrent( new RowManager_AssignmentsManager() ); $campusAssignments[] = $assManager->getCampusID(); } } // echo "<pre>".print_r($campusAssignments, true)."</pre>"; // STEP 2: get the appropriate groups foreach( $campusAssignments as $key=>$campusID ) { $campusManager = new RowManager_CampusManager( $campusID ); $campusGroupManager = new RowManager_CampusGroupManager(); $campusGroupManager->setCampusID( $campusID ); $multiTableManager = new MultiTableManager(); $multiTableManager->addRowManager($campusGroupManager); $groupManager = new RowManager_GroupManager(); $multiTableManager->addRowManager( $groupManager, new JoinPair( $campusGroupManager->getJoinOnGroupID(), $groupManager->getJoinOnGroupID() ) ); $campusGroupArray = array(); $this->listIterator = $multiTableManager->getListIterator(); $this->listIterator->setFirst(); while( $this->listIterator->moveNext() ) { $group = $this->listIterator->getCurrent(new RowManager_GroupManager()); $campusGroupArray[] = $group; } $groupCollectionArray[] = new GroupCollection( $campusManager->getShortDesc(), $campusID, $campusGroupArray ); }*/ return $this->template->set('groupCollectionArray', $groupCollectionArray); }
* group_id [INTEGER] ID of the group * permissionsGroupAdmin_emailNotification [INTEGER] To send the email notification to the user? * permissionsGroupAdmin_admin [INTEGER] Indicate if the user is the admin for the group. */ $PermissionsGroupAdmin = new RowManager_PermissionsGroupAdminManager(); $PermissionsGroupAdmin->dropTable(); $PermissionsGroupAdmin->createTable(); /* * PermissionsSuperAdmin Table * * Contains all the super admins. Super Admin can access everything in the scheduler. * * permissionsSuperAdmin_id [INTEGER] ID of the Super Admin Permissions * viewer_id [INTEGER] ID of the viewer */ $PermissionsSuperAdmin = new RowManager_PermissionsSuperAdminManager(); $PermissionsSuperAdmin->dropTable(); $PermissionsSuperAdmin->createTable(); /*[RAD_DAOBJ_TABLE]*/ } else { echo 'Skipping Tables ... <br>'; } // end if !skipTables // check to see if parameter 'skipLabel' was provided $skipLabel = isset($_REQUEST['skipLabel']); // if not, then add labels to DB ... if (!$skipLabel) { /* * Insert Labels in DB */ // Create Application Upload Series
/** * function loadSideBar * <pre> * Choosses . * </pre> * @return [void] */ function loadSideBar() { $this->sideBar = new obj_AdminSideBar($this->moduleRootPath, $this->viewer); $links = array(); $adminLinks = array(); // $campusLevelLinks = array(); $parameters = array(); // TODO make an object to do this work /* $sql = "select * from cim_hrdb_access where viewer_id = ".$this->viewer->getViewerID()." limit 1"; $db = new Database_Site(); $db->connectToDB( SITE_DB_NAME, SITE_DB_PATH, SITE_DB_USER, SITE_DB_PWORD ); $db->runSQL($sql); // if row retrieved ... $personID = -1; if ($row = $db->retrieveRow() ) { $personID = $row['person_id']; } $parameters['PERSON_ID'] = $personID; // echo print_r($parameters,true); */ // GROUP 1: EVERYONE. // ALL viewers can access this link $requestLink = $this->getCallBack(modulecim_sch::PAGE_SCHEDULERHOME, '', $parameters); $links['[SchedulerHome]'] = $requestLink; $requestLink = $this->getCallBack(modulecim_sch::PAGE_MYSCHEDULE, '', $parameters); $links['[MySchedule]'] = $requestLink; $requestLink = $this->getCallBack(modulecim_sch::PAGE_MANAGEGROUP, '', $parameters); $links['[CreateAGroup]'] = $requestLink; $requestLink = $this->getCallBack(modulecim_sch::PAGE_VIEWGROUPS, '', $parameters); $links['[ViewGroups]'] = $requestLink; /* $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_EDITMYCAMPUSASSIGNMENT, '' , $parameters); $links[ '[editMyCampusInfo]' ] = $requestLink; $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_EDITMYYEARINSCHOOL, '' , $parameters); $links[ '[editMyYearInSchool]' ] = $requestLink; $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_EDITMYEMERGINFO, '' , $parameters); $links[ '[editMyEmergInfo]' ] = $requestLink; */ /* // GROUP 2a: STAFF AND ABOVE ONLY. (access HRDB forms) if (( $this->accessPrivManager->hasSitePriv() ) || ( $this->accessPrivManager->isStaff($this->viewer->getID()) ) ){ $parameters['FORMLIST_TYPE'] = modulecim_hrdb::FORMLIST_ACCESS; $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_HRDBFORMS, '' , $parameters); $links[ '[editMyForms]' ] = $requestLink; } // $parameters['FORMLIST_TYPE'] = modulecim_hrdb::FORMLIST_ACCESS; // $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_HRDBFORMS, '' , $parameters); // $links[ '[editMyForms]' ] = $requestLink; // GROUP 2: CAMPUS ADMINS AND ABOVE ONLY. if ( ( $this->accessPrivManager->hasSitePriv() ) || ( $this->accessPrivManager->hasCampusPriv($this->viewer->getID()) ) ){ //$requestLink = $this->getCallBack( modulecim_hrdb::PAGE_PEOPLE ); //$campusLevelLinks[ '[PeopleList]' ] = $requestLink; // TODO if you have 'hrdb campus' group access rights you can see these $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_PEOPLEBYCAMPUSES ); $campusLevelLinks[ '[PeopleByCampuses]' ] = $requestLink; $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_EDITSTUDENTYEARINSCHOOL ); $campusLevelLinks[ '[CampusStudentsByYear]' ] = $requestLink; $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_VIEWSTUDENTYEARINSCHOOL ); $campusLevelLinks[ '[NationalStudentsByYear]' ] = $requestLink; } */ /* // GROUP 2a: STAFF AND ABOVE ONLY. (approve HRDB forms) if (( $this->accessPrivManager->hasSitePriv() ) || ( $this->accessPrivManager->isStaff($this->viewer->getID()) ) ){ $parameters['FORMLIST_TYPE'] = modulecim_hrdb::FORMLIST_APPROVAL; // modulecim_hrdb::FORMLIST_APPROVAL as well $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_HRDBFORMS, '' , $parameters); $campusLevelLinks[ '[approveForms]' ] = $requestLink; // $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_VIEWSCHEDULECALENDAR, '' , $parameters); // $campusLevelLinks[ '[viewScheduleCalendar]' ] = $requestLink; $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_HRDBACTIVITIES, '' , $parameters); $campusLevelLinks[ '[viewActivitiesByType]' ] = $requestLink; $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_VIEWACTIVITIESBYDATE, '' , $parameters); $campusLevelLinks[ '[viewActivitiesByDate]' ] = $requestLink; $parameters['FORMLIST_TYPE'] = modulecim_hrdb::FORMLIST_SUBMITTED; $requestLink = $this->getCallBack( modulecim_hrdb::PAGE_HRDBFORMS, '' , $parameters); $campusLevelLinks[ '[viewStaffMissingForms]' ] = $requestLink; }*/ // GROUP 3: SUPER ADMINS ONLY. // only display the following links if a viewer is actually a super admin $superAdminManager = new RowManager_PermissionsSuperAdminManager(); if ($superAdminManager->loadByViewerID($this->viewer->getViewerID())) { $requestLink = $this->getCallBack(modulecim_sch::PAGE_MANAGETIMEZONES); $adminLinks['[ManageTimezones]'] = $requestLink; $requestLink = $this->getCallBack(modulecim_sch::PAGE_ADMINGROUPTYPE); $adminLinks['[ManageGroupTypes]'] = $requestLink; $requestLink = $this->getCallBack(modulecim_sch::PAGE_MANAGESUPERADMIN); $adminLinks['[ManageSuperAdmin]'] = $requestLink; } // pass the links to the sidebar object $this->sideBar->setLinks($links); $this->sideBar->setAdminLinks($adminLinks); // $this->sideBar->setCampusLevelLinks( $campusLevelLinks ); }