Exemple #1
0
 public function getRolesForCurrentUser()
 {
     $roles = array();
     $roles[] = 'Everyone';
     if (IWU_Auth::isStudent()) {
         $roles[] = 'All Students';
         if (IWU_Auth::isMale()) {
             $roles[] = 'Male Students';
         }
         if (IWU_Auth::isFemale()) {
             $roles[] = 'Female Students';
         }
         $cohort = IWU_Auth::getCohort();
         if ($cohort === 'Senior') {
             $roles[] = 'Seniors';
         } elseif ($cohort === 'Junior') {
             $roles[] = 'Juniors';
         } elseif ($cohort === 'Sophomore') {
             $roles[] = 'Sophomores';
         } elseif ($cohort === 'First-Year') {
             $roles[] = 'First-Year Students';
         } elseif ($cohort === 'Incoming First-Year') {
             $roles[] = 'First-Year Students';
             // TODO: should this be its own target audience?
         }
     }
     if (IWU_Auth::isStaff() || IWU_Auth::isFaculty()) {
         $roles[] = 'All Faculty/Staff';
         if (IWU_Auth::isExemptStaff()) {
             $roles[] = 'Staff - exempt';
         }
         if (IWU_Auth::isNonExemptStaff()) {
             $roles[] = 'Staff - non-exempt';
         }
         if (IWU_Auth::isFullTimeFaculty()) {
             $roles[] = 'Faculty - full-time';
         }
         if (IWU_Auth::isPartTimeFaculty()) {
             $roles[] = 'Faculty - part-time';
         }
     }
     if (IWU_Auth::isRetired()) {
         $roles[] = 'Retirees';
     }
     if (IWU_Auth::isAffiliate()) {
         $roles[] = 'Affiliates';
     }
     if (IWU_Auth::isOrg()) {
         $roles[] = 'Organizations';
     }
     if (IWU_Auth::isAlum()) {
         $roles[] = 'Alumni';
     }
     echo '<!-- roles:' . "\n";
     var_dump($roles);
     echo '-->';
     return $roles;
 }
<a href="https://php.iwu.edu/accounts/">Account Requests</a> <br /> (Email, OmniUpdate, Blogs, etc.) <br />
<a href="https://print.iwu.edu/DSF/">Digital Storefront</a> <br /> (Prints from your original; supplies) <br />
<a href="https://www.iwu.edu/publications/joborder.html">Printing &amp; Design Order Form</a> <br /> (New &amp; reprints; envelope printing) <br />
<a href="http://answers.iwu.edu/3900/ask">ITS Help Desk</a> <br /> (Computer, Network &amp; Phone) <br />
<a href="https://www.iwu.edu/physical-plant/">Physical Plant</a> <br /> (SchoolDude Work Order Requests) <br />
<a href="https://webviewer.collegenet.com/iwu/">R25 Room Scheduler</a> <br />
<a href="https://php.iwu.edu/classrooms/">Classroom Database</a> <br />
<a href="https://www.myschoolbuilding.com/myschoolbuilding/mytriprequestiframe.asp?acctnum=589502976">Trip Direct</a> <br /> (Vehicle Request)
<?php 
if (IWU_Auth::isFaculty() || IWU_Auth::isStaff()) {
    ?>
<br /><a href="http://luna.iwu.edu:9110/wfpprd">Banner Workflow</a><br />(authorized users only)
<?php 
}