echo '<tr><td>' . _('Student ID') . ':</td>'; echo '<td>' . $courses[1]['STUDENT_ID'] . '</td></tr>'; echo '<tr><td>' . _('Student Name') . ':</td>'; echo '<td>' . $courses[1]['FULL_NAME'] . '</td></tr>'; echo '<tr><td>' . _('Student Grade') . ':</td>'; echo '<td>' . $courses[1]['GRADE_ID'] . '</td></tr>'; if ($courses[1]['MAILING_LABEL'] != '') { echo '<tr><td>' . _('Malling Details') . ':</td>'; echo '<td>' . $courses[1]['MAILING_LABEL'] . '</td></tr>'; } echo '</table>'; //echo '<div style="font-size:18px; font-weight:bold; ">'.Config('TITLE').' Student Schedule</div><div style="height:20px;"></div>'; //echo '<div>'.$courses[1]['FULL_NAME'].' - #'.$courses[1]['STUDENT_ID']. '</div>'; //echo '<div>'.$courses[1]['GRADE_ID'].' Grade</div>'; //echo '<div>'.ProperDate($date),$_REQUEST['mp_id']?GetMP($_REQUEST['mp_id']):''.'</div>'; ListOutputPrint($courses, $columns, '' . _('Course') . '', '' . _('Courses') . '', array(), array(), array('center' => false, 'print' => false)); echo '<div style="page-break-before: always;"> </div><!-- NEW PAGE -->'; } } PDFStop($handle); } else { BackPrompt(_('No Students were found.')); } } else { BackPrompt(_('You must choose at least one student.')); } } if (!$_REQUEST['modfunc']) { DrawBC("" . _('Scheduling') . " >> " . ProgramTitle()); if ($_REQUEST['search_modfunc'] == 'list') { $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'));
// set NOT_PERIOD_ID if ($courses[$key]['NOT_PERIOD_ID']) { $stmt = $mysqli->prepare("select title from SCHOOL_PERIODS where period_id=? limit 1"); $stmt->bind_param("i", $period_id); //binding name as string $period_id = $courses[$key]['NOT_PERIOD_ID']; $stmt->execute(); $title = ''; $stmt->bind_result($title); $stmt->fetch(); $courses[$key]['NOT_PERIOD_ID'] = $title; unset($stmt); } } /*echo '<pre>';print_r($courses);echo '</pre>';*/ ListOutputPrint($courses, $columns, 'Request', 'Requests', array(), array(), array('center' => false, 'print' => false)); echo '<!-- NEW PAGE -->'; } } PDFStop($handle); } else { BackPrompt('No Students were found.'); } } function _makeExtra($value, $title = '') { global $THIS_RET; if ($THIS_RET['WITH_TEACHER_ID']) { $return .= 'With: ' . GetTeacher($THIS_RET['WITH_TEACHER_ID']) . '<BR>'; } if ($THIS_RET['NOT_TEACHER_ID']) {
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] // ORDER BY DATE DESC"),array('START_DATE'=>'ProperDate','END_DATE'=>'ProperDate')) ; $enrollment_RET = DBGet(DBQuery('SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,se.START_DATE 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.START_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\' OR se.END_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\') AND ' . $extra[WHERE] . ' ORDER BY DATE DESC'), array('START_DATE' => 'ProperDate', 'END_DATE' => 'ProperDate')); $columns = array('FULL_NAME' => 'Student', 'STUDENT_ID' => 'Student ID', 'COURSE_TITLE' => 'Course', 'TITLE' => 'Course Period', 'START_DATE' => 'Enrolled', 'END_DATE' => 'Dropped'); if (count($enrollment_RET) > 0) { echo "<table width=100%><tr><td width=105>" . DrawLogo() . "</td><td style=\"font-size:15px; font-weight:bold; padding-top:20px;\">" . GetSchool(UserSchool()) . "<div style=\"font-size:12px;\">Add / Drop Report</div></td><td align=right style=\"padding-top:20px;\">" . ProperDate(DBDate()) . "<br />Powered by openSIS</td></tr><tr><td colspan=3 style=\"border-top:1px solid #333;\"> </td></tr></table>"; } ListOutputPrint($enrollment_RET, $columns, 'Schedule Record', 'Schedule Records'); } } else { echo "<FORM name=addr id=addr action='for_export.php?modname={$_REQUEST['modname']}&head_html=Add+/+Drop+Report&modfunc=save&sday={$start_date}&eday={$end_date}&include_inactive={$_REQUEST['include_inactive']}&_openSIS_PDF=true&flag=list' method=POST target=_blank>"; //$enrollment_RET1 = DBGet(DBQuery("SELECT se.ID CHECKBOX,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' // UNION SELECT se.ID as CHECKBOX,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' // ORDER BY DATE DESC"),array('START_DATE'=>'ProperDate','END_DATE'=>'ProperDate','CHECKBOX'=>'_makeChooseCheckbox')); $enrollment_RET1 = DBGet(DBQuery('SELECT se.ID CHECKBOX,c.TITLE AS COURSE_TITLE,cp.TITLE,se.START_DATE 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.START_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\' OR se.END_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\') ORDER BY DATE DESC'), array('START_DATE' => 'ProperDate', 'END_DATE' => 'ProperDate', 'CHECKBOX' => '_makeChooseCheckbox')); $columns_b = array('CHECKBOX' => '</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'st_arr\');"><A>'); $columns = $columns_b + array('FULL_NAME' => 'Student', 'STUDENT_ID' => 'Student ID', 'COURSE_TITLE' => 'Course', 'TITLE' => 'Course Period', 'START_DATE' => 'Enrolled', 'END_DATE' => 'Dropped'); ListOutput($enrollment_RET1, $columns, 'Schedule Record', 'Schedule Records'); if ($_REQUEST['flag'] != 'list' && count($enrollment_RET1) != '0') { echo '<BR><CENTER><INPUT type=submit class=btn_xxlarge value=\'Create Add/Drop Report for Selected Students\'></CENTER>'; } echo '</FORM>';
} if ($sum_percent > 0) { $sum_points /= $sum_percent; } else { $sum_points = 0; } $link['add']['html'] = array('TITLE' => '<B>Total</B>', 'LETTER_GRADE' => '( ' . $total_stpoints . ' / ' . $total_asgnpoints . ' ) ' . Percent($sum_points) . ' ' . _makeLetterGrade($sum_points, $course_period_id, UserStaffID())); $link['add']['html']['ASSIGNED_DATE'] = $link['add']['html']['DUE_DATE'] = $link['add']['html']['POINTS'] = $link['add']['html']['COMMENT'] = ' '; echo '</table>'; if ($_REQUEST['list_type'] == 'total') { echo '<table border=0 style=\\"font-size:12px;\\" >'; echo '<tr><td> Total:</td><td>' . Percent($sum_points) . ' ' . _makeLetterGrade($sum_points) . '</td> </tr>'; echo '<tr><td></td></tr>'; echo '</table>'; } else { ListOutputPrint($grades_RET, $columns, 'Assignment', 'Assignments', $link, array(), array('center' => false, 'add' => true)); } unset($percent_weights); } echo '<div style="page-break-before: always;"> </div>'; } PDFStop($handle); } else { BackPrompt('No Students were found.'); } } else { BackPrompt('You must choose at least one student.'); } } if (!$_REQUEST['modfunc']) { #DrawHeader('Gradebook - '.ProgramTitle());
if ($_REQUEST['elements']['ytd_tardies'] == 'Y') { $attendance_title = DBGet(DBQuery("SELECT TITLE FROM attendance_codes WHERE id='" . $_REQUEST['ytd_tardies_code'] . "'")); $attendance_title = $attendance_title[1]['TITLE']; $count = 0; foreach ($attendance_RET[$student_id][$_REQUEST['ytd_tardies_code']] as $mp_abs) { foreach ($mp_abs as $abs) { $count++; } } DrawHeader($attendance_title . ' this year: ' . $count, $mp_tardies); $count_lines++; } elseif ($_REQUEST['elements']['mp_tardies'] == 'Y') { DrawHeader($mp_tardies); $count_lines++; } ListOutputPrint($grades_RET, $columns, '', '', array(), array(), array('print' => false)); if ($_REQUEST['elements']['comments'] == 'Y' && ($comments_arr_key || count($comments_arr))) { $gender = substr($mps[key($mps)][1]['GENDER'], 0, 1); $personalizations = array('^n' => $mps[key($mps)][1]['NICKNAME'] ? $mps[key($mps)][1]['NICKNAME'] : $mps[key($mps)][1]['FIRST_NAME'], '^s' => $gender == 'M' ? 'his' : ($gender == 'F' ? 'her' : 'his/her')); echo '<TABLE width=100%><TR><TD colspan=2><b>Explanation of Comment Codes</b></TD>'; $i = 0; if ($comments_arr_key) { foreach ($commentsA_select as $key => $comment) { if ($i++ % 3 == 0) { echo '</TR><TR valign=top>'; } echo '<TD>(' . ($key != ' ' ? $key : '·') . '): ' . $comment[2] . '</TD>'; } } foreach ($comments_arr as $comment => $so) { if ($i++ % 3 == 0) {
$enroll_RET[$i]['ENROLLMENT_CODE'] = $enrollment['ENROLLMENT_CODE'] ? $enrollment['ENROLLMENT_CODE'] : '--'; $enroll_RET[$i]['END_DATE'] = $enrollment['END_DATE'] ? $enrollment['END_DATE'] : '--'; $enroll_RET[$i]['DROP_CODE'] = $enrollment['DROP_CODE'] ? $enrollment['DROP_CODE'] : '--'; $enroll_RET[$i]['SCHOOL_ID'] = $enrollment['SCHOOL_ID'] ? $enrollment['SCHOOL_ID'] : '--'; } echo '<table border=0>'; echo '<tr><td>Student Name :</td>'; echo '<td>' . $enrollment['FULL_NAME'] . '</td></tr>'; echo '<tr><td>Student ID :</td>'; echo '<td>' . $student_id . '</td></tr>'; echo '<tr><td>Alternate ID :</td>'; echo '<td>' . $enrollment['ALT_ID'] . '</td></tr>'; echo '<tr><td>Student Grade :</td>'; echo '<td>' . $enrollment['GRADE_ID'] . '</td></tr>'; echo '</table>'; ListOutputPrint($enroll_RET, $columns, '', '', array(), array(), array('print' => false)); echo '<span style="font-size:13px; font-weight:bold;"></span>'; echo '<!-- NEW PAGE -->'; echo "<div style=\"page-break-before: always;\"></div>"; } PDFStop($handle); } } else { BackPrompt('You must choose at least one student.'); } } if (!$_REQUEST['modfunc']) { DrawBC("Student >> " . ProgramTitle()); if ($_REQUEST['search_modfunc'] == 'list') { echo "<FORM action=ForExport.php?modname={$_REQUEST['modname']}&modfunc=save&include_inactive={$_REQUEST['include_inactive']}&_openSIS_PDF=true&head_html=Student+Report+Card method=POST target=_blank>"; }
} if ($_REQUEST['fields']) { foreach ($_REQUEST['fields'] as $field => $on) { $columns[$field] = $fields_list[$field]; if ($custom_RET[substr($field, 7)][1]['TYPE'] == 'date' && !$extra['functions'][$field]) { $extra['functions'][$field] = 'ProperDate'; } elseif ($custom_RET[substr($field, 7)][1]['TYPE'] == 'codeds' && !$extra['functions'][$field]) { $extra['functions'][$field] = 'DeCodeds'; } } $RET = GetStuList($extra); if ($extra['array_function'] && function_exists($extra['array_function'])) { $extra['array_function']($RET); } echo "<html><link rel='stylesheet' type='text/css' href='styles/export.css'><body style=\" font-family:Arial; font-size:12px;\">"; ListOutputPrint($RET, $columns, $extra['singular'] ? $extra['singular'] : 'Student', $extra['plural'] ? $extra['plural'] : 'Students', array(), $extra['LO_group'], $extra['LO_options']); echo "</body></html>"; } } else { if (!$fields_list) { if (AllowUse('Students/Student.php&category_id=1')) { $fields_list['General'] = array('FULL_NAME' => Preferences('NAME') == 'Common' ? 'Last, Common' : 'Last, First M', 'FIRST_NAME' => 'First', 'FIRST_INIT' => 'First Initial', 'LAST_NAME' => 'Last', 'MIDDLE_NAME' => 'Middle', 'NAME_SUFFIX' => 'Suffix', 'STUDENT_ID' => 'Student ID', 'GRADE_ID' => 'Grade', 'SCHOOL_ID' => 'School', 'NEXT_SCHOOL' => 'Rolling / Retention Options', 'CALENDAR_ID' => 'Calendar', 'USERNAME' => 'Username', 'PASSWORD' => 'Password'); } if (AllowUse('Students/Student.php&category_id=3')) { $fields_list['Address'] = array('ADDRESS' => 'Address', 'CITY' => 'City', 'STATE' => 'State', 'ZIPCODE' => 'Zip Code', 'PHONE' => 'Home Phone', 'MAIL_ADDRESS' => 'Mailing Address', 'MAIL_CITY' => 'Mailing City', 'MAIL_STATE' => 'Mailing State', 'MAIL_ZIPCODE' => 'Mailing Zipcode', 'PARENTS' => 'Contacts'); $categories_RET = DBGet(DBQuery("SELECT ID,TITLE FROM ADDRESS_FIELD_CATEGORIES ORDER BY SORT_ORDER")); $custom_RET = DBGet(DBQuery("SELECT TITLE,ID,TYPE,CATEGORY_ID FROM ADDRESS_FIELDS ORDER BY SORT_ORDER"), array(), array('CATEGORY_ID')); foreach ($categories_RET as $category) { foreach ($custom_RET[$category['ID']] as $field) { $fields_list['Address']['ADDRESS_' . $field['ID']] = str_replace("'", ''', $field['TITLE']); }
include '../../RedirectModulesInc.php'; if ($_REQUEST['modfunc'] == 'save') { if (count($_REQUEST['st_arr'])) { $st_list = '\'' . implode('\',\'', $_REQUEST['st_arr']) . '\''; $extra['WHERE'] = ' AND s.STUDENT_ID IN (' . $st_list . ')'; $extra['FROM'] = ' ,students_join_people sjp,people p,student_address sa'; $extra['SELECT'] = ' ,sjp.EMERGENCY_TYPE AS CONTACT_TYPE,sjp.RELATIONSHIP AS RELATION,CONCAT(p.Last_Name," " ,p.First_Name) AS RELATION_NAME,sa.STREET_ADDRESS_2 as STREET,sa.STREET_ADDRESS_1 as ADDRESS,sa.CITY,sa.STATE,sa.ZIPCODE AS ZIP,p.WORK_PHONE,p.HOME_PHONE,p.CELL_PHONE,p.EMAIL AS EMAIL_ID'; $extra['WHERE'] .= ' AND sjp.student_id=ssm.student_id AND sjp.STUDENT_ID=sa.STUDENT_ID AND sjp.PERSON_ID=sa.PEOPLE_ID AND sjp.PERSON_ID=p.STAFF_ID'; $extra['ORDER'] = ' ,sa.ID'; $RET = GetStuList($extra); if (count($RET)) { $column_name = array('STUDENT_ID' => 'Student ID', 'ALT_ID' => 'Alternate ID', 'FULL_NAME' => 'Student', 'CONTACT_TYPE' => 'Type', 'RELATION' => 'Relation', 'RELATION_NAME' => 'Relation\'s Name', 'STREET' => 'Street', 'ADDRESS' => 'Address', 'CITY' => 'City', 'STATE' => 'State', 'ZIP' => 'Zip', 'WORK_PHONE' => 'Work Phone', 'HOME_PHONE' => 'Home Phone', 'CELL_PHONE' => 'Cell Phone', 'EMAIL_ID' => 'Email Address'); $singular = 'Student Contact'; $plural = 'Student Contacts'; $options = array('search' => false); ListOutputPrint($RET, $column_name, $singular, $plural, $link = false, $group = false, $options); } else { ShowErrPhp('No Contacts were found.'); for_error(); } } else { ShowErrPhp('You must choose at least one student.'); for_error(); } unset($_SESSION['student_id']); $_REQUEST['modfunc'] = true; } if (!$_REQUEST['modfunc']) { DrawBC("Students >> " . ProgramTitle()); if ($_REQUEST['search_modfunc'] == 'list') { echo "<FORM action=ForExport.php?modname={$_REQUEST['modname']}&modfunc=save&include_inactive={$_REQUEST['include_inactive']}&_search_all_schools={$_REQUEST['_search_all_schools']}&_openSIS_PDF=true target=_blank method=POST>";