Ejemplo n.º 1
0
        DBQuery("CALL SEAT_FILL()");
        unset($_SESSION['_REQUEST_vars']['schedule']);
        unset($_REQUEST['schedule']);
    }
    if (UserStudentID() && $_REQUEST['modfunc'] != 'choose_course' && $_REQUEST['modfunc'] != 'more_info') {
        echo "<FORM name=modify id=modify action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=modify METHOD=POST>";
        $tmp_REQUEST = $_REQUEST;
        unset($tmp_REQUEST['include_inactive']);
        ##################################################################
        $years_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,NULL AS SEMESTER_ID FROM school_years WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . "'"));
        $semesters_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,NULL AS SEMESTER_ID FROM school_semesters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'));
        $uarters_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,SEMESTER_ID FROM school_quarters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'));
        $mp_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,1 AS TBL FROM school_years WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,2 AS TBL FROM school_semesters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,3 AS TBL FROM school_quarters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY TBL,SORT_ORDER'));
        $mp = CreateSelect($mp_RET, 'marking_period_id', 'Modules.php?modname=' . $_REQUEST['modname'] . '&marking_period_id=', $_REQUEST['marking_period_id']);
        ###################################################################3
        DrawHeaderHome(PrepareDateSchedule($date, '_date', false, array('submit' => true)) . ' <INPUT type=checkbox name=include_inactive value=Y' . ($_REQUEST['include_inactive'] == 'Y' ? " CHECKED onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=\";'" : " onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=Y\";'") . '>Include Inactive Courses : &nbsp;  Marking Period :  ' . $mp . ' &nbsp;', SubmitButton('Save', '', 'class=btn_medium onclick=\'formload_ajax("modify");\''));
        $fy_id = DBGet(DBQuery('SELECT MARKING_PERIOD_ID FROM school_years WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\''));
        $fy_id = $fy_id[1]['MARKING_PERIOD_ID'];
        $sql = 'SELECT          
                              s.COURSE_ID as ACTION,
				s.COURSE_ID,s.COURSE_PERIOD_ID,s.ID AS SCHEDULE_ID,
				s.MARKING_PERIOD_ID,s.START_DATE,s.END_DATE,s.MODIFIED_DATE,s.MODIFIED_BY,
				UNIX_TIMESTAMP(s.START_DATE) AS START_EPOCH,UNIX_TIMESTAMP(s.END_DATE) AS END_EPOCH,sp.PERIOD_ID,
				cpv.PERIOD_ID,cp.MARKING_PERIOD_ID as COURSE_MARKING_PERIOD_ID,cp.MP,sp.SORT_ORDER,
				c.TITLE,cp.COURSE_PERIOD_ID AS PERIOD_PULLDOWN,
				s.STUDENT_ID,r.TITLE AS ROOM,(SELECT GROUP_CONCAT(cpv.DAYS) FROM course_period_var cpv WHERE cpv.COURSE_PERIOD_ID=cp.COURSE_PERIOD_ID) as DAYS,SCHEDULER_LOCK,CONCAT(st.LAST_NAME, \'' . ' ' . '\' ,st.FIRST_NAME) AS MODIFIED_NAME
			FROM courses c,course_periods cp,course_period_var cpv,school_periods sp,rooms r,schedule s
                        LEFT JOIN staff st ON s.MODIFIED_BY = st.STAFF_ID
			WHERE
			 s.COURSE_ID = c.COURSE_ID AND s.COURSE_ID = cp.COURSE_ID
				AND s.COURSE_PERIOD_ID = cp.COURSE_PERIOD_ID
Ejemplo n.º 2
0
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
#DrawHeader('Gradebook - '.ProgramTitle());
include '../../Redirect_modules.php';
$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['include_inactive']);
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
DrawHeaderHome('<INPUT type=checkbox name=include_inactive value=Y' . ($_REQUEST['include_inactive'] == 'Y' ? " CHECKED onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=\";'" : " onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=Y\";'") . '>Include Inactive Students');
echo '</FORM>';
$course_period_id = UserCoursePeriod();
$course_id = DBGet(DBQuery("SELECT COURSE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='{$course_period_id}'"));
$course_id = $course_id[1]['COURSE_ID'];
$max_allowed = Preferences('ANOMALOUS_MAX', 'Gradebook') / 100;
$extra['SELECT'] = ",ga.ASSIGNMENT_ID,gt.TITLE AS TYPE_TITLE,ga.TITLE,ga.POINTS AS TOTAL_POINTS,'' AS LETTER_GRADE";
$extra['SELECT'] .= ',(SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID) AS POINTS';
$extra['SELECT'] .= ',(SELECT COMMENT FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID) AS COMMENT';
$extra['FROM'] = ",GRADEBOOK_ASSIGNMENTS ga,GRADEBOOK_ASSIGNMENT_TYPES gt";
$extra['WHERE'] = 'AND ((SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID) IS NULL AND (ga.ASSIGNED_DATE IS NULL OR CURRENT_DATE>=ga.ASSIGNED_DATE) AND (ga.DUE_DATE IS NULL OR CURRENT_DATE>=ga.DUE_DATE) OR (SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID)<0 OR (SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID)>ga.POINTS*' . $max_allowed . ') AND ((ga.COURSE_ID=\'' . $course_id . '\' AND ga.STAFF_ID=\'' . User('STAFF_ID') . '\') OR ga.COURSE_PERIOD_ID=\'' . $course_period_id . '\') AND ga.MARKING_PERIOD_ID=\'' . UserMP() . '\' AND gt.ASSIGNMENT_TYPE_ID=ga.ASSIGNMENT_TYPE_ID';
$extra['functions'] = array('POINTS' => '_makePoints');
$students_RET = GetStuList($extra);
//echo '<pre>'; var_dump($students_RET); echo '</pre>';
if (AllowUse('Grades/Grades.php')) {
    $link = array('FULL_NAME' => array('link' => "Modules.php?modname=Grades/Grades.php&include_ianctive={$_REQUEST['include_inactive']}&assignment_id=all", 'variables' => array('student_id' => 'STUDENT_ID')), 'TITLE' => array('link' => "Modules.php?modname=Grades/Grades.php&include_inactive={$_REQUEST['include_inactive']}", 'variables' => array('assignment_id' => 'ASSIGNMENT_ID', 'student_id' => 'STUDENT_ID')));
Ejemplo n.º 3
0
 } else {
     $start_time = $_REQUEST['start_date'];
     $start_date = strtoupper(date('d-M-y', $start_time));
     $end_date = strtoupper(date('d-M-y', $start_time + 60 * 60 * 24 * 7));
 }
 $sql = 'SELECT min(unix_timestamp(SCHOOL_DATE)) as SCHOOL_DATE FROM attendance_calendar WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\'';
 $begin_year = DBGet(DBQuery($sql));
 $begin_year = $begin_year[1]['SCHOOL_DATE'];
 $date_select = "<OPTION value={$start}>" . date('M d, Y', $start) . ' - ' . date('M d, Y', $end) . '</OPTION>';
 if ($begin_year != "" || !begin_year) {
     for ($i = $start - 60 * 60 * 24 * 7; $i >= $begin_year; $i -= 60 * 60 * 24 * 7) {
         $date_select .= "<OPTION value={$i}" . ($i + 86400 >= $start_time && $i - 86400 <= $start_time ? ' SELECTED' : '') . ">" . date('M d, Y', $i) . ' - ' . date('M d, Y', $i + 1 + ($END_DAY - $START_DAY) * 60 * 60 * 24) . '</OPTION>';
     }
 }
 echo "<FORM name=elig_stud id=elig_stud action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . " method=POST>";
 DrawHeaderHome('<SELECT name=start_date>' . $date_select . '</SELECT>', '<INPUT type=submit value=Go class=btn_medium onclick=\'formload_ajax("elig_stud");\' >');
 echo '</FORM>';
 echo '<TABLE border=0 width=100%><TR><TD width=50% valign=top>';
 $qr = 'SELECT em.STUDENT_ID,em.ACTIVITY_ID,ea.TITLE,ea.START_DATE,ea.END_DATE FROM eligibility_activities ea,student_eligibility_activities em WHERE em.SYEAR=\'' . UserSyear() . '\'';
 if ($_REQUEST['start_date']) {
     $st_date = date('Y-m-d', $_REQUEST['start_date']);
     $qr .= ' AND \'' . $st_date . '\' BETWEEN ea.start_date AND ea.end_date';
 } else {
     $st_date = date('Y-m-d');
     $qr .= ' AND \'' . $st_date . '\' BETWEEN ea.start_date AND ea.end_date';
 }
 $qr .= ' AND em.SYEAR=ea.SYEAR AND em.ACTIVITY_ID=ea.ID ORDER BY ea.START_DATE';
 $RET = DBGet(DBQuery($qr), array('START_DATE' => 'ProperDate', 'END_DATE' => 'ProperDate'));
 $activities_RET = DBGet(DBQuery('SELECT ID,TITLE FROM eligibility_activities WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\''));
 if (count($activities_RET)) {
     foreach ($activities_RET as $value) {
Ejemplo n.º 4
0
 if ($current_time >= $grade_start_time && $current_time <= $grade_end_time) {
     $grade_status = 'open';
 } else {
     if ($current_time >= $grade_end_time && $grade_end_time != '') {
         $grade_status = 'closed';
     } else {
         if ($current_time <= $grade_start_time) {
             $grade_status = 'not open yet';
         } else {
             $grade_status = 'not set yet';
         }
     }
 }
 DrawHeaderHome('', '<INPUT type=checkbox name=include_inactive value=Y' . ($_REQUEST['include_inactive'] == 'Y' ? " CHECKED onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=\";'" : " onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=Y\";'") . '>Include Inactive Students', '');
 if (count($stu_RET) != 0) {
     DrawHeaderHome($mps_select, SubmitButton('Save', 'submit[save]', 'class=btn_medium'), '');
 }
 if (AllowEdit()) {
     DrawHeader(($current_completed ? '<FONT COLOR=green>These grades are complete</FONT>' : '<FONT COLOR=green>Grade reporting is open for this marking period</FONT>') . (AllowEdit() ? ' | <FONT COLOR=green>You can edit these grades</FONT>' : ' | <FONT COLOR=red>Grade reporting begins on : ' . date("M d, Y ", strtotime($grade_start_date[1]['POST_START_DATE'])) . '</FONT>'));
 } else {
     if ($grade_status == 'not open yet') {
         DrawHeader(($current_completed ? '<FONT COLOR=green>These grades are complete</FONT>' : '<FONT COLOR=red>Grade reporting is not open for this marking period</FONT>') . (AllowEdit() ? ' | <FONT COLOR=green>You can edit these grades</FONT>' : ' | <FONT COLOR=red>Grade reporting starts on: ' . date("M d, Y ", strtotime($grade_start_date[1]['POST_START_DATE'])) . ' and ends on : ' . date("M d, Y ", strtotime($grade_end_date[1]['POST_END_DATE'])) . '</FONT>'));
     } else {
         if ($grade_status == 'closed') {
             DrawHeader(($current_completed ? '<FONT COLOR=green>These grades are complete</FONT>' : '<FONT COLOR=red>These grades are complete</FONT>') . (AllowEdit() ? ' | <FONT COLOR=green>You can edit these grades</FONT>' : ' | <FONT COLOR=red>Grade reporting ended for this marking period on : ' . date("M d, Y ", strtotime($grade_end_date[1]['POST_END_DATE'])) . '</FONT>'));
         } else {
             if ($grade_status == 'not set yet') {
                 DrawHeader('<FONT COLOR=red>Grade reporting date has not set for this marking period</FONT>');
             }
         }
     }
Ejemplo n.º 5
0
        echo '</SELECT>';
        echo '</TD></TR>';
        echo '</TABLE>';
        PopTable('footer');
    }
    if ($note) {
        DrawHeader('<IMG SRC=assets/check.gif>' . $note);
    }
    if ($check_seats <= 0 && $no_seat) {
        DrawHeaderHome('<IMG SRC=assets/warning_button.gif>' . $no_seat);
    }
    if ($clash) {
        DrawHeaderHome('<IMG SRC=assets/warning_button.gif>' . $clash . " is already in the schedule");
    }
    if ($request_exists) {
        DrawHeaderHome('<IMG SRC=assets/warning_button.gif>' . $request_clash . ' already have unscheduled requests');
    }
}
if (!$_REQUEST['modfunc']) {
    if ($_REQUEST['search_modfunc'] != 'list') {
        unset($_SESSION['MassSchedule.php']);
    }
    $extra['link'] = array('FULL_NAME' => false);
    $extra['SELECT'] = ",CAST(NULL AS CHAR(1)) AS CHECKBOX";
    $extra['functions'] = array('CHECKBOX' => '_makeChooseCheckbox');
    $extra['columns_before'] = array('CHECKBOX' => '</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'student\');"><A>');
    $extra['new'] = true;
    Widgets('course');
    Widgets('request');
    Widgets('activity');
    Search('student_id', $extra);
Ejemplo n.º 6
0
        $header .= '<TD>' . TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['id'] . '][SORT_ORDER]', 'Sort Order', 'onkeydown=\\"return numberOnly(event);\\"') . '</TD>';
    }
    $header .= '</TR><TR>';
    $colspan = 2;
    if ($RET['TYPE'] == 'autos' || $RET['TYPE'] == 'edits' || $RET['TYPE'] == 'select' || $RET['TYPE'] == 'codeds' || $RET['TYPE'] == 'multiple' || $_REQUEST['id'] == 'new') {
        $header .= '<TD colspan=2>' . TextAreaInput($RET['SELECT_OPTIONS'], 'tables[' . $_REQUEST['id'] . '][SELECT_OPTIONS]', 'Pull-Down/Auto Pull-Down/Coded Pull-Down/Select Multiple Choices<BR>* one per line', 'rows=7 cols=40') . '</TD>';
        $colspan = 1;
    }
    $header .= '<TD valign=bottom colspan=' . $colspan . '>' . TextInput_mod_a($RET['DEFAULT_SELECTION'], 'tables[' . $_REQUEST['id'] . '][DEFAULT_SELECTION]', 'Default') . '<small><BR>* for dates: YYYY-MM-DD,<BR> for checkboxes: Y<BR> for long text it will be ignored</small></TD>';
    $new = $_REQUEST['id'] == 'new';
    $header .= '<TD>' . CheckboxInput($RET['REQUIRED'], 'tables[' . $_REQUEST['id'] . '][REQUIRED]', 'Required', '', $new) . '</TD>';
    $header .= '</TR>';
    $header .= '</TABLE>';
}
if ($header) {
    DrawHeaderHome($header);
    echo '</FORM>';
}
if (!$_REQUEST['modfunc']) {
    $count = 0;
    $count++;
    $LO_options = array('save' => false, 'search' => false, 'add' => true);
    echo '<TABLE><TR>';
    echo '<TD valign=top>';
    $columns = array('TITLE' => 'School Fields', 'TYPE' => 'Field Type');
    $link = array();
    $arr = array('School Name', 'Address', 'City', 'State', 'Zip/Postal Code', 'Principal', 'Base Grading Scale', 'E-Mail', 'CEEB', 'Website', 'School Logo');
    $RET = DBGet(DBQuery("SELECT * FROM school_custom_fields WHERE SCHOOL_ID=" . UserSchool() . " ORDER BY SORT_ORDER"));
    foreach ($arr as $key => $value) {
        $fields_RET1[$count] = array('ID' => '', 'TITLE' => $value, 'TYPE' => '<span style="color:#ea8828;">Default</span>');
        $count++;
Ejemplo n.º 7
0
        echo '</TABLE>';
        /********************for Back to user***************************/
        echo '<input type=hidden name=sql_save_session_staf value=true />';
        /************************************************/
        echo '</FORM>';
        // set focus to last name text box
        echo '<script type="text/javascript"><!--
			document.search.last.focus();
			--></script>';
        PopTable('footer');
    } else {
        if (!$_REQUEST['next_modname']) {
            $_REQUEST['next_modname'] = 'Users/User.php';
        }
        if (!isset($_openSIS['DrawHeader'])) {
            DrawHeaderHome('Please select a user');
        }
        $staff_RET = GetStaffList($extra);
        if ($extra['profile']) {
            $options = array('admin' => 'Administrator', 'teacher' => 'Teacher', 'parent' => 'Parent', 'none' => 'No Access');
            $singular = $options[$extra['profile']];
            $plural = $singular . ($options[$extra['profile']] == 'none' ? 'es' : 's');
            $columns = array('FULL_NAME' => $singular, 'STAFF_ID' => 'Staff ID');
        } else {
            $singular = 'User';
            $plural = 'Users';
            $columns = array('FULL_NAME' => 'Staff Member', 'PROFILE' => 'Profile', 'STAFF_ID' => 'Staff ID');
        }
        if (is_array($extra['columns_before'])) {
            $columns = $extra['columns_before'] + $columns;
        }
Ejemplo n.º 8
0
        echo '</TABLE>';
        /********************for Back to user***************************/
        echo '<input type=hidden name=sql_save_session_staf value=true />';
        /************************************************/
        echo '</FORM>';
        // set focus to last name text box
        echo '<script type="text/javascript"><!--
			document.search.last.focus();
			--></script>';
        PopTable('footer');
    } else {
        if (!$_REQUEST['next_modname']) {
            $_REQUEST['next_modname'] = 'users/User.php';
        }
        if (!isset($_openSIS['DrawHeader'])) {
            DrawHeaderHome('Please select a parent');
        }
        if ($_REQUEST['profile'] != 'none') {
            $staff_RET = GetStaffList($extra);
            $_SESSION['count_stf'] = count($staff_RET);
            if ($extra['profile']) {
                $options = array('admin' => 'Administrator', 'teacher' => 'Teacher', 'parent' => 'Parent', 'none' => 'No Access');
                $singular = $options[$extra['profile']];
                $plural = $singular . ($options[$extra['profile']] == 'none' ? 'es' : 's');
                $columns = array('FULL_NAME' => $singular, 'STAFF_ID' => 'Staff ID');
            } else {
                $singular = 'Parent';
                $plural = 'Parents';
                if ($_REQUEST['_dis_user']) {
                    $columns = array('FULL_NAME' => 'Parent', 'USERNAME' => 'Username', 'PROFILE' => 'Profile', 'STAFF_ID' => 'User ID', 'Status' => 'Status');
                } else {
Ejemplo n.º 9
0
     $header .= '<TR><td class=lable>Begins</td><TD>' . DateInputAY($RET['START_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][START_DATE]', 1) . '</TD></tr>';
     $header .= '<TR><td class=lable>Ends</td><TD>' . DateInputAY($RET['END_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][END_DATE]', 2) . '</TD></tr>';
     $header .= '<TR><td class=lable colspan=2><div id=grade_div style="' . ($RET['DOES_GRADES'] == 'Y' ? "display:block" : "display:none") . '"><table>';
     $header .= '<tr><td class=lable>Grade Posting Begins</td><td>' . DateInputAY($RET['POST_START_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][POST_START_DATE]', 3) . '</td></tr>';
     $header .= '<tr><td class=lable>Grade Posting Ends</td><td>' . DateInputAY($RET['POST_END_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][POST_END_DATE]', 4) . '</td></tr>';
     $header .= '</table></div></td></TR>';
     $str_srch = '<TR><td class=lable>Comments</td><TD>' . CheckboxInput($RET['DOES_COMMENTS'], 'tables[' . $_REQUEST['marking_period_id'] . '][DOES_COMMENTS]', '', $checked, $_REQUEST['marking_period_id'] == 'new', '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD></tr>';
     $header .= '</TABLE>';
     DrawHeader($header);
     PopTable('footer');
     if (clean_param($_REQUEST['marking_period_id'], PARAM_ALPHANUM) == 'new') {
         DrawHeaderHome('', '', AllowEdit() ? '<INPUT type=submit value=Save class="btn_medium" onclick="formcheck_school_setup_marking();">' : '');
     } elseif ($_REQUEST['mp_term'] != 'FY') {
         DrawHeaderHome('', '', AllowEdit() ? $delete_button . '&nbsp;&nbsp;<INPUT type=submit name=btn_save id=btn_save value=Save class="btn_medium">' : '');
     } else {
         DrawHeaderHome('', '', AllowEdit() ? '<INPUT type=submit name=btn_save id=btn_save value=Save class="btn_medium" >' : '');
     }
     echo '</FORM>';
     unset($_SESSION['_REQUEST_vars']['marking_period_id']);
     unset($_SESSION['_REQUEST_vars']['mp_term']);
 }
 // DISPLAY THE MENU
 $LO_options = array('save' => false, 'search' => false);
 echo '<TABLE cellpadding=3 width=100%><tr><td align="center"><br>';
 echo '<TABLE><TR>';
 // FY
 $sql = 'SELECT MARKING_PERIOD_ID,TITLE FROM school_years WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY SORT_ORDER';
 $QI = DBQuery($sql);
 $fy_RET = DBGet($QI);
 if (count($fy_RET)) {
     if ($_REQUEST['mp_term']) {
Ejemplo n.º 10
0
    $_REQUEST['day_date'] = date('d');
    $_REQUEST['month_date'] = strtoupper(date('m'));
    $_REQUEST['year_date'] = date('Y');
    //	$date = $_REQUEST['day_date'].'-'.$_REQUEST['month_date'].'-'.$_REQUEST['year_date'];
    $date = $_REQUEST['year_date'] . '-' . $_REQUEST['month_date'] . '-' . $_REQUEST['day_date'];
}
DrawBC("Attendance > " . ProgramTitle());
$QI = DBQuery('SELECT sp.PERIOD_ID,sp.TITLE FROM school_periods sp WHERE sp.SCHOOL_ID=\'' . UserSchool() . '\' AND sp.SYEAR=\'' . UserSyear() . '\' AND EXISTS (SELECT \'\' FROM course_periods cp,course_period_var cpv WHERE cp.SYEAR=sp.SYEAR AND cpv.PERIOD_ID=sp.PERIOD_ID AND cpv.DOES_ATTENDANCE=\'Y\') ORDER BY sp.SORT_ORDER');
$periods_RET = DBGet($QI, array(), array('PERIOD_ID'));
$period_select = "<SELECT name=period><OPTION value=''>All</OPTION>";
foreach ($periods_RET as $id => $period) {
    $period_select .= "<OPTION value={$id}" . ($_REQUEST['period'] == $id ? ' SELECTED' : '') . ">" . $period[1]['TITLE'] . "</OPTION>";
}
$period_select .= "</SELECT>";
echo "<FORM action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . " method=POST>";
DrawHeaderHome('<table><tr><td>' . PrepareDateSchedule($date, 'date', false, array('submit' => true)) . '</td><td> - </td><td>' . $period_select . '</td><td> : <INPUT type=submit class=btn_medium value=Go></td></tr></table>');
echo '</FORM>';
$day = date('D', strtotime($date));
switch ($day) {
    case 'Sun':
        $day = 'U';
        break;
    case 'Thu':
        $day = 'H';
        break;
    default:
        $day = substr($day, 0, 1);
        break;
}
$p = optional_param('period', '', PARAM_SPCL);
$current_mp = GetCurrentMP('QTR', $date);
Ejemplo n.º 11
0
     }
     echo "<FORM name=F4 id=F4 action=Modules.php?modname={$_REQUEST['modname']}&subject_id={$_REQUEST['subject_id']} method=POST>";
     DrawHeaderHome($title, $delete_button . SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_Timetable_course_F4();"'));
     $header .= '<TABLE cellpadding=3 width=100%>';
     $header .= '<TR>';
     $header .= '<TD>' . TextInput($RET['TITLE'], 'tables[course_subjects][' . $_REQUEST['subject_id'] . '][TITLE]', 'Title', 'class=cell_wide') . '</TD>';
     $header .= '</TR>';
     $header .= '</TABLE>';
     DrawHeader($header);
     echo '</FORM>';
 }
 // DISPLAY THE MENU
 $LO_options = array('save' => false, 'search' => false);
 if (!$_REQUEST['subject_id']) {
     #DrawHeader('Courses');
     DrawHeaderHome('Course', "<A HREF=Modules.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&course_modfunc=search>Search</A>");
 }
 echo '<TABLE><TR>';
 if (count($subjects_RET)) {
     if (clean_param($_REQUEST['subject_id'], PARAM_ALPHANUM)) {
         foreach ($subjects_RET as $key => $value) {
             if ($value['SUBJECT_ID'] == $_REQUEST['subject_id']) {
                 $subjects_RET[$key]['row_color'] = Preferences('HIGHLIGHT');
             }
         }
     }
 }
 echo '<TD valign=top>';
 $columns = array('TITLE' => 'Subject');
 $link = array();
 $link['TITLE']['link'] = "Modules.php?modname={$_REQUEST['modname']}";
Ejemplo n.º 12
0
         $colspan = 1;
     }
     $header .= '<TD valign=bottom colspan=' . $colspan . '>' . TextInput($RET['DEFAULT_SELECTION'], 'tables[' . $_REQUEST['id'] . '][DEFAULT_SELECTION]', 'Default') . '<small><BR>* for dates: YYYY-MM-DD,<BR> for checkboxes: Y</small></TD>';
     if ($_REQUEST['id'] == 'new') {
         $new = true;
     }
     $header .= '<TD>' . CheckboxInput($RET['REQUIRED'], 'tables[' . $_REQUEST['id'] . '][REQUIRED]', 'Required', '', $new) . '</TD>';
     $header .= '</TR>';
     $header .= '</TABLE>';
 } elseif ($_REQUEST['category_id']) {
     echo "<FORM name=F2 id=F2 action=Modules.php?modname={$_REQUEST['modname']}&table=ADDRESS_FIELD_CATEGORIES";
     if ($_REQUEST['category_id'] != 'new') {
         echo "&category_id={$_REQUEST['category_id']}";
     }
     echo " method=POST>";
     DrawHeaderHome($title, $delete_button . SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_student_addressField_F2();"'));
     //'<INPUT type=submit value=Save>');
     #PopTable_wo_header('header');
     $header .= '<TABLE cellpadding=3 width=100%>';
     $header .= '<TR>';
     $header .= '<TD>' . TextInput($RET['TITLE'], 'tables[' . $_REQUEST['category_id'] . '][TITLE]', 'Title') . '</TD>';
     $header .= '<TD>' . TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['category_id'] . '][SORT_ORDER]', 'Sort Order') . '</TD>';
     if ($_REQUEST['category_id'] == 'new') {
         $new = true;
     }
     $header .= '<TD><TABLE><TR>';
     $header .= '<TD>' . CheckboxInput($RET['RESIDENCE'], 'tables[' . $_REQUEST['category_id'] . '][RESIDENCE]', 'Residence', '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD>';
     $header .= '<TD>' . CheckboxInput($RET['MAILING'], 'tables[' . $_REQUEST['category_id'] . '][MAILING]', 'Mailing', '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD>';
     $header .= '<TD>' . CheckboxInput($RET['BUS'], 'tables[' . $_REQUEST['category_id'] . '][BUS]', 'Bus', '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD>';
     $header .= '</TR><TR>';
     $header .= '<TD colspan=3><small><FONT color=' . Preferences('TITLES') . '>Note: All unchecked means applies to all addresses</FONT></small></TD>';
Ejemplo n.º 13
0
                             $schedule_RET[$i][date('y-m-d', $j)] = '<div align=center title="Schedule not available">--</div>';
                         }
                     } else {
                         $schedule_RET[$i][date('y-m-d', $j)] = count($day_RET) > 1 ? '<font title="Conflict schedule (' . count($day_RET) . ')" color="red">' . $day_RET[1]['TITLE'] . '<br />Room :' . $day_RET[1]['ROOM'] . '</font>' : '<spna title=' . date("l", $j) . '>' . $day_RET[1]['TITLE'] . '<br />Room :' . $day_RET[1]['ROOM'] . '</span>';
                     }
                 }
             }
         }
     }
     for ($i = $today; $i <= $today + $one_day * 6; $i = $i + $one_day) {
         $columns[date('y-m-d', $i)] = weekDate(date('Y-m-d', $i)) . ' ' . ShortDate(date('Y-m-d', $i));
     }
     break;
 case 'month_view':
     $month_str = _makeMonths('Modules.php?modname=' . $_REQUEST['modname'] . '&marking_period_id=' . $_REQUEST['marking_period_id'] . '&view_mode=' . $_REQUEST['view_mode'] . '&month=');
     DrawHeaderHome('<table cellpadding="2" cellspacing="2" width="100%"><tr><td style="padding-right:20px;">Marking Period :  ' . $mp . '</td><td>' . $month_str . '</td><td align="right">Calendar View : ' . $view_mode . '</td></tr></table>');
     $fy_id = DBGet(DBQuery('SELECT MARKING_PERIOD_ID FROM school_years WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\''));
     $fy_id = $fy_id[1]['MARKING_PERIOD_ID'];
     $month = date('m', $_REQUEST['month']);
     $year = date('Y', $_REQUEST['month']);
     //                  ++++++++++++++++++++++++++++++++++++++++++++++++++++++
     $time = mktime(0, 0, 0, $month, 1, $year);
     $last = 31;
     while (!checkdate($month, $last, $year)) {
         $last--;
     }
     $calendar_RET = DBGet(DBQuery('SELECT SCHOOL_DATE,MINUTES,BLOCK FROM attendance_calendar WHERE SCHOOL_DATE BETWEEN \'' . date('Y-m-d', $time) . '\' AND \'' . date('Y-m-d', mktime(0, 0, 0, $month, $last, $year)) . '\' AND SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\''), array(), array('SCHOOL_DATE'));
     $skip = date("N", $time) - 1;
     echo "<CENTER><TABLE border=0 cellpadding=0 cellspacing=0 class=pixel_border><TR><TD>";
     echo "<TABLE border=0 cellpadding=3 cellspacing=1><TR class=calendar_header align=center>";
     echo "<TD class=white>Monday</TD><TD class=white>Tuesday</TD><TD class=white>Wednesday</TD><TD class=white>Thursday</TD><TD class=white>Friday</TD><TD class=white>Saturday</TD><TD width=99 class=white>Sunday</TD>";
Ejemplo n.º 14
0
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
echo "<FORM name=add id=add action=" . PreparePHP_SELF() . " method=POST>";
DrawBC("Students > " . ProgramTitle());
if ($_REQUEST['day_start'] && $_REQUEST['month_start'] && $_REQUEST['year_start']) {
    while (!VerifyDate($start_date = $_REQUEST['day_start'] . '-' . $_REQUEST['month_start'] . '-' . $_REQUEST['year_start'])) {
        $_REQUEST['day_start']--;
    }
} else {
    $start_date = '01-' . strtoupper(date('M-y'));
}
if ($_REQUEST['day_end'] && $_REQUEST['month_end'] && $_REQUEST['year_end']) {
    while (!VerifyDate($end_date = $_REQUEST['day_end'] . '-' . $_REQUEST['month_end'] . '-' . $_REQUEST['year_end'])) {
        $_REQUEST['day_end']--;
    }
} else {
    $end_date = DBDate();
}
DrawHeaderHome(PrepareDateSchedule($start_date, '_start') . ' - ' . PrepareDateSchedule($end_date, '_end'), '<INPUT type=submit class=btn_medium value=Go >');
echo '</FORM>';
$enrollment_RET = DBGet(DBQuery("SELECT se.START_DATE AS START_DATE,NULL AS END_DATE,se.START_DATE AS DATE,se.SCHOOL_ID,se.STUDENT_ID,CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) AS FULL_NAME FROM STUDENT_ENROLLMENT se,STUDENTS s WHERE s.STUDENT_ID=se.STUDENT_ID AND se.START_DATE BETWEEN '{$start_date}' AND '{$end_date}' \r\n\t\t\t\t\t\t\t\tUNION SELECT NULL AS START_DATE,se.END_DATE AS END_DATE,se.END_DATE AS DATE,se.SCHOOL_ID,se.STUDENT_ID,CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) AS FULL_NAME FROM STUDENT_ENROLLMENT se,STUDENTS s WHERE s.STUDENT_ID=se.STUDENT_ID AND se.END_DATE BETWEEN '{$start_date}' AND '{$end_date}'\r\n\t\t\t\t\t\t\t\tORDER BY DATE DESC"), array('START_DATE' => 'ProperDate', 'END_DATE' => 'ProperDate', 'SCHOOL_ID' => 'GetSchool'));
$columns = array('FULL_NAME' => 'Student', 'STUDENT_ID' => 'Student ID', 'SCHOOL_ID' => 'School', 'START_DATE' => 'Enrolled', 'END_DATE' => 'Dropped');
ListOutput($enrollment_RET, $columns, 'Enrollment Record', 'Enrollment Records');
Ejemplo n.º 15
0
    $_REQUEST['day_date'] = date('d');
    $_REQUEST['month_date'] = strtoupper(date('M'));
    $_REQUEST['year_date'] = date('y');
    $date = $_REQUEST['day_date'] . '-' . $_REQUEST['month_date'] . '-' . $_REQUEST['year_date'];
}
DrawBC("Attendance > " . ProgramTitle());
//$QI = DBQuery("SELECT PERIOD_ID,TITLE FROM SCHOOL_PERIODS WHERE SCHOOL_ID='".UserSchool()."' AND SYEAR='".UserSyear()."' ORDER BY SORT_ORDER ");
$QI = DBQuery("SELECT sp.PERIOD_ID,sp.TITLE FROM SCHOOL_PERIODS sp WHERE sp.SCHOOL_ID='" . UserSchool() . "' AND sp.SYEAR='" . UserSyear() . "' AND EXISTS (SELECT '' FROM COURSE_PERIODS WHERE SYEAR=sp.SYEAR AND PERIOD_ID=sp.PERIOD_ID AND DOES_ATTENDANCE='Y') ORDER BY sp.SORT_ORDER");
$periods_RET = DBGet($QI, array(), array('PERIOD_ID'));
$period_select = "<SELECT name=period><OPTION value=''>All</OPTION>";
foreach ($periods_RET as $id => $period) {
    $period_select .= "<OPTION value={$id}" . ($_REQUEST['period'] == $id ? ' SELECTED' : '') . ">" . $period[1]['TITLE'] . "</OPTION>";
}
$period_select .= "</SELECT>";
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
DrawHeaderHome(PrepareDateSchedule($date, '_date', false, array('submit' => true)) . ' - ' . $period_select . ' : <INPUT type=submit class=btn_medium value=Go>');
echo '</FORM>';
$day = date('D', strtotime($date));
switch ($day) {
    case 'Sun':
        $day = 'U';
        break;
    case 'Thu':
        $day = 'H';
        break;
    default:
        $day = substr($day, 0, 1);
        break;
}
$sql = "SELECT CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) AS FULL_NAME,sp.TITLE,cp.PERIOD_ID,s.STAFF_ID\n\t\tFROM STAFF s,COURSE_PERIODS cp,SCHOOL_PERIODS sp\n\t\tWHERE\n\t\t\tsp.PERIOD_ID = cp.PERIOD_ID\n\t\t\tAND cp.TEACHER_ID=s.STAFF_ID AND cp.MARKING_PERIOD_ID IN (" . GetAllMP('QTR', GetCurrentMP('QTR', $date)) . ")\n\t\t\tAND cp.SYEAR='" . UserSyear() . "' AND cp.SCHOOL_ID='" . UserSchool() . "' AND s.PROFILE='teacher'\n\t\t\tAND cp.DOES_ATTENDANCE='Y' AND instr(cp.DAYS,'{$day}')>0" . ($_REQUEST['period'] ? " AND cp.PERIOD_ID='{$_REQUEST['period']}'" : '') . "\n\t\t\tAND NOT EXISTS (SELECT '' FROM ATTENDANCE_COMPLETED ac WHERE ac.STAFF_ID=cp.TEACHER_ID AND ac.SCHOOL_DATE='" . date('Y-m-d', strtotime($date)) . "' AND ac.PERIOD_ID=sp.PERIOD_ID)\n\t\t";
$RET = DBGet(DBQuery($sql), array(), array('STAFF_ID', 'PERIOD_ID'));
Ejemplo n.º 16
0
    echo '</FORM>';
    PopTable('footer');
}
if (!$_REQUEST['modfunc']) {
    if (!isset($extra)) {
        $extra = array();
    }
    Widgets('user');
    if ($_REQUEST['advanced'] == 'Y') {
        Widgets('all');
    }
    $extra['WHERE'] .= appendSQL('');
    $extra['WHERE'] .= CustomFields('where');
    echo "<FORM  name=ada_from id=ada_from onSubmit='return formcheck_ada_dates();' action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&list_by_day=" . strip_tags(trim($_REQUEST[list_by_day])) . " method=POST>";
    $advanced_link = " <A HREF=Modules.php?modname={$_REQUEST['modname']}&modfunc=search&list_by_day={$_REQUEST['list_by_day']}&day_start={$_REQUEST['day_start']}&day_end={$_REQUEST['day_end']}&month_start={$_REQUEST['month_start']}&month_end={$_REQUEST['month_end']}&year_start={$_REQUEST['year_start']}&year_end={$_REQUEST['year_end']}>Advanced</A>";
    DrawHeaderHome('<table><tr><td>' . DateInputAY($start_date, 'start', 1) . '</td><td>&nbsp;&nbsp;-&nbsp;&nbsp;</td><td>' . DateInputAY($end_date, 'end', 2) . '</td><td> - </td><td>' . $advanced_link, ' : <INPUT type=submit value=Go  class=btn_medium></td></tr></table>');
    echo '</FORM>';
    if ($_REQUEST['list_by_day'] == 'true') {
        $cal_days = 1;
        $search_stu = 0;
        if ($_REQUEST['last'] != '' || $_REQUEST['first'] != '' || $_REQUEST['stuid'] != '' || $_REQUEST['altid'] != '') {
            $stu_q = 'SELECT GROUP_CONCAT(STUDENT_ID) as STUDENT_ID FROM students WHERE ';
            $stu_q .= $_REQUEST['last'] != '' ? ' LAST_NAME=\'' . $_REQUEST['last'] . '\' OR ' : '';
            $stu_q .= $_REQUEST['first'] != '' ? ' FIRST_NAME=\'' . $_REQUEST['first'] . '\' OR ' : '';
            $stu_q .= $_REQUEST['stuid'] != '' ? ' STUDENT_ID=\'' . $_REQUEST['stuid'] . '\' OR ' : '';
            $stu_q .= $_REQUEST['altid'] != '' ? ' ALT_ID=\'' . $_REQUEST['altid'] . '\' OR ' : '';
            $stu_q = preg_replace('/ OR $/', '', $stu_q);
            $stu_q = DBGet(DBQuery($stu_q));
            $search_stu = $stu_q[1]['STUDENT_ID'];
        }
        if ($_REQUEST['addr'] != '') {
Ejemplo n.º 17
0
if ($_REQUEST['student_id']) {
    $assignment_select .= '<OPTION value=' . $_REQUEST['assignment_id'] . ' SELECTED>' . $stu_RET[1]['FULL_NAME'] . '</OPTION>';
}
foreach ($assignments_RET as $id => $assignment) {
    $assignment_select .= '<OPTION value=' . $id . ($_REQUEST['assignment_id'] == $id && !$_REQUEST['student_id'] ? ' SELECTED' : '') . '>' . $assignment[1]['TYPE_TITLE'] . ' - ' . $assignment[1]['TITLE'] . '</OPTION>';
}
$assignment_select .= '</SELECT>';
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&student_id={$_REQUEST['student_id']} method=POST>";
$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['include_inactive']);
//-----------------------------------
//if(($_REQUEST['assignment_id'] == "all") && count($assignments_RET) == '0')
if (count($stu_RET) == 0) {
    DrawHeaderHome($assignment_select, '', '<INPUT type=checkbox name=include_inactive value=Y' . ($_REQUEST['include_inactive'] == 'Y' ? " CHECKED onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=\";'" : " onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=Y\";'") . '>Include Inactive Students');
} else {
    DrawHeaderHome($assignment_select, $_REQUEST['assignment_id'] ? SubmitButton('Save', '', 'class=btn_medium') : '', '<INPUT type=checkbox name=include_inactive value=Y' . ($_REQUEST['include_inactive'] == 'Y' ? " CHECKED onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=\";'" : " onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=Y\";'") . '>Include Inactive Students');
}
if (!$_REQUEST['student_id'] && $_REQUEST['assignment_id'] == 'all') {
    $options = array('yscroll' => true);
}
echo '<div style="overflow:auto; width:850px;">';
ListOutput($stu_RET, $LO_columns, $item, $items, $link, array(), $options);
echo '</div>';
if (count($assignments_RET) != 0) {
    echo $_REQUEST['assignment_id'] ? '<CENTER>' . SubmitButton('Save', '', 'class=btn_medium') . '</CENTER>' : '';
}
echo '</FORM>';
function _makeExtraAssnCols($assignment_id, $column)
{
    global $THIS_RET, $total_points, $current_RET, $points_RET, $tabindex, $max_allowed;
    $rounding = DBGet(DBQuery('SELECT VALUE FROM program_user_config WHERE USER_ID=\'' . User('STAFF_ID') . '\' AND TITLE=\'ROUNDING\' AND PROGRAM=\'Gradebook\' '));
Ejemplo n.º 18
0
echo "<FORM name=scheaddr id=scheaddr action=" . PreparePHP_SELF() . " method=POST>";
DrawBC("Scheduling > " . ProgramTitle());
if ($_REQUEST['day_start'] && $_REQUEST['month_start'] && $_REQUEST['year_start']) {
    $_REQUEST['placed_From'] = $_REQUEST['day_start'] . '-' . $_REQUEST['month_start'] . '-' . $_REQUEST['year_start'];
    $start_date = date('Y-m-d', strtotime($_REQUEST['placed_From']));
} else {
    $start_date = date("Y-m") . '-01';
}
if ($_REQUEST['day_end'] && $_REQUEST['month_end'] && $_REQUEST['year_end']) {
    $_REQUEST['placed_End'] = $_REQUEST['day_end'] . '-' . $_REQUEST['month_end'] . '-' . $_REQUEST['year_end'];
    $end_date = date('Y-m-d', strtotime($_REQUEST['placed_End']));
} else {
    $end_date = date("Y-m-d");
}
if ($_REQUEST['flag'] != 'list') {
    DrawHeaderHome(PrepareDateSchedule($start_date, '_start') . '<div style="padding:0px 6px; float:left;">-</div>' . PrepareDateSchedule($end_date, '_end'), '<INPUT type=submit class=btn_medium value=Go >');
}
echo '</FORM>';
if ($_REQUEST['modfunc'] == 'save') {
    $a = count($_REQUEST['st_arr']);
    if ($a == 0) {
        echo "Sorry! No Students were selected";
    } else {
        if (count($_REQUEST['st_arr'])) {
            $st_list = '\'' . implode('\',\'', $_REQUEST['st_arr']) . '\'';
            $extra['WHERE'] = '  se.ID IN (' . $st_list . ')';
        }
        $start_date = $_REQUEST['sday'];
        $end_date = $_REQUEST['eday'];
        //$enrollment_RET = DBGet(DBQuery( "SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,se.START_DATE AS START_DATE,NULL AS END_DATE,se.START_DATE AS DATE,se.STUDENT_ID,CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) AS FULL_NAME FROM schedule se,students s,courses c,course_periods cp WHERE c.COURSE_ID=se.COURSE_ID AND cp.COURSE_PERIOD_ID=se.COURSE_PERIOD_ID AND cp.COURSE_ID=c.COURSE_ID AND s.STUDENT_ID=se.STUDENT_ID AND se.SCHOOL_ID='".UserSchool()."' AND se.START_DATE BETWEEN '$start_date' AND '$end_date' AND $extra[WHERE]
        //							UNION SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,NULL AS START_DATE,se.END_DATE AS END_DATE,se.END_DATE AS DATE,se.STUDENT_ID,CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) AS FULL_NAME FROM schedule se,students s,courses c,course_periods cp WHERE c.COURSE_ID=se.COURSE_ID AND cp.COURSE_PERIOD_ID=se.COURSE_PERIOD_ID AND cp.COURSE_ID=c.COURSE_ID AND s.STUDENT_ID=se.STUDENT_ID AND se.SCHOOL_ID='".UserSchool()."' AND se.END_DATE BETWEEN '$start_date' AND '$end_date' AND $extra[WHERE]
Ejemplo n.º 19
0
                        $note = "Selected students have been dropped from the course period.";
                    }
                }
                //
            }
            //
            unset($_REQUEST['modfunc']);
            unset($_SESSION['MassDrops.php']);
            if ($note) {
                DrawHeader('<table><tr><td><IMG SRC=assets/check.gif></td><td>' . $note . '</td></tr></table>');
            }
            if ($inactive_schedule_found == 1) {
                DrawHeaderHome('<IMG SRC=assets/warning_button.gif><br>' . $inactive_schedule . ' have farthar schedule date');
            }
            if ($inactive_schedule_found == 2) {
                DrawHeaderHome('<IMG SRC=assets/warning_button.gif><br>Dropped date can not be changed for ' . $inactive_schedule2 . '.This schedule is locked.');
            }
        } else {
            unset($_REQUEST['modfunc']);
            unset($_SESSION['MassDrops.php']);
            DrawHeader('<table><tr><td><IMG SRC=assets/x.gif></td><td>No Studetn selected</td></tr></table>');
        }
    }
}
if (!$_REQUEST['modfunc']) {
    if ($_REQUEST['search_modfunc'] == 'list') {
        echo "<FORM name=ww id=ww action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=save method=POST>";
    }
    if ($_REQUEST['search_modfunc'] != 'list') {
        unset($_SESSION['MassDrops.php']);
    }
Ejemplo n.º 20
0
        echo '</TABLE>';
        /********************for Back to user***************************/
        echo '<input type=hidden name=sql_save_session_staf value=true />';
        /************************************************/
        echo '</FORM>';
        // set focus to last name text box
        echo '<script type="text/javascript"><!--
			document.search.last.focus();
			--></script>';
        PopTable('footer');
    } else {
        if (!$_REQUEST['next_modname']) {
            $_REQUEST['next_modname'] = 'users/Staff.php';
        }
        if (!isset($_openSIS['DrawHeader'])) {
            DrawHeaderHome('Please select a Staff');
        }
        $staff_RET = GetUserStaffList($extra);
        $last_log = DBGet(DBQuery('SELECT DISTINCT CONCAT(s.LAST_NAME,  \' \' ,s.FIRST_NAME) AS FULL_NAME,
					s.PROFILE,s.PROFILE_ID,ssr.END_DATE,s.STAFF_ID,\' \' as LAST_LOGIN FROM staff s INNER JOIN staff_school_relationship ssr USING(staff_id) WHERE
					((s.PROFILE_ID!=4 AND s.PROFILE_ID!=3) OR s.PROFILE_ID IS NULL) AND ssr.SYEAR=\'' . UserSyear() . '\'  AND s.STAFF_ID NOT IN (SELECT USER_ID FROM login_authentication WHERE PROFILE_ID NOT IN (3,4))'));
        foreach ($last_log as $li => $ld) {
            $staff_RET[] = $ld;
        }
        $_SESSION['count_stf'] = count($staff_RET);
        if ($extra['profile']) {
            $options = array('admin' => 'Administrator', 'teacher' => 'Teacher', 'parent' => 'Parent', 'none' => 'No Access');
            if ($extra['profile'] == 'teachers_option') {
                $singular = 'Teacher';
                $plural = 'Teachers';
            } elseif ($extra['profile'] == 'teachers_option_all') {
Ejemplo n.º 21
0
     $header .= '<TR><td class=lable>Exam</td><TD>' . CheckboxInput($RET['DOES_EXAM'], 'tables[' . $_REQUEST['marking_period_id'] . '][DOES_EXAM]', '', $checked, $_REQUEST['marking_period_id'] == 'new', '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD></tr>';
     $header .= '<TR><td class=lable>Comments</td><TD>' . CheckboxInput($RET['DOES_COMMENTS'], 'tables[' . $_REQUEST['marking_period_id'] . '][DOES_COMMENTS]', '', $checked, $_REQUEST['marking_period_id'] == 'new', '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD></tr>';
     $header .= '<TR><td class=lable>Begins</td><TD>' . DateInput($RET['START_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][START_DATE]', '') . '</TD></tr>';
     $header .= '<TR><td class=lable>Ends</td><TD>' . DateInput($RET['END_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][END_DATE]', '') . '</TD></tr>';
     $header .= '<TR><td class=lable>Grade Posting Begins</td><TD>' . DateInput($RET['POST_START_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][POST_START_DATE]', '') . '</TD></tr>';
     $str_srch = '<TR><td class=lable>Comments</td><TD>' . CheckboxInput($RET['DOES_COMMENTS'], 'tables[' . $_REQUEST['marking_period_id'] . '][DOES_COMMENTS]', '', $checked, $_REQUEST['marking_period_id'] == 'new', '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD></tr>';
     $header .= '<TR><td class=lable>Grade Posting Ends</td><TD>' . DateInput($RET['POST_END_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][POST_END_DATE]', '') . '</TD></tr>';
     $header .= '</TABLE>';
     DrawHeader($header);
     PopTable('footer');
     if (clean_param($_REQUEST['marking_period_id'], PARAM_ALPHANUM) == 'new') {
         DrawHeaderHome('', '', AllowEdit() ? '<INPUT type=submit value=Save class="btn_medium" onclick="formcheck_school_setup_marking();">' : '');
     } elseif ($_REQUEST['mp_term'] != 'FY') {
         DrawHeaderHome('', '', AllowEdit() ? $delete_button . '&nbsp;&nbsp;<INPUT type=submit name=btn_save id=btn_save value=Save class="btn_medium">' : '');
     } else {
         DrawHeaderHome('', '', '<INPUT type=submit name=btn_save id=btn_save value=Save class="btn_medium">');
     }
     echo '</FORM>';
     unset($_SESSION['_REQUEST_vars']['marking_period_id']);
     unset($_SESSION['_REQUEST_vars']['mp_term']);
 }
 // DISPLAY THE MENU
 $LO_options = array('save' => false, 'search' => false);
 echo '<TABLE cellpadding=3 width=100%><tr><td align="center"><br>';
 echo '<TABLE><TR>';
 // FY
 $sql = 'SELECT MARKING_PERIOD_ID,TITLE FROM school_years WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY SORT_ORDER';
 $QI = DBQuery($sql);
 $fy_RET = DBGet($QI);
 if (count($fy_RET)) {
     if ($_REQUEST['mp_term']) {
Ejemplo n.º 22
0
            }
        } elseif (count($periods_RET) == 1) {
            foreach ($periods_RET as $period) {
                $period_select .= "<OPTION value=" . $period['PERIOD_ID'] . ($_REQUEST['period_id'] == $period['PERIOD_ID'] || !isset($_REQUEST['period_id']) ? ' SELECTED' : '') . ">" . $period['TITLE'] . '</OPTION>';
            }
            if (!isset($_REQUEST['period_id'])) {
                $_REQUEST['period_id'] = $period['PERIOD_ID'];
            }
        }
    } else {
        $period_select .= '<OPTION value="PERIOD"' . ($_REQUEST['period_id'] ? ' SELECTED' : '') . '>By Period</OPTION>';
    }
    $period_select .= '</SELECT>';
    echo "<FORM action={$PHP_tmp_SELF} method=POST>";
    echo "<div style='width:795px; overflow:scroll; overflow-y:hidden;'>";
    DrawHeaderHome('<table><tr><td>' . PrepareDate($start_date, '_start') . '</td><td> - </td><td>' . PrepareDate($end_date, '_end') . '</td><td> : </td><td>' . $period_select . ' : <INPUT type=submit class=btn_medium value=Go></td></tr></table>');
}
$cal_RET = DBGet(DBQuery('SELECT DISTINCT SCHOOL_DATE,CONCAT(\'_\',DATE_FORMAT(SCHOOL_DATE,\'%y%b%d\')) AS SHORT_DATE FROM attendance_calendar WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SCHOOL_DATE BETWEEN \'' . date('Y-m-d', strtotime($start_date)) . '\' AND \'' . date('Y-m-d', strtotime($end_date)) . '\' ORDER BY SCHOOL_DATE'));
if (UserStudentID() || $_REQUEST['student_id'] || User('PROFILE') == 'parent') {
    // JUST TO SET USERSTUDENTID()
    Search('student_id');
    if ($_REQUEST['period_id']) {
        $sql = 'SELECT
				cp.TITLE as COURSE_PERIOD,sp.TITLE as PERIOD,cpv.PERIOD_ID
			FROM
				schedule s,courses c,course_periods cp,course_period_var cpv,school_periods sp
			WHERE
				s.COURSE_ID = c.COURSE_ID AND s.COURSE_ID = cp.COURSE_ID AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID
				AND s.COURSE_PERIOD_ID = cp.COURSE_PERIOD_ID AND cpv.PERIOD_ID = sp.PERIOD_ID AND cpv.DOES_ATTENDANCE=\'Y\'
				AND s.SYEAR = c.SYEAR AND cp.MARKING_PERIOD_ID IN (' . GetAllMP('QTR', UserMP()) . ')
				AND s.STUDENT_ID=\'' . UserStudentID() . '\' AND s.SYEAR=\'' . UserSyear() . '\'
Ejemplo n.º 23
0
###########################################
if (UserStaffID() || $_REQUEST['staff_id']) {
    if ($_REQUEST['modfunc'] != 'save' && $_REQUEST[modname] != 'users/TeacherPrograms.php?include=attendance/MissingAttendance.php' && $_REQUEST[modname] != 'users/TeacherPrograms.php?include=attendance/TakeAttendance.php') {
        if ($_REQUEST['staff_id']) {
            $RET = DBGet(DBQuery('SELECT FIRST_NAME,LAST_NAME FROM staff WHERE STAFF_ID=\'' . $_REQUEST['staff_id'] . '\''));
        } else {
            $RET = DBGet(DBQuery('SELECT FIRST_NAME,LAST_NAME FROM staff WHERE STAFF_ID=\'' . UserStaffID() . '\''));
        }
        $count_staff_RET = DBGet(DBQuery('SELECT COUNT(*) AS NUM FROM staff'));
        if ($count_staff_RET[1]['NUM'] > 1) {
            if (trim($_REQUEST['process']) == "") {
                DrawHeaderHome('Selected User: '******'FIRST_NAME'] . '&nbsp;' . $RET[1]['LAST_NAME'] . ' (<A HREF=Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '><font color=red>Search Again</font></A>) | <A HREF=Modules.php?modname=' . $_REQUEST['modname'] . '&search_modfunc=list&next_modname=users/User.php&ajax=true&bottom_back=true&return_session=true target=body>Back to User List</A>');
            }
            //
        } else {
            DrawHeaderHome('Selected User: '******'FIRST_NAME'] . '&nbsp;' . $RET[1]['LAST_NAME'] . ' (<A HREF=Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '><font color=red>Search Again</font></A>)');
        }
    }
}
#############################################
if ($_REQUEST['include'] != 'attendance/MissingAttendance.php') {
    if (!UserStaffID()) {
        Search('teacher_id', 'teachers_option_all');
    } else {
        $profile = DBGet(DBQuery('SELECT PROFILE FROM staff WHERE STAFF_ID=\'' . UserStaffID() . '\''));
        if ($profile[1]['PROFILE'] != 'teacher') {
            unset($_SESSION['staff_id']);
            echo '<script language=JavaScript>parent.side.location="' . $_SESSION['Side_PHP_SELF'] . '?modcat="+parent.side.document.forms[0].modcat.value;</script>';
            Search('teacher_id', 'teachers_option_all');
        }
    }
Ejemplo n.º 24
0
$table_list .= '</TABLE>';
DrawBC("School Setup > " . ProgramTitle());
if (Prompt_Copy_School('Confirm Copy School', 'Are you sure you want to copy the data for ' . GetSchool(UserSchool()) . ' to a new school?', $table_list)) {
    if (count($_REQUEST['tables'])) {
        $id = DBGet(DBQuery("SELECT " . db_seq_nextval('SCHOOLS_SEQ') . " AS ID" . FROM_DUAL));
        $id = $id[1]['ID'];
        DBQuery("INSERT INTO SCHOOLS (ID,TITLE) values('" . $id . "','" . str_replace("\\'", "''", $_REQUEST['title']) . "')");
        DBQuery("UPDATE STAFF SET SCHOOLS=CONCAT(SCHOOLS,',','{$id}') WHERE STAFF_ID='" . User('STAFF_ID') . "' AND SCHOOLS IS NOT NULL");
        foreach ($_REQUEST['tables'] as $table => $value) {
            _rollover($table);
        }
    }
    echo '<FORM action=Modules.php?modname=' . $_REQUEST['modname'] . ' method=POST>';
    echo '<script language=JavaScript>parent.side.location="' . $_SESSION['Side_PHP_SELF'] . '?modcat="+parent.side.document.forms[0].modcat.value;</script>';
    echo "<br><br>";
    DrawHeaderHome('<IMG SRC=assets/check.gif> &nbsp;The data have been copied to a new school called "' . $_REQUEST['title'] . '".', '<INPUT  type=submit value=OK class="btn_medium">');
    echo '</FORM>';
    unset($_SESSION['_REQUEST_vars']['tables']);
    unset($_SESSION['_REQUEST_vars']['delete_ok']);
}
function _rollover($table)
{
    global $id;
    switch ($table) {
        case 'SCHOOL_PERIODS':
            DBQuery("INSERT INTO SCHOOL_PERIODS (PERIOD_ID,SYEAR,SCHOOL_ID,SORT_ORDER,TITLE,SHORT_NAME,LENGTH,ROLLOVER_ID) SELECT fn_school_periods_seq(),SYEAR,'{$id}' AS SCHOOL_ID,SORT_ORDER,TITLE,SHORT_NAME,LENGTH,ROLLOVER_ID FROM SCHOOL_PERIODS WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "'");
            break;
        case 'SCHOOL_GRADELEVELS':
            $table_properties = db_properties($table);
            $columns = '';
            foreach ($table_properties as $column => $values) {
Ejemplo n.º 25
0
function BlockDelete($item)
{
    switch ($item) {
        case 'school':
            $find_student = DBGet(DBQuery('SELECT COUNT(STUDENT_ID) AS STUDENT_EXIST FROM student_enrollment WHERE SCHOOL_ID=\'' . UserSchool() . '\''));
            $find_student = $find_student[1]['STUDENT_EXIST'];
            $find_staff = DBGet(DBQuery('SELECT COUNT(STAFF_ID) AS STAFF_EXIST FROM staff WHERE CURRENT_SCHOOL_ID=\'' . UserSchool() . '\''));
            $find_staff = $find_staff[1]['STAFF_EXIST'];
            if ($find_student > 0 && $find_staff > 0) {
                PopTable('header', 'Unable to Delete');
                DrawHeaderHome('<font color=red>This School cannot be deleted. There are Students and Teachers in this School</font>');
                echo '<div align=right><a href=Modules.php?modname=School_Setup/Schools.php&school_id=' . UserSchool() . ' style="text-decoration:none">back to School Information</a></div>';
                PopTable('footer');
                return false;
            } else {
                return true;
            }
            break;
        case 'subject':
            $find_student = DBGet(DBQuery('SELECT COUNT(sch.STUDENT_ID) AS STUDENT_EXIST FROM schedule sch,course_periods cp, courses c WHERE c.SUBJECT_ID=\'' . $_REQUEST['subject_id'] . '\''));
            $find_student = $find_student[1]['STUDENT_EXIST'];
            if ($find_student > 0) {
                PopTable('header', 'Unable to Delete');
                DrawHeaderHome('<font color=red>Subject cannot be deleted. There are <font color=green>' . $find_student . '</font> Students Enrolled</font>');
                echo '<div align=right><a href=Modules.php?modname=School_Setup/Courses.php&subject_id=' . $_REQUEST['subject_id'] . ' style="text-decoration:none"><b>back to Subject</b></a></div>';
                PopTable('footer');
                return false;
            } else {
                return true;
            }
            break;
        case 'course':
            $find_student = DBGet(DBQuery('SELECT COUNT(sch.STUDENT_ID) AS STUDENT_EXIST FROM schedule sch,course_periods cp, courses c WHERE sch.COURSE_ID=\'' . $_REQUEST['course_id'] . '\' AND sch.COURSE_ID=c.COURSE_ID AND c.SUBJECT_ID=\'' . $_REQUEST['subject_id'] . '\''));
            $find_student = $find_student[1]['STUDENT_EXIST'];
            if ($find_student > 0) {
                PopTable('header', 'Unable to Delete');
                DrawHeaderHome('<font color=red>Course cannot be deleted. There are <font color=green>' . $find_student . '</font> Students Enrolled</font>');
                echo '<div align=right><a href=Modules.php?modname=School_Setup/Courses.php&subject_id=' . $_REQUEST['subject_id'] . '&course_id=' . $_REQUEST['course_id'] . ' style="text-decoration:none"><b>back to Course</b></a></div>';
                PopTable('footer');
                return false;
            } else {
                return true;
            }
            break;
        case 'course period':
            $find_student = DBGet(DBQuery('SELECT COUNT(sch.STUDENT_ID) AS STUDENT_EXIST FROM schedule sch,course_periods cp, courses c WHERE sch.COURSE_ID=\'' . $_REQUEST['course_id'] . '\' AND sch.COURSE_ID=c.COURSE_ID AND sch.COURSE_PERIOD_ID=\'' . $_REQUEST['course_period_id'] . '\' AND sch.COURSE_PERIOD_ID=cp.COURSE_PERIOD_ID AND c.SUBJECT_ID=\'' . $_REQUEST['subject_id'] . '\''));
            $find_student = $find_student[1]['STUDENT_EXIST'];
            if ($find_student > 0) {
                PopTable('header', 'Unable to Delete');
                DrawHeaderHome('<font color=red>Period cannot be deleted. There are <font color=green>' . $find_student . '</font> Students Enrolled</font>');
                echo '<div align=right><a href=Modules.php?modname=School_Setup/Courses.php&subject_id=' . $_REQUEST['subject_id'] . '&course_id=' . $_REQUEST['course_id'] . '&course_period_id=' . $_REQUEST['course_period_id'] . ' style="text-decoration:none"><b>back to Period</b></a></div>';
                PopTable('footer');
                return false;
            } else {
                return true;
            }
            break;
        case 'calendar':
        case 'marking_period':
        case 'grade_level':
    }
}
Ejemplo n.º 26
0
         echo "<FORM name=F4 id=F4 action=for_window.php?modname={$_REQUEST['modname']}&subject_id={$_REQUEST['subject_id']} method=POST>";
         DrawHeaderHome($title, $delete_button . SubmitButton('' . _('Save') . '', '', 'class=btn_medium onclick="formcheck_scheduling_course_F4();"'));
         $header .= '<TABLE cellpadding=3 width=100%>';
         $header .= '<TR>';
         $header .= '<TD>' . TextInput($RET['TITLE'], 'tables[course_subjects][' . $_REQUEST['subject_id'] . '][TITLE]', '' . _('Title') . '', 'class=cell_floating') . '</TD>';
         $header .= '</TR>';
         $header .= '</TABLE>';
         DrawHeader($header);
         echo '</FORM>';
     }
 }
 // DISPLAY THE MENU
 $LO_options = array('save' => false, 'search' => false);
 if (!$_REQUEST['subject_id'] || $_REQUEST['modfunc'] == 'choose_course') {
     #DrawHeader('Courses');
     DrawHeaderHome('' . _('Courses') . '', "<A HREF=for_window.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&course_modfunc=search>" . _('Search') . "</A>");
 }
 echo '<TABLE><TR>';
 if (count($subjects_RET)) {
     if ($_REQUEST['subject_id']) {
         foreach ($subjects_RET as $key => $value) {
             if ($value['SUBJECT_ID'] == $_REQUEST['subject_id']) {
                 $subjects_RET[$key]['row_color'] = Preferences('HIGHLIGHT');
             }
         }
     }
 }
 echo '<TD valign=top>';
 $columns = array('TITLE' => '' . _('Subject') . '');
 $link = array();
 $link['TITLE']['link'] = "for_window.php?modname={$_REQUEST['modname']}";
Ejemplo n.º 27
0
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
DrawBC("Gradebook > " . ProgramTitle());
if (!$_REQUEST['mp']) {
    $_REQUEST['mp'] = UserMP();
}
$sem = GetParentMP('SEM', UserMP());
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
$mp_select = "<SELECT name=mp onchange='document.forms[0].submit();'><OPTION value=" . UserMP() . ">" . GetMP(UserMP()) . "</OPTION><OPTION value=" . $sem . ($sem == $_REQUEST['mp'] ? ' SELECTED' : '') . ">" . GetMP($sem) . "</OPTION><OPTION value=E" . $sem . ('E' . $sem == $_REQUEST['mp'] ? ' SELECTED' : '') . ">" . GetMP($sem) . ' Exam</OPTION></SELECT>';
DrawHeaderHome($mp_select);
echo '</FORM>';
$sql = "SELECT CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) as FULL_NAME,s.STAFF_ID,g.REPORT_CARD_GRADE_ID FROM STUDENT_REPORT_CARD_GRADES g,STAFF s,COURSE_PERIODS cp WHERE g.COURSE_PERIOD_ID=cp.COURSE_PERIOD_ID AND cp.TEACHER_ID=s.STAFF_ID AND cp.SYEAR=s.SYEAR AND cp.SYEAR=g.SYEAR AND cp.SYEAR='" . UserSyear() . "' AND g.MARKING_PERIOD_ID='" . $_REQUEST['mp'] . "'";
$grouped_RET = DBGet(DBQuery($sql), array(), array('STAFF_ID', 'REPORT_CARD_GRADE_ID'));
$grades_RET = DBGet(DBQuery("SELECT rg.ID,rg.TITLE FROM REPORT_CARD_GRADES rg,REPORT_CARD_GRADE_SCALES rs WHERE rg.SCHOOL_ID='" . UserSchool() . "' AND rg.SYEAR='" . UserSyear() . "' AND rs.ID=rg.GRADE_SCALE_ID ORDER BY rs.SORT_ORDER,rs.ID,rg.BREAK_OFF IS NOT NULL DESC,rg.BREAK_OFF DESC,rg.SORT_ORDER"));
if (count($grouped_RET)) {
    foreach ($grouped_RET as $staff_id => $grades) {
        $i++;
        $teachers_RET[$i]['FULL_NAME'] = $grades[key($grades)][1]['FULL_NAME'];
        foreach ($grades_RET as $grade) {
            $teachers_RET[$i][$grade['ID']] = count($grades[$grade['ID']]);
        }
    }
}
$columns = array('FULL_NAME' => 'Teacher');
foreach ($grades_RET as $grade) {
Ejemplo n.º 28
0
$period_select = "&nbsp;<SELECT name=period><OPTION value=''>All</OPTION>";
foreach ($periods_RET as $period) {
    $period_select .= "<OPTION value={$period['PERIOD_ID']}" . ($_REQUEST['period'] == $period['PERIOD_ID'] ? ' SELECTED' : '') . ">" . $period['TITLE'] . "</OPTION>";
}
$period_select .= "</SELECT>";
DrawBC("Eligibility > " . ProgramTitle());
echo "<FORM name=teach_comp id=teach_comp action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
$begin_year = DBGet(DBQuery("SELECT min(unix_timestamp(SCHOOL_DATE)) as SCHOOL_DATE FROM ATTENDANCE_CALENDAR WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "'"));
$begin_year = $begin_year[1]['SCHOOL_DATE'];
if ($start && $begin_year) {
    $date_select = "<OPTION value={$start}>" . date('M d, Y', $start) . ' - ' . date('M d, Y', $end) . '</OPTION>';
    for ($i = $start - 60 * 60 * 24 * 7; $i >= $begin_year; $i -= 60 * 60 * 24 * 7) {
        $date_select .= "<OPTION value={$i}" . ($i + 86400 >= $start_time && $i - 86400 <= $start_time ? ' SELECTED' : '') . ">" . date('M d, Y', $i) . ' - ' . date('M d, Y', $i + 1 + ($END_DAY - $START_DAY) * 60 * 60 * 24) . '</OPTION>';
    }
}
DrawHeaderHome('<SELECT name=start_date>' . $date_select . '</SELECT>' . $period_select, '<INPUT type=submit class=btn_medium value=Go onclick=\'formload_ajax("teach_comp");\'>');
echo '</FORM>';
$sql = "SELECT CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) AS FULL_NAME,sp.TITLE,cp.PERIOD_ID,s.STAFF_ID \n\t\tFROM STAFF s,COURSE_PERIODS cp,SCHOOL_PERIODS sp \n\t\tWHERE \n\t\t\tsp.PERIOD_ID = cp.PERIOD_ID\n\t\t\tAND cp.TEACHER_ID=s.STAFF_ID AND cp.MARKING_PERIOD_ID IN (" . GetAllMP('QTR', UserMP()) . ")\n\t\t\tAND cp.SYEAR='" . UserSyear() . "' AND cp.SCHOOL_ID='" . UserSchool() . "' AND s.PROFILE='teacher'\n\t\t\t" . ($_REQUEST['period'] ? " AND cp.PERIOD_ID='{$_REQUEST['period']}'" : '') . "\n\t\t\tAND NOT EXISTS (SELECT '' FROM ELIGIBILITY_COMPLETED ac WHERE ac.STAFF_ID=cp.TEACHER_ID AND ac.PERIOD_ID = sp.PERIOD_ID AND ac.SCHOOL_DATE BETWEEN '" . date('Y-m-d', $start_time) . "' AND '" . date('Y-m-d', $start_time + 60 * 60 * 24 * 7) . "')";
$RET = DBGet(DBQuery($sql), array(), array('STAFF_ID', 'PERIOD_ID'));
$i = 0;
if (count($RET)) {
    foreach ($RET as $staff_id => $periods) {
        $i++;
        $staff_RET[$i]['FULL_NAME'] = $periods[key($periods)][1]['FULL_NAME'];
        foreach ($periods as $period_id => $period) {
            $staff_RET[$i][$period_id] = '<IMG SRC=assets/x.gif>';
        }
    }
}
$columns = array('FULL_NAME' => 'Teacher');
if (!$_REQUEST['period']) {
Ejemplo n.º 29
0
            $sql = 'INSERT INTO eligibility (STUDENT_ID,SCHOOL_DATE,SYEAR,PERIOD_ID,COURSE_PERIOD_ID,ELIGIBILITY_CODE) values(\'' . $student_id . '\',\'' . DBDate() . '\',\'' . UserSyear() . '\',\'' . UserPeriod() . '\',\'' . $course_period_id . '\',\'' . $value . '\')';
        }
        DBQuery($sql);
    }
    $RET = DBGet(DBQuery('SELECT \'completed\' AS COMPLETED FROM eligibility_completed WHERE STAFF_ID=\'' . User('STAFF_ID') . '\' AND SCHOOL_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\' AND PERIOD_ID=\'' . UserPeriod() . '\''));
    if (!count($RET)) {
        DBQuery('INSERT INTO eligibility_completed (STAFF_ID,SCHOOL_DATE,PERIOD_ID) values(\'' . User('STAFF_ID') . '\',\'' . DBDate() . '\',\'' . UserPeriod() . '\')');
    }
    $current_RET = DBGet(DBQuery('SELECT ELIGIBILITY_CODE,STUDENT_ID FROM eligibility WHERE SCHOOL_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\' AND PERIOD_ID=\'' . UserPeriod() . '\''), array(), array('STUDENT_ID'));
}
$extra['SELECT'] .= ",'' AS PASSING,'' AS BORDERLINE,'' AS FAILING,'' AS INCOMPLETE";
$extra['functions'] = array('PASSING' => 'makeRadio', 'BORDERLINE' => 'makeRadio', 'FAILING' => 'makeRadio', 'INCOMPLETE' => 'makeRadio');
$columns = array('PASSING' => '' . _('Passing') . '', 'BORDERLINE' => '' . _('Borderline') . '', 'FAILING' => '' . _('Failing') . '', 'INCOMPLETE' => '' . _('Incomplete') . '');
$stu_RET = GetStuList($extra);
echo "<FORM ACTION=Modules.php?modname={$_REQUEST['modname']} method=POST>";
DrawHeaderHome(ProgramTitle());
if ($today > $END_DAY || $today < $START_DAY || $today == $START_DAY && date('Gi') < $START_HOUR . $START_MINUTE || $today == $END_DAY && date('Gi') > $END_HOUR . $END_MINUTE) {
    if ($START_HOUR > 12) {
        $START_HOUR -= 12;
        $START_M = 'PM';
    } else {
        $START_M = 'AM';
    }
    if ($END_HOUR > 12) {
        $END_HOUR -= 12;
        $END_M = 'PM';
    } else {
        $END_M = 'AM';
    }
    echo ErrorMessage(array('' . _('You can only enter eligibility from') . '' . $days[$START_DAY] . ' ' . $START_HOUR . ':' . $START_MINUTE . ' ' . $START_M . ' ' . _('to') . ' ' . $days[$END_DAY] . ' ' . $END_HOUR . ':' . $END_MINUTE . ' ' . $END_M), 'error');
} else {
Ejemplo n.º 30
0
         $header .= '<TR><td class=lable>Sort Order</td><TD>' . TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['marking_period_id'] . '][SORT_ORDER]', '', 'class=cell_small onKeyDown=\\"return numberOnly(event);\\"') . '</TD></tr>';
     }
     $header .= '<TR><td class=lable>Graded</td><TD>' . CheckboxInput($RET['DOES_GRADES'], 'tables[' . $_REQUEST['marking_period_id'] . '][DOES_GRADES]', '', $checked, $_REQUEST['marking_period_id'] == 'new', '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD></tr>';
     $header .= '<TR><td class=lable>Exam</td><TD>' . CheckboxInput($RET['DOES_EXAM'], 'tables[' . $_REQUEST['marking_period_id'] . '][DOES_EXAM]', '', $checked, $_REQUEST['marking_period_id'] == 'new', '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD></tr>';
     $header .= '<TR><td class=lable>Comments</td><TD>' . CheckboxInput($RET['DOES_COMMENTS'], 'tables[' . $_REQUEST['marking_period_id'] . '][DOES_COMMENTS]', '', $checked, $_REQUEST['marking_period_id'] == 'new', '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD></tr>';
     $header .= '<TR><td class=lable>Begins</td><TD>' . DateInput($RET['START_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][START_DATE]', '') . '</TD></tr>';
     $header .= '<TR><td class=lable>Ends</td><TD>' . DateInput($RET['END_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][END_DATE]', '') . '</TD></tr>';
     $header .= '<TR><td class=lable>Grade Posting Begins</td><TD>' . DateInput($RET['POST_START_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][POST_START_DATE]', '') . '</TD></tr>';
     $header .= '<TR><td class=lable>Grade Posting Ends</td><TD>' . DateInput($RET['POST_END_DATE'], 'tables[' . $_REQUEST['marking_period_id'] . '][POST_END_DATE]', '') . '</TD></tr>';
     $header .= '</TABLE>';
     DrawHeader($header);
     PopTable('footer');
     if ($_REQUEST['marking_period_id'] == 'new') {
         DrawHeaderHome('', '', AllowEdit() ? $delete_button . '&nbsp;&nbsp;<INPUT type=submit value=Save class="btn_medium" onclick="formcheck_school_setup_marking();">' : '');
     } else {
         DrawHeaderHome('', '', AllowEdit() ? $delete_button . '&nbsp;&nbsp;<INPUT type=submit name=btn_save id=btn_save value=Save class="btn_medium">' : '');
     }
     echo '</FORM>';
     unset($_SESSION['_REQUEST_vars']['marking_period_id']);
     unset($_SESSION['_REQUEST_vars']['mp_term']);
 }
 // DISPLAY THE MENU
 $LO_options = array('save' => false, 'search' => false);
 echo '<TABLE cellpadding=3 width=100%><tr><td align="center"><br>';
 echo '<TABLE><TR>';
 // FY
 $sql = "SELECT MARKING_PERIOD_ID,TITLE FROM SCHOOL_YEARS WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY SORT_ORDER";
 $QI = DBQuery($sql);
 $fy_RET = DBGet($QI);
 if (count($fy_RET)) {
     if ($_REQUEST['mp_term']) {