Beispiel #1
0
     if ($search_from_grade == 'true') {
         $_SESSION['stu_search']['search_from_grade'] = 'true';
     }
 }
 PopTable('header', 'Find a Student');
 if ($extra['pdf'] != true) {
     echo "<FORM name=search id=search action=Modules.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&search_modfunc=list&next_modname={$_REQUEST['next_modname']}" . $extra['action'] . " method=POST>";
 } else {
     echo "<FORM name=search id=search action=for_export.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&search_modfunc=list&next_modname={$_REQUEST['next_modname']}" . $extra['action'] . " method=POST target=_blank>";
 }
 echo '<TABLE border=0>';
 Search_absence_summary('general_info');
 if ($extra['search']) {
     echo $extra['search'];
 }
 Search_absence_summary('student_fields');
 # ---   Advanced Search Start ---------------------------------------------------------- #
 echo '<div style="height:10px;"></div>';
 echo '<input type=hidden name=sql_save_session value=true />';
 echo '<div id="addiv">';
 echo '<div><label onclick="show_search_div();" style="cursor:pointer; font-weight:bold; font-size:12px;  text-decoration:underline;">Advanced Search</label></div>';
 echo '</div>';
 echo '<div id="searchdiv" style="display:none; width:410px;">';
 echo '<div>&laquo;&nbsp;<label onclick="hide_search_div();" style="cursor:pointer; font-weight:bold; font-size:12px;  text-decoration:underline;">Back to Basic Search</label></div>';
 echo '<div style="height:14px;"></div>';
 echo '<div style=text-align:left;padding-left:74px;padding-bottom:14px;>Comments&nbsp;<input type=text name="mp_comment" size=30 class="cell_floating"></div>';
 echo '<div style="margin-left:22px; padding-bottom:5px;"><b>Birthday</b></div>';
 echo '<div style=text-align:left;padding-left:98px;padding-bottom:4px;>From: ' . SearchDateInput('day_from_birthdate', 'month_from_birthdate', '', 'Y', 'Y', '') . '</div>';
 echo '<div style=text-align:left;padding-left:110px;padding-bottom:20px;>To: ' . SearchDateInput('day_to_birthdate', 'month_to_birthdate', '', 'Y', 'Y', '') . '</div>';
 echo '<div style="margin-left:22px; padding-bottom:5px;"><b>Goal and Progress</b></div>';
 echo '<div style=text-align:left;padding-left:80px;padding-bottom:4px;>Goal Title <input type=text name="goal_title" size=30 class="cell_floating"></div>';
Beispiel #2
0
                        AND ap.SCHOOL_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\') AS ABS_' . $code[ID] . '';
            }
            $extra['columns_after']["ABS_" . $code[ID] . ""] = $code['TITLE'];
        }
    }
}
$extra['link']['FULL_NAME']['link'] = "Modules.php?modname={$_REQUEST['modname']}&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']}&period_id={$_REQUEST['period_id']}&myclasses={$_REQUEST['myclasses']}";
$extra['link']['FULL_NAME']['variables'] = array('student_id' => 'STUDENT_ID');
if ((!$_REQUEST['search_modfunc'] || $_openSIS['modules_search']) && !$_REQUEST['student_id']) {
    $extra['new'] = true;
}
Widgets('activity');
Widgets('course');
Widgets('absences');
if (!$_SESSION['student_id']) {
    Search_absence_summary('student_id', $extra);
}
if (UserStudentID()) {
    $name_RET = DBGet(DBQuery('SELECT concat(FIRST_NAME, \' \', COALESCE(MIDDLE_NAME,\' \'), LAST_NAME) AS FULL_NAME FROM students WHERE STUDENT_ID=\'' . UserStudentID() . '\''));
    DrawHeader($name_RET[1]['FULL_NAME']);
    $PHP_tmp_SELF = PreparePHP_SELF();
    $i = 0;
    //    if($_REQUEST['myclasses']!=''){
    //        $absences_RET = DBGet(DBQuery('SELECT ap.STUDENT_ID,ap.PERIOD_ID,ap.SCHOOL_DATE,ac.SHORT_NAME,ad.STATE_VALUE,ad.COMMENT AS OFFICE_COMMENT,ap.COMMENT AS TEACHER_COMMENT FROM attendance_period ap,attendance_day ad,attendance_codes ac,course_periods cp WHERE ap.COURSE_PERIOD_ID=cp.COURSE_PERIOD_ID AND '.(($_REQUEST['myclasses']=='my_classes')? '(cp.TEACHER_ID=\''.User('STAFF_ID').'\' OR cp.SECONDARY_TEACHER_ID=\''.User('STAFF_ID').'\')' : 'cp.COURSE_PERIOD_ID=\''.UserCoursePeriod().'\'').' AND ap.STUDENT_ID=ad.STUDENT_ID AND ap.SCHOOL_DATE=ad.SCHOOL_DATE AND ap.ATTENDANCE_CODE=ac.ID AND (ac.DEFAULT_CODE!=\'Y\' OR ac.DEFAULT_CODE IS NULL) AND ap.STUDENT_ID=\''.UserStudentID().'\' AND ap.SCHOOL_DATE BETWEEN \''.$start_date.'\' AND \''.$end_date.'\''),array(),array('SCHOOL_DATE','PERIOD_ID'));
    //    }else{
    //        $absences_RET = DBGet(DBQuery('SELECT ap.STUDENT_ID,ap.PERIOD_ID,ap.SCHOOL_DATE,ac.SHORT_NAME,ad.STATE_VALUE,ad.COMMENT AS OFFICE_COMMENT,ap.COMMENT AS TEACHER_COMMENT FROM attendance_period ap,attendance_day ad,attendance_codes ac WHERE ap.STUDENT_ID=ad.STUDENT_ID AND ap.SCHOOL_DATE=ad.SCHOOL_DATE AND ap.ATTENDANCE_CODE=ac.ID AND (ac.DEFAULT_CODE!=\'Y\' OR ac.DEFAULT_CODE IS NULL) AND ap.STUDENT_ID=\''.UserStudentID().'\' AND ap.SCHOOL_DATE BETWEEN \''.$start_date.'\' AND \''.$end_date.'\''),array(),array('SCHOOL_DATE','PERIOD_ID'));
    //    }
    if ($_REQUEST['myclasses'] != '') {
        $absences_RET = DBGet(DBQuery('SELECT ap.STUDENT_ID,ap.PERIOD_ID,ap.SCHOOL_DATE,ac.SHORT_NAME,ad.STATE_VALUE,ad.COMMENT AS OFFICE_COMMENT,ap.COMMENT AS TEACHER_COMMENT,ac.STATE_CODE FROM attendance_period ap,attendance_day ad,attendance_codes ac,course_periods cp WHERE ap.COURSE_PERIOD_ID=cp.COURSE_PERIOD_ID AND ' . ($_REQUEST['myclasses'] == 'my_classes' ? '(cp.TEACHER_ID=\'' . User('STAFF_ID') . '\' OR cp.SECONDARY_TEACHER_ID=\'' . User('STAFF_ID') . '\')' : 'cp.COURSE_PERIOD_ID=\'' . UserCoursePeriod() . '\'') . ' AND ap.STUDENT_ID=ad.STUDENT_ID AND ap.SCHOOL_DATE=ad.SCHOOL_DATE AND ap.ATTENDANCE_CODE=ac.ID  AND ap.STUDENT_ID=\'' . UserStudentID() . '\' AND ap.SCHOOL_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\''), array(), array('SCHOOL_DATE', 'PERIOD_ID'));
    } else {
        $absences_RET = DBGet(DBQuery('SELECT ap.STUDENT_ID,ap.PERIOD_ID,ap.SCHOOL_DATE,ac.SHORT_NAME,ad.STATE_VALUE,ad.COMMENT AS OFFICE_COMMENT,ap.COMMENT AS TEACHER_COMMENT,ac.STATE_CODE FROM attendance_period ap,attendance_day ad,attendance_codes ac WHERE ap.STUDENT_ID=ad.STUDENT_ID AND ap.SCHOOL_DATE=ad.SCHOOL_DATE AND ap.ATTENDANCE_CODE=ac.ID  AND ap.STUDENT_ID=\'' . UserStudentID() . '\' AND ap.SCHOOL_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\''), array(), array('SCHOOL_DATE', 'PERIOD_ID'));