$mpselect .= '</SELECT>'; echo '</FORM>'; echo "<FORM action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=update&tab_id=" . strip_tags(trim($_REQUEST[tab_id])) . "&mp_id={$mp_id} method=POST>"; $sms_grade_level = TextInput($gmp[$mp_id]['grade_level'], "SMS_GRADE_LEVEL", "", 'size=25 class=cell_floating'); echo '<BR><table width=90%><tr><td >Student:</td><td>' . $displayname . '</td></tr> <tr><td >Weighted GPA:</td><td>' . sprintf('%0.2f', $gmp[$mp_id]['weighted_gpa']) . '</td></tr> <tr> <td >Unweighted GPA:</td><td>' . sprintf('%0.2f', $gmp[$mp_id]['unweighted_gpa']) . '</td></tr> '; if ($mp_id == "0") { $syear = UserSyear(); $sql = 'SELECT MARKING_PERIOD_ID, SYEAR, TITLE, POST_END_DATE FROM marking_periods WHERE SCHOOL_ID = \'' . UserSchool() . '\' ORDER BY POST_END_DATE'; $MPRET = DBGet(DBQuery($sql)); if ($MPRET) { $mpoptions = array(); foreach ($MPRET as $id => $mp) { $mpoptions[$mp['MARKING_PERIOD_ID']] = formatSyear($mp['SYEAR']) . ' ' . $mp['TITLE']; } echo '<tr> <td >New Marking Period:</td><td>' . SelectInput(null, 'new_sms', '', $mpoptions, false, $extra) . '</td></tr>'; echo '<tr> <td >School Name:</td><td>' . TextInput($historyschool[1]['school_name'], "SCHOOL_NAME", "", 'size=35 class=cell_floating ') . '</td></tr> <tr> <td >Grade Level:</td><td>' . $sms_grade_level . '</td> </tr></table>'; // } } else { $selectedmp = $mp_id; if ($historyschool[1]['SCHOOL_NAME']) { $school_name = $historyschool[1]['SCHOOL_NAME']; } else { $get_schoolid = DBGet(DBQuery("SELECT school_id FROM marking_periods WHERE marking_period_id = {$selectedmp}")); if ($get_schoolid[1]['school_id']) { $get_schoolid = DBGet(DBQuery("SELECT title FROM schools WHERE id = {$get_schoolid['1']}[school_id]"));
//modif Francois: add translation //modif Francois: css WPadmin echo '<table class="postbox cellpadding-0 cellspacing-0"><tr><td><h3>' . $displayname . '</h3></td></tr><tr><td><table style="border-collapse:separate; border-spacing:6px;"><tr><td colspan="3" class="center">' . _('Marking Period Statistics') . '</td></tr><tr><td>' . _('GPA') . '</td><td>' . _('Weighted') . ': ' . sprintf('%0.3f', $gmp[$mp_id]['weighted_gpa']) . '</td><td>' . _('Unweighted') . ": " . sprintf('%0.3f', $gmp[$mp_id]['unweighted_gpa']) . '</td></tr>'; // echo "<tr><td>"._('Class Rank GPA')."</td><td>"._('Weighted').": ".sprintf('%0.3f',$gmp[$mp_id]['cr_weighted'])."</td><td>"._('Unweighted').": ".sprintf('%0.3f',$gmp[$mp_id]['cr_unweighted'])."</td></tr></table><BR />"; echo "<tr><td>" . _('Class Rank GPA') . "</td><td>" . _('Weighted') . ": " . sprintf('%0.3f', $gmp[$mp_id]['cr_weighted']) . "</td><td>" . _('Unweighted') . ": " . sprintf('%0.3f', $gmp[$mp_id]['cr_unweighted']) . "</td></tr></table></td></tr></table><BR />"; $sms_grade_level = TextInput($gmp[$mp_id]['grade_level'], "SMS_GRADE_LEVEL", _('Grade Level'), 'size=3 maxlength=3'); if ($mp_id == "0") { $syear = UserSyear(); $sql = "SELECT MARKING_PERIOD_ID, SYEAR, TITLE, POST_END_DATE FROM MARKING_PERIODS WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR BETWEEN '" . sprintf('%d', $syear - 5) . "' AND '{$syear}' ORDER BY POST_END_DATE DESC"; $MPRET = DBGet(DBQuery($sql)); if ($MPRET) { //$mpselect = "<SELECT name=new_sms>"; $mpoptions = array(); foreach ($MPRET as $id => $mp) { //$mpselect .= "<OPTION value=".$mp['MARKING_PERIOD_ID'].">".formatSyear($mp['SYEAR']).' '.$mp['TITLE']."</OPTION>"; $mpoptions[$mp['MARKING_PERIOD_ID']] = formatSyear($mp['SYEAR'], Config('SCHOOL_SYEAR_OVER_2_YEARS')) . ', ' . $mp['TITLE']; } //$mpselect .= '</SELECT>'; //echo $mpselect; echo '<TABLE class="postbox" style="padding:8px;"><TR><TD>'; echo SelectInput(null, 'new_sms', _('New Marking Period'), $mpoptions, false, null); echo '</TD><TD>'; echo $sms_grade_level; echo '</TD></TR></TABLE>'; } } else { echo $sms_grade_level; $tabs = array(); $tabs[] = array('title' => 'Grades', 'link' => "Modules.php?modname={$_REQUEST['modname']}&tab_id=grades&mp_id={$mp_id}"); $tabs[] = array('title' => 'Credits', 'link' => "Modules.php?modname={$_REQUEST['modname']}&tab_id=credits&mp_id={$mp_id}"); //modif Francois: css WPadmin