echo '<legend><b>Score Breakoff Points</b></legend>'; echo '<TABLE cellspacing=1><TR><TD>'; foreach ($grades as $course_period_id => $cp_grades) { $table = '<TABLE>'; $table .= '<TR><TD rowspan=2 align=right width=100>' . $cp_grades[1]['COURSE_TITLE'] . ' - ' . substr($cp_grades[1]['CP_TITLE'], 0, strrpos(str_replace(' - ', ' ^ ', $cp_grades[1]['CP_TITLE']), '^')) . '</TD>'; foreach ($cp_grades as $grade) { $table .= '<TD><B>' . $grade['TITLE'] . '</B></TD>'; } $table .= '</TR>'; $table .= '<TR>'; foreach ($cp_grades as $grade) { $table .= '<TD><INPUT type=text name=values[' . $course_period_id . '-' . $grade['ID'] . '] value="' . $programconfig[$course_period_id . '-' . $grade['ID']] . '" size=3 maxlength=5></TD>'; } $table .= '</TR>'; $table .= '</TABLE>'; echo DrawRoundedRect($table); echo '</TD></TR><TR><TD>'; } echo '</TD></TR></TABLE>'; echo '</fieldset></TD>'; } echo '<TD width=1></TD></TR><TR><TD colspan=3>'; echo '</TD></TR><TR><TD width=1></TD>'; $quarters = DBGet(DBQuery('SELECT TITLE,MARKING_PERIOD_ID,SEMESTER_ID,DOES_GRADES,DOES_EXAM FROM school_quarters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'), array(), array('SEMESTER_ID')); if ($quarters) { $semesters = DBGet(DBQuery('SELECT TITLE,MARKING_PERIOD_ID,DOES_GRADES,DOES_EXAM FROM school_semesters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER')); } else { $semesters = DBGet(DBQuery('SELECT TITLE,MARKING_PERIOD_ID, DOES_GRADES, NULL AS DOES_EXAM FROM school_semesters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER')); } if ($semesters) { $year = DBGet(DBQuery('SELECT TITLE,MARKING_PERIOD_ID,DOES_GRADES,DOES_EXAM FROM school_years WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'));
if ($edit_fgp) { $table .= '<TD><INPUT type=text name=values[FY-E' . $sem['MARKING_PERIOD_ID'] . '] value="' . $programconfig['FY-E' . $sem['MARKING_PERIOD_ID']] . '" size=3 maxlength=6></TD>'; } else { $table .= '<TD><font color=gray>' . $programconfig['FY-E' . $sem['MARKING_PERIOD_ID']] . '<INPUT type=hidden name=values[FY-E' . $sem['MARKING_PERIOD_ID'] . '] value="' . $programconfig['FY-E' . $sem['MARKING_PERIOD_ID']] . '" size=3 maxlength=6></TD>'; } $total += $programconfig['FY-E' . $sem['MARKING_PERIOD_ID']]; } } if ($year[1]['DOES_EXAM'] == 'Y') { if ($edit_fgp) { $table .= '<TD><INPUT type=text name=values[FY-E' . $year[1]['MARKING_PERIOD_ID'] . '] value="' . $programconfig['FY-E' . $year[1]['MARKING_PERIOD_ID']] . '" size=3 maxlength=6></TD>'; } else { $table .= '<TD><font color=gray>' . $programconfig['GY-E' . $year['MARKING_PERIOD_ID']] . '<INPUT type=hidden name=values[FY-E' . $year[1]['MARKING_PERIOD_ID'] . '] value="' . $programconfig['FY-E' . $year[1]['MARKING_PERIOD_ID']] . '" size=3 maxlength=6></TD>'; } $total += $programconfig['FY-E' . $year[1]['MARKING_PERIOD_ID']]; } if ($total != 100) { $table .= '<TD><FONT color=red>' . _('Total is not 100%!') . '</FONT></TD>'; } $table .= '</TR>'; $table .= '</TABLE>'; echo '<TR><TD colspan=3>' . DrawRoundedRect($table, '', Preferences('HEADER')) . '</TD></TR>'; echo "<INPUT type=hidden name=sqlsyear value='" . UserSchool() . "'>"; } echo '</TABLE>'; echo '</fieldset></TD>'; echo '<TD width=1></TD></TR>'; echo '</TABLE>'; PopTable('footer'); echo '<CENTER><INPUT type=submit value="' . _('Save') . '"></CENTER>'; echo '</FORM>';