本文整理汇总了PHP中TextInput函数的典型用法代码示例。如果您正苦于以下问题:PHP TextInput函数的具体用法?PHP TextInput怎么用?PHP TextInput使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TextInput函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MLTextInput
function MLTextInput($value, $name, $title = '', $options = '', $div = true)
{
global $CentreLocales;
if (sizeof($CentreLocales) < 2) {
return TextInput($value, $name, $title, $options, $div);
}
if (Preferences('HIDDEN') != 'Y') {
$div = false;
}
// mab - support array style $option values
if (AllowEdit() && !$_REQUEST['_CENTRE_PDF']) {
$value1 = is_array($value) ? $value[1] : $value;
$value = is_array($value) ? $value[0] : $value;
if (strpos($options, 'size') === false && $value != '') {
$options .= ' size=' . strlen($value);
} elseif (strpos($options, 'size') === false) {
$options .= ' size=10';
}
// ng - foreach possible language
$ret = "<DIV><INPUT type=hidden id={$name} name={$name} value='{$value}'>";
foreach ($CentreLocales as $id => $loc) {
$ret .= "<IMG src='assets/flags/{$loc}.png' height=20px width=20px />";
$ret .= TextInput(ParseMLField($value, $loc), 'ML_' . $name . '[' . $loc . ']', '', $options . " onchange=\"javascript:setMLvalue('{$name}','" . ($id == 0 ? '' : $loc) . "',this.value);\"", false);
$ret .= "<BR>";
}
$ret .= "</DIV>";
}
$ret .= $title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '';
return $ret;
}
示例2: MLTextInput
function MLTextInput($value, $name, $title = '', $options = '', $div = true)
{
global $RosarioLocales;
if (sizeof($RosarioLocales) < 2) {
return TextInput($value, $name, $title, $options, $div);
}
if (Preferences('HIDDEN') != 'Y') {
$div = false;
}
// mab - support array style $option values
if (AllowEdit() && !isset($_REQUEST['_ROSARIO_PDF'])) {
$value1 = is_array($value) ? $value[1] : $value;
$value = is_array($value) ? $value[0] : $value;
if (mb_strpos($options, 'size') === false && $value != '') {
$options .= ' size=' . mb_strlen($value) / (mb_substr_count($value, '|') + 1);
} elseif (mb_strpos($options, 'size') === false) {
$options .= ' size=10';
}
// ng - foreach possible language
$ret = '<DIV><INPUT type="hidden" id="' . $name . '" name="' . $name . '" value="' . $value . '" />';
foreach ($RosarioLocales as $id => $loc) {
$ret .= '<label><IMG src="assets/flags/' . $loc . '.png" height="20" style="vertical-align:middle;" /> ';
$ret .= TextInput(ParseMLField($value, $loc), 'ML_' . $name . '[' . $loc . ']', '', $options . " onchange=\"javascript:setMLvalue('{$name}','" . ($id == 0 ? '' : $loc) . "',this.value);\"", false);
$ret .= '</label><BR />';
}
$ret .= '</DIV>';
}
//modif FRancois: css WPadmin
// $ret .= ($title!=''?'<BR />'.(mb_strpos(mb_strtolower($title),'<span ')===false?'<span class="legend-gray">':'').$title.(mb_strpos(mb_strtolower($title),'<span ')===false?'</span>':'').'':'');
$ret .= $title != '' ? (mb_strpos(mb_strtolower($title), '<span ') === false ? '<span class="legend-gray">' : '') . $title . (mb_strpos(mb_strtolower($title), '<span ') === false ? '</span>' : '') : '';
return $ret;
}
示例3: makeTextInput
function makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
return TextInput($value, 'values[' . $id . '][' . $name . ']');
}
示例4: _makeTextInput
function _makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['PERIOD_ID']) {
$id = $THIS_RET['PERIOD_ID'];
} else {
$id = 'new';
}
if ($name != 'TITLE') {
$extra = 'size=5 maxlength=10';
}
return TextInput($value, 'values[' . $id . '][' . $name . ']', '', $extra);
}
示例5: _makePaymentsTextInput
function _makePaymentsTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name == 'AMOUNT') {
$extra = 'size=5 maxlength=10';
}
return TextInput($value, 'values[' . $id . '][' . $name . ']', '', $extra);
}
示例6: makeTextInput
function makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name == 'SHORT_NAME') {
$extra = 'size=5 maxlength=10';
} elseif ($name == 'SORT_ORDER') {
$extra = 'size=5 maxlength=10';
}
return TextInput($value, 'values[' . $id . '][' . $name . ']', '', $extra);
}
示例7: makeTextInput
function makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name != 'TITLE') {
$extra = 'size=5 maxlength=3';
}
if ($name == 'SORT_ORDER') {
$comment = '<!-- ' . $value . ' -->';
}
return $comment . TextInput($value, 'values[' . $id . '][' . $name . ']', '', $extra);
}
示例8: makeTextInput
function makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name == 'VALUE') {
$extra = 'size=15 maxlength=25';
} elseif ($name == 'COMMENT') {
$extra = 'size=15 maxlength=100';
} elseif ($name == 'SORT_ORDER') {
if ($id == 'new' || $THIS_RET['SORT_ORDER'] == '') {
$extra = 'size=5 maxlength=5 onkeydown="return numberOnly(event);"';
} else {
$extra = 'size=5 maxlength=5 onkeydown=\\"return numberOnly(event);\\"';
}
}
return TextInput($value, "values[{$id}][{$name}]", '', $extra);
}
示例9: _makeAutoSelectInput
function _makeAutoSelectInput($column, $name, $request = 'staff')
{
global $value, $field;
if ($_REQUEST['staff_id'] == 'new' && $field['DEFAULT_SELECTION']) {
$value[$column] = $field['DEFAULT_SELECTION'];
$div = false;
$req = $field['REQUIRED'] == 'Y' ? array('<FONT color=red>', '</FONT>') : array('', '');
} else {
$div = true;
$req = $field['REQUIRED'] == 'Y' && ($value[$column] == '' || $value[$column] == '---') ? array('<FONT color=red>', '</FONT>') : array('', '');
}
// build the select list...
// get the standard selects
if ($field['SELECT_OPTIONS']) {
$field['SELECT_OPTIONS'] = str_replace("\n", "\r", str_replace("\r\n", "\r", $field['SELECT_OPTIONS']));
$select_options = explode("\r", $field['SELECT_OPTIONS']);
} else {
$select_options = array();
}
if (count($select_options)) {
foreach ($select_options as $option) {
if ($option != '') {
$options[$option] = $option;
}
}
}
// add the 'new' option, is also the separator
$options['---'] = '---';
if ($field['TYPE'] == 'autos') {
// add values found in current and previous year
$options_RET = DBGet(DBQuery('SELECT DISTINCT s.CUSTOM_' . $field[ID] . ',upper(s.CUSTOM_' . $field[ID] . ') AS KEEY FROM staff s,staff_school_relationship ssr WHERE s.STAFF_ID=ssr.STAFF_ID AND (ssr.SYEAR=\'' . UserSyear() . '\' OR ssr.SYEAR=\'' . (UserSyear() - 1) . '\') AND s.CUSTOM_' . $field[ID] . ' IS NOT NULL ORDER BY KEEY'));
if (count($options_RET)) {
foreach ($options_RET as $option) {
if ($option['CUSTOM_' . $field['ID']] != '' && !$options[$option['CUSTOM_' . $field['ID']]]) {
$options[$option['CUSTOM_' . $field['ID']]] = array($option['CUSTOM_' . $field['ID']], '<FONT color=blue>' . $option['CUSTOM_' . $field['ID']] . '</FONT>');
}
}
}
}
// make sure the current value is in the list
if ($value[$column] != '' && !$options[$value[$column]]) {
$options[$value[$column]] = array($value[$column], '<FONT color=' . ($field['TYPE'] == 'autos' ? 'blue' : 'green') . '>' . $value[$column] . '</FONT>');
}
if ($value[$column] != '---' && count($options) > 1) {
$extra = 'style="max-width:250;"';
return SelectInput($value[$column], $request . '[' . $column . ']', $req[0] . $name . $req[1], $options, 'N/A', $extra, $div);
} else {
return TextInput($value[$column] == '---' ? array('---', '<FONT color=red>---</FONT>') : '' . $value[$column], $request . '[' . $column . ']', $req[0] . $name . $req[1], $size, $div);
}
}
示例10: makeTextInput
function makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name != 'TITLE') {
$extra = 'size=5 maxlength=5 class=cell_small';
} else {
$extra = 'class=cell_wide ';
}
return $comment . TextInput($value, 'values[' . $id . '][' . $name . ']', '', $extra);
}
示例11: _makePercent
function _makePercent($value, $column)
{
global $THIS_RET, $current_RET, $grades_RET, $student_count, $tabindex, $import_RET;
if ($column == 'GRADE_PERCENT') {
if (!isset($_REQUEST['_openSIS_PDF'])) {
$student_count++;
$tabindex = $student_count;
if ($import_RET[$THIS_RET['STUDENT_ID']]) {
$return = TextInput($import_RET[$THIS_RET['STUDENT_ID']][1]['GRADE_PERCENT'] == '' ? '' : $import_RET[$THIS_RET['STUDENT_ID']][1]['GRADE_PERCENT'] + 0 . '%', "values[{$THIS_RET['STUDENT_ID']}][percent]", '', (0 ? 'readonly ' : '') . 'size=6 maxlength=6 tabindex=' . $tabindex, false);
} else {
$return = TextInput($current_RET[$THIS_RET['STUDENT_ID']][1]['GRADE_PERCENT'] == '' ? '' : $current_RET[$THIS_RET['STUDENT_ID']][1]['GRADE_PERCENT'] + 0 . '%', "values[{$THIS_RET['STUDENT_ID']}][percent]", '', (0 ? 'readonly ' : '') . 'size=6 maxlength=6 tabindex=' . $tabindex, !$current_RET[$THIS_RET['STUDENT_ID']][1]['DIV']);
}
} else {
$return = $current_RET[$THIS_RET['STUDENT_ID']][1]['GRADE_PERCENT'] == '' ? '' : $current_RET[$THIS_RET['STUDENT_ID']][1]['GRADE_PERCENT'] + 0 . '%';
}
} elseif ($column == 'REPORT_CARD_GRADE') {
$return = '<b>' . $grades_RET[$current_RET[$THIS_RET['STUDENT_ID']][1]['REPORT_CARD_GRADE_ID']][1]['TITLE'] . '</b>';
}
return $return;
}
示例12: unset
$title = $RET['TITLE'];
}
if (clean_param($_REQUEST['marking_period_id'], PARAM_ALPHANUM)) {
if ($err_msg) {
echo "<b style='color:red'>" . $err_msg . "</b>";
unset($err_msg);
}
echo "<FORM name=marking_period id=marking_period action=Modules.php?modname={$_REQUEST['modname']}&mp_term={$_REQUEST['mp_term']}&marking_period_id={$_REQUEST['marking_period_id']}&year_id={$_REQUEST['year_id']}&semester_id={$_REQUEST['semester_id']}&quarter_id={$_REQUEST['quarter_id']} method=POST>";
PopTable('header', $title);
$header .= '<TABLE cellspacing=0 cellpadding=3 border=0>';
$header .= '<TR><td class=lable >Title</td><TD>' . TextInput($RET['TITLE'], 'tables[' . $_REQUEST['marking_period_id'] . '][TITLE]', '', 'class=cell_floating') . '</TD></tr>';
$header .= '<TR><td class=lable>Short Name</td><TD>' . TextInput($RET['SHORT_NAME'], 'tables[' . $_REQUEST['marking_period_id'] . '][SHORT_NAME]', '', 'class=cell_floating') . '</TD></tr>';
if (clean_param($_REQUEST['marking_period_id'], PARAM_ALPHANUM) == 'new') {
$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>';
} else {
$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>';
$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') {
示例13: DBGet
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
if ($_REQUEST['modfunc'] == 'update') {
if ($_REQUEST['activity']) {
$TOTAL_COUNT = DBGet(DBQuery('SELECT COUNT(ACTIVITY_DAYS) AS TOTAL_COUNT FROM system_preference_misc'));
$TOTAL_COUNT = $TOTAL_COUNT[1]['TOTAL_COUNT'];
if ($TOTAL_COUNT == 0 && $_REQUEST['activity']['ACTIVITY_DAYS']) {
DBQuery('INSERT INTO system_preference_misc (ACTIVITY_DAYS) VALUES(\'' . $_REQUEST['activity']['ACTIVITY_DAYS'] . '\')');
} else {
if ($TOTAL_COUNT == 1) {
$sql = 'UPDATE system_preference_misc SET ';
foreach ($_REQUEST['activity'] as $column_name => $value) {
$sql .= $column_name = '\'' . str_replace("\\'", "''", str_replace("`", "''", $value)) . '\',';
}
$sql = substr($sql, 0, -1) . ' WHERE 1=1';
DBQuery($sql);
}
}
}
unset($_REQUEST['activity']);
}
$activity_RET = DBGet(DBQuery('SELECT ACTIVITY_DAYS FROM system_preference_misc LIMIT 1'));
$activity = $activity_RET[1];
echo "<FORM name=activity id=activity action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update method=POST>";
echo '<table>';
echo '<tr><td>Maximum Inactive Days Allowed:</td><td>' . TextInput($activity['ACTIVITY_DAYS'], 'activity[ACTIVITY_DAYS]', '', 'class=cell_floating') . '</td></tr>';
echo '<tr><td><CENTER>' . SubmitButton('Save', '', 'class=btn_medium') . '</CENTER></td></tr>';
echo '</table>';
echo '</FORM>';
示例14: array
$type_options = array('select' => 'Pull-Down', 'autos' => 'Auto Pull-down', 'edits' => 'Edit Pull-Down', 'text' => 'Text', 'radio' => 'Checkbox', 'codeds' => 'Coded Pull-Down', 'numeric' => 'Number', 'multiple' => 'Select Multiple from Options', 'date' => 'Date', 'textarea' => 'Long Text');
} else {
$type_options = array('select' => 'Pull-Down', 'autos' => 'Auto Pull-down', 'edits' => 'Edit Pull-Down', 'text' => 'Text', 'radio' => 'Checkbox', 'codeds' => 'Coded Pull-Down', 'numeric' => 'Number', 'multiple' => 'Select Multiple from Options', 'date' => 'Date', 'textarea' => 'Long Text');
}
$header .= '<TD>' . SelectInput($RET['TYPE'], 'tables[' . $_REQUEST['id'] . '][TYPE]', 'Data Type', $type_options, false, 'id=type onchange="formcheck_student_studentField_F1_defalut();"') . '</TD>';
if ($_REQUEST['id'] != 'new' && $RET['TYPE'] != 'select' && $RET['TYPE'] != 'autos' && $RET['TYPE'] != 'edits' && $RET['TYPE'] != 'text') {
$_openSIS['allow_edit'] = $allow_edit;
$_openSIS['AllowEdit'][$modname] = $AllowEdit;
}
foreach ($categories_RET as $type) {
$categories_options[$type['ID']] = $type['TITLE'];
}
if ($_REQUEST['id'] == 'new') {
$header .= '<TD>' . TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['id'] . '][SORT_ORDER]', 'Sort Order', 'onkeydown="return numberOnly(event);"') . '</TD>';
} else {
$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);
示例15: _makeExtraCols
function _makeExtraCols($assignment_id, $column)
{
global $THIS_RET, $total_points, $current_RET, $old_student_id, $student_count, $tabindex, $count_students, $max_allowed;
$rounding = DBGet(DBQuery('SELECT VALUE FROM program_user_config WHERE USER_ID=\'' . User('STAFF_ID') . '\' AND TITLE=\'ROUNDING\' AND PROGRAM=\'Gradebook\' '));
if (count($rounding)) {
$_SESSION['ROUNDING'] = $rounding[1]['VALUE'];
}
$days_left = floor((strtotime($THIS_RET['DUE_' . $assignment_id], 0) - strtotime($THIS_RET['START_DATE'], 0)) / 86400);
if ($days_left >= 1) {
if ($THIS_RET['STUDENT_ID'] != $old_student_id) {
$student_count++;
$tabindex = $student_count;
$old_student_id = $THIS_RET['STUDENT_ID'];
} else {
$tabindex += $count_students;
}
if ($current_RET[$THIS_RET['STUDENT_ID']][$assignment_id][1]['POINTS'] == '-1') {
$points = '*';
} elseif (strpos($current_RET[$THIS_RET['STUDENT_ID']][$assignment_id][1]['POINTS'], '.')) {
$points = rtrim(rtrim($current_RET[$THIS_RET['STUDENT_ID']][$assignment_id][1]['POINTS'], '0'), '.');
} else {
$points = $current_RET[$THIS_RET['STUDENT_ID']][$assignment_id][1]['POINTS'];
}
if ($_SESSION['ROUNDING'] == 'UP') {
$points_m = ceil($points);
} elseif ($_SESSION['ROUNDING'] == 'DOWN') {
$points_m = floor($points);
} elseif ($_SESSION['ROUNDING'] == 'NORMAL') {
$points_m = round($points);
} else {
$points_m = $points;
}
$make_letter_points = $points_m / 100;
$tot_point = $total_points[$assignment_id];
if ($total_points[$assignment_id] != 0) {
if ($points != '*') {
if ($points != '') {
$rounding = DBGet(DBQuery('SELECT VALUE FROM program_user_config WHERE USER_ID=\'' . User('STAFF_ID') . '\' AND TITLE=\'ROUNDING\' AND PROGRAM=\'Gradebook\' '));
$points_r = $points_m / $tot_point * 100;
if ($rounding[1]['ROUNDING'] == 'UP') {
$points_r = ceil($points_r);
} elseif ($rounding[1]['ROUNDING'] == 'DOWN') {
$points_r = floor($points_r);
} elseif ($rounding[1]['ROUNDING'] == 'NORMAL') {
$points_r = round($points_r);
} else {
$points_r = round($points_r, 2);
}
return '<TABLE border=0 cellspacing=0 cellpadding=0 class=LO_field><TR align=center><TD>' . TextInput($points, 'values[' . $THIS_RET['STUDENT_ID'] . '][' . $assignment_id . '][POINTS]', '', ' size=2 maxlength=7 tabindex=' . $tabindex) . '<HR>' . $total_points[$assignment_id] . '</TD><TD> ' . ($THIS_RET['D' . $assignment_id] || $points != '' ? $points > $total_points[$assignment_id] * $max_allowed ? '<FONT color=red>' : '' : '<FONT color=gray>') . $points_r . '%' . ($THIS_RET['D' . $assignment_id] || $points != '' ? $points > $total_points[$assignment_id] * $max_allowed ? '</FONT>' : '' : '') . '<BR> <B>' . _makeLetterGrade($points_m / $tot_point) . '</B>' . ($THIS_RET['D' . $assignment_id] || $points != '' ? '' : '</FONT>') . '</TD></TR></TABLE>';
} else {
return '<TABLE border=0 cellspacing=0 cellpadding=0 class=LO_field><TR align=center><TD>' . TextInput($points, 'values[' . $THIS_RET['STUDENT_ID'] . '][' . $assignment_id . '][POINTS]', '', ' size=2 maxlength=7 tabindex=' . $tabindex) . '<HR>' . $total_points[$assignment_id] . '</TD><TD> ' . ($THIS_RET['D' . $assignment_id] || $points != '' ? $points > $total_points[$assignment_id] * $max_allowed ? '<FONT color=red>' : '' : '<FONT color=gray>') . ' Not Graded</TD></TR></TABLE>';
}
} else {
return '<TABLE border=0 cellspacing=0 cellpadding=0 class=LO_field><TR align=center><TD>' . TextInput($points, 'values[' . $THIS_RET['STUDENT_ID'] . '][' . $assignment_id . '][POINTS]', '', ' size=2 maxlength=7 tabindex=' . $tabindex) . '<HR>' . $total_points[$assignment_id] . '</TD><TD> N/A<BR> N/A</TD></TR></TABLE>';
}
} else {
return '<TABLE border=0 cellspacing=0 cellpadding=0 class=LO_field><TR align=center><TD>' . TextInput($points, 'values[' . $THIS_RET['STUDENT_ID'] . '][' . $assignment_id . '][POINTS]', '', ' size=2 maxlength=7 tabindex=' . $tabindex) . '<HR>' . $total_points[$assignment_id] . '</TD><TD> E/C</TD></TR></TABLE>';
}
}
return 'N/A';
}