[ PHPXref.com ] [ Generated: Sun Jul 20 17:52:21 2008 ] [ Focus/SIS 1.0 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> Menu.php (source)

   1  <?
   2  /**
   3  * @file Menu.php 2006-04-17 andrew $
   4  * @package Focus/SIS
   5  * @copyright Copyright (C) 2006 Andrew Schmadeke. All rights reserved.
   6  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
   7  * Focus/SIS is free software. This version may have been modified pursuant
   8  * to the GNU General Public License, and as distributed it includes or
   9  * is derivative of works licensed under the GNU General Public License or
  10  * other free or open source software licenses.
  11  * See COPYRIGHT.txt for copyright notices and details.
  12  */
  13  
  14  if(!$_FOCUS['Menu'])
  15  {
  16      // SCHOOL SETUP -----
  17      $menu['School_Setup']['admin'] = array(
  18                              'School_Setup/Schools.php'=>'School Information',
  19                              'School_Setup/Schools.php?new_school=true'=>'Add a School',
  20                              'School_Setup/CopySchool.php'=>'Copy School',
  21                              'School_Setup/MarkingPeriods.php'=>'Marking Periods',
  22                              'School_Setup/Calendar.php'=>'Calendars',
  23                              'School_Setup/Periods.php'=>'Periods',
  24                              'School_Setup/GradeLevels.php'=>'Grade Levels',
  25                              'School_Setup/Rollover.php'=>'Rollover'
  26                           );
  27      $menu['School_Setup']['parent'] = array(
  28                              'School_Setup/Schools.php'=>'School Information',
  29                              'School_Setup/Calendar.php'=>'Calendar'
  30                          );
  31  
  32      $menu['School_Setup']['teacher'] = array(
  33                              'School_Setup/Schools.php'=>'School Information',
  34                              'School_Setup/Calendar.php'=>'Calendar'
  35                          );
  36  
  37      // STUDENTS -----                         
  38      $menu['Students']['admin'] = array(
  39                              'Students/Student.php'=>'Student Info',
  40                              'Students/Student.php&include=General_Info&student_id=new'=>'Add a Student',
  41                              'Students/AssignOtherInfo.php'=>'Mass Assign Student Info',
  42                              1=>'Reports',
  43                              'misc/Export.php'=>'Advanced Report',
  44                              'Students/AddDrop.php'=>'Add / Drop Report',
  45                              'Students/Letters.php'=>'Print Letters',
  46                              'Students/MailingLabels.php'=>'Print Avery Labels',
  47                              'Students/PrintStudentInfo.php'=>'Print Student Info',
  48                              2=>'Setup',
  49                              'Students/StudentFields.php'=>'Student Fields',
  50                              'Students/EnrollmentCodes.php'=>'Enrollment Codes',
  51                          );
  52      $menu['Students']['teacher'] = array(
  53                              'Students/Student.php'=>'Student Info',
  54                              'Students/Student.php?include=Comments'=>'Teacher Comments',
  55                              'misc/Export.php'=>'Advanced Report'
  56                          );
  57      $menu['Students']['parent'] = array(
  58                              'Students/Student.php'=>'Student Info',
  59                          );
  60      // PEOPLE -----
  61      $menu['Users']['admin'] = array(
  62                              'Users/User.php'=>'General Info',
  63                              'Users/User.php?staff_id=new'=>'Add a User',
  64                              'Users/AddStudents.php'=>'Associate Students with Parents',
  65                              'Users/Preferences.php'=>'Preferences',
  66                              1=>'Setup',
  67                              'Users/Profiles.php'=>'Profiles',
  68                              'Users/Exceptions.php'=>'User Permissions',
  69                              2=>'Teacher Programs',
  70                              'Users/TeacherPrograms.php?include=Grades/InputFinalGrades.php'=>'Input Final Grades',
  71                              'Users/TeacherPrograms.php?include=Attendance/TakeAttendance.php'=>'Take Attendance',
  72                              'Users/TeacherPrograms.php?include=Eligibility/EnterEligibility.php'=>'Enter Eligibility'
  73                          );
  74      $menu['Users']['teacher'] = array(
  75                              'Users/User.php'=>'General Info',
  76                              'Users/Preferences.php'=>'Preferences'
  77                          );
  78      $menu['Users']['parent'] = array(
  79                              'Users/User.php'=>'General Info',
  80                              'Users/Preferences.php'=>'Preferences'
  81                          );
  82                          
  83      // SCHEDULING -----
  84      $menu['Scheduling']['admin'] = array(
  85                              'Scheduling/Schedule.php'=>'Student Schedule',
  86                              'Scheduling/Requests.php'=>'Student Requests',
  87                              'Scheduling/MassSchedule.php'=>'Mass Schedule',
  88                              'Scheduling/MassDrop.php'=>'Mass Drop Course',
  89                              'Scheduling/MassRequests.php'=>'Mass Requests',
  90                              1=>'Reports',
  91                              'Scheduling/ScheduleReport.php'=>'Schedule Report',
  92                              'Scheduling/RequestsReport.php'=>'Requests Report',
  93                              'Scheduling/UnfilledRequests.php'=>'Unfilled Requests',
  94                              'Scheduling/IncompleteSchedules.php'=>'Incomplete Schedules',
  95                              'Scheduling/AddDrop.php'=>'Add / Drop Report',
  96                              'Scheduling/PrintSchedules.php'=>'Print Schedules',
  97                              'Scheduling/PrintRequests.php'=>'Print Requests',
  98                              'Scheduling/PrintClassLists.php'=>'Print Class Lists',
  99                              2=>'Setup',
 100                              'Scheduling/Courses.php'=>'Courses',
 101                              'Scheduling/Scheduler.php'=>'Run Scheduler'
 102                          );
 103  
 104      $menu['Scheduling']['teacher'] = array(
 105                              'Scheduling/Schedule.php'=>'Schedule'
 106                          );
 107                          
 108      $menu['Scheduling']['parent'] = array(
 109                              'Scheduling/Schedule.php'=>'Schedule',
 110                              'Scheduling/Requests.php'=>'Student Requests'
 111                          );
 112      // GRADES -----
 113      $menu['Grades']['admin'] = array(
 114                              'Grades/ReportCards.php'=>'Report Cards',
 115                              'Grades/CalcGPA.php'=>'Calculate GPA',
 116                              'Grades/Transcripts.php'=>'Transcripts',
 117                              1=>'Reports',
 118                              'Grades/TeacherCompletion.php'=>'Teacher Completion',
 119                              'Grades/GradeBreakdown.php'=>'Grade Breakdown',
 120                              'Grades/ReportCards.php?modfunc=gradelist'=>'Student Final Grades',
 121                              'Grades/GPARankList.php'=>'GPA / Class Rank List',
 122                              2=>'Setup',
 123                              'Grades/ReportCardCodes.php'=>'Report Card Codes',
 124                              'Grades/FixGPA.php'=>'Recalculate GPA Numbers'
 125                          );
 126  
 127      $menu['Grades']['teacher'] = array(
 128                              'Grades/InputFinalGrades.php'=>'Input Final Grades',
 129                              'Students/Student.php?include=Comments'=>'Teacher Comments',
 130                              'Grades/ReportCards.php'=>'Report Cards',
 131                              1=>'Gradebook',
 132                              'Grades/Configuration.php'=>'Configuration',
 133                              'Grades/Assignments.php'=>'Assignments',
 134                              'Grades/Grades.php'=>'Grades',
 135                              'Grades/ProgressReports.php'=>'Progress Reports'
 136                          );
 137      $menu['Grades']['parent'] = array(
 138                              'Grades/ReportCards.php'=>'Report Cards',
 139                              'Grades/Transcripts.php'=>'Transcripts',
 140                              'Grades/StudentGrades.php'=>'Gradebook Grades',
 141                              'Grades/ReportCards.php?modfunc=gradelist'=>'Final Grades',
 142                              'Grades/GPARankList.php'=>'GPA / Class Rank'
 143                          );
 144  
 145      // ATTENDANCE -----
 146      $menu['Attendance']['admin'] = array(
 147                              'Attendance/Administration.php'=>'Administration',
 148                              'Attendance/AddAbsences.php'=>'Add Absences',
 149                              1=>'Reports',
 150                              'Attendance/Percent.php'=>'Average Daily Attendance',
 151                              'Attendance/Percent.php?list_by_day=true'=>'Average Attendance by Day',
 152                              'Attendance/DailySummary.php'=>'Attendance Chart',
 153                              'Attendance/StudentSummary.php'=>'Absence Summary',
 154                              'Attendance/TeacherCompletion.php'=>'Teacher Completion',
 155                              2=>'Setup',
 156                              'Attendance/AttendanceCodes.php'=>'Attendance Codes',
 157                              'Attendance/FixDailyAttendance.php'=>'Recalculate Daily Attendance'
 158                           );
 159      $menu['Attendance']['teacher'] = array(
 160                              'Attendance/TakeAttendance.php'=>'Take Attendance',
 161                              'Attendance/DailySummary.php'=>'Attendance Chart',
 162                              'Attendance/StudentSummary.php'=>'Absence Summary',
 163                           );
 164      $menu['Attendance']['parent'] = array(
 165                              'Attendance/StudentSummary.php'=>'Absences',
 166                              'Attendance/DailySummary.php'=>'Daily Summary'
 167                           );
 168                           
 169      // ELIGIBILITY -----
 170      $menu['Eligibility']['admin'] = array(
 171                              'Eligibility/Student.php'=>'Student Screen',
 172                              'Eligibility/AddActivity.php'=>'Add Activity',
 173                              1=>'Reports',
 174                              'Eligibility/StudentList.php'=>'Student List',
 175                              'Eligibility/TeacherCompletion.php'=>'Teacher Completion',
 176                              2=>'Setup',
 177                              'Eligibility/Activities.php'=>'Activities',
 178                              'Eligibility/EntryTimes.php'=>'Entry Times'
 179                          );
 180      $menu['Eligibility']['teacher'] = array(
 181                              'Eligibility/EnterEligibility.php'=>'Enter Eligibility'
 182                           );
 183      $menu['Eligibility']['parent'] = array(
 184                              'Eligibility/Student.php'=>'Student Screen',
 185                              'Eligibility/StudentList.php'=>'Student List'
 186                          );
 187      $menu['Discipline']['admin'] = array(
 188                              'Discipline/NewMakeReferral.php'=>'Make Referral',                 
 189                              'Discipline/NewReferrals.php'=>'Referrals',
 190                              1=>'Reports',
 191                              'Discipline/NewCategoryBreakdown.php'=>'Category Breakdown',
 192                              'Discipline/CategoryBreakdownTime.php'=>'Category Breakdown over Time',
 193                              'Discipline/StudentFieldBreakdown.php'=>'Breakdown by Student Field',
 194                              'Discipline/ReferralLog.php'=>'Referral Log',
 195                              2=>'Setup',
 196                              'Discipline/NewDisciplineForm.php'=>'Referral Form'
 197                          );
 198  
 199      $exceptions = array('School_Setup'=>array('School_Setup/Schools.php?new_school=true'=>true,'School_Setup/Rollover.php'=>true),
 200                          'Students'=>array('Students/Student.php?include=General_Info?student_id=new'=>true,'Students/AssignOtherInfo.php'=>true),
 201                          'Users'=>array('Users/User.php?staff_id=new'=>true,'Users/Exceptions.php'=>true,'Users/TeacherPrograms.php?include=Grades/InputFinalGrades.php'=>true,'Users/TeacherPrograms.php?include=Attendance/TakeAttendance.php'=>true,'Users/TeacherPrograms.php?include=Eligibility/EnterEligibility.php'=>true),
 202                          'Scheduling'=>array('Scheduling/Requests.php'=>true,'Scheduling/MassRequests.php'=>true,'Scheduling/Scheduler.php'=>true),
 203                          'Grades'=>array('Grades/CalcGPA.php'=>true),
 204                          'Attendance'=>array('Attendance/AddAbsences.php'=>true),
 205                          'Eligibility'=>array('Eligibility/AddActivity.php'=>true));
 206  
 207      $profile = User('PROFILE');
 208      if($profile=='student')
 209          $profile = 'parent';
 210  
 211      if(User('PROFILE')=='admin')
 212      {
 213          if(is_numeric(User('PROFILE_ID')))
 214              $can_use_RET = DBGet(DBQuery("SELECT MODNAME FROM PROFILE_EXCEPTIONS WHERE PROFILE_ID='".User('PROFILE_ID')."' AND CAN_USE='N'"),array(),array('MODNAME'));
 215          else
 216              $can_use_RET = DBGet(DBQuery("SELECT MODNAME FROM STAFF_EXCEPTIONS WHERE USERNAME='".User('USERNAME')."' AND CAN_USE='N'"),array(),array('MODNAME'));
 217      }
 218      
 219      foreach($menu as $modcat=>$profiles)
 220      {
 221          if($profiles[$profile])
 222              $_FOCUS['Menu'][$modcat] = $profiles[$profile];
 223          if(User('PROFILE')=='admin')
 224          {
 225              if(count($can_use_RET))
 226              {
 227                  foreach($_FOCUS['Menu'] as $modcat=>$programs)
 228                  {
 229                      foreach($programs as $program=>$title)
 230                      {
 231                          if($can_use_RET[$program] && !($_REQUEST['modname']=='Users/Exceptions.php' && !$can_use_RET['Users/Exceptions.php']) && !($_REQUEST['modname']=='Users/Profiles.php' && !$can_use_RET['Users/Profiles.php']))
 232                              unset($_FOCUS['Menu'][$modcat][$program]);
 233                      }
 234                  }
 235              }
 236              if(count($exceptions[$modcat]))
 237              {
 238                  foreach($exceptions[$modcat] as $program=>$true)
 239                  {
 240                      if(!AllowEdit($program) && $_REQUEST['modname']!='Users/Exceptions.php' && $_REQUEST['modname']!='Users/Profiles.php')
 241                          unset($_FOCUS['Menu'][$modcat][$program]);
 242                  }
 243              }
 244          }
 245      }
 246      
 247      if(User('PROFILE')=='student')
 248          unset($_FOCUS['Menu']['Users']);
 249  }
 250  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]