コード例 #1
0
function _makeOptionsInput($value, $name)
{
    global $THIS_RET, $portal_poll_id;
    static $OptionNb = 0;
    if ($THIS_RET['ID']) {
        $id = $THIS_RET['ID'];
        $portal_poll_id = $THIS_RET['PORTAL_POLL_ID'];
    } else {
        $portal_poll_id = 'new';
        $id = 'new' . $OptionNb;
    }
    if ($portal_poll_id == $old_portal_poll_id) {
        $OptionNb++;
    }
    $old_portal_poll_id = $portal_poll_id;
    $type_options = array('multiple_radio' => _('Select One from Options'), 'multiple' => _('Select Multiple from Options'));
    return '<TR' . ($portal_poll_id == 'new' ? ' id="newOption_0"' : '') . '><TD>' . TextInput($THIS_RET['QUESTION'], "values[{$portal_poll_id}][{$id}][QUESTION]", '', 'maxlength=255 size=20') . '</TD><TD>' . TextareaInput($value, "values[{$portal_poll_id}][{$id}][{$name}]", '', 'rows=3 cols=20') . ($portal_poll_id == 'new' ? '<BR />' . _('* one per line') : '') . '</TD><TD>' . SelectInput($THIS_RET['TYPE'], "values[{$portal_poll_id}][{$id}][TYPE]", '', $type_options, false) . '</TD></TR>';
}
コード例 #2
0
function _makeContentInput($value, $name)
{
    global $THIS_RET;
    if ($THIS_RET['ID']) {
        $id = $THIS_RET['ID'];
    } else {
        $id = 'new';
    }
    $THIS_RET['ID'];
    return TextareaInput($value, "values[{$id}][{$name}]", '', 'rows=8 cols=55');
}
コード例 #3
0
ファイル: Assignments.php プロジェクト: SysBind/opensis-ml
     }
     echo "&table=gradebook_assignments method=POST>";
     DrawHeader($title, $delete_button . '<INPUT type=submit value=' . _('Save') . ' onclick="formcheck_assignments();">');
     $header .= '<TABLE cellpadding=3 bgcolor=#F0F0F1 width=100%>';
     $header .= '<TR>';
     $header .= '<TD>' . TextInput($RET['TITLE'], 'tables[' . $_REQUEST['assignment_id'] . '][TITLE]', ($RET['TITLE'] ? '' : '<FONT color=red>') . '' . _('Title') . '' . ($RET['TITLE'] ? '' : '</FONT>'), 'size=36') . '</TD>';
     $header .= '<TD>' . TextInput($RET['POINTS'], 'tables[' . $_REQUEST['assignment_id'] . '][POINTS]', ($RET['POINTS'] != '' ? '' : '<FONT color=red>') . '' . _('Points') . '' . ($RET['POINTS'] ? '' : '</FONT>'), ' size=4 maxlength=4') . '</TD>';
     $header .= '<TD>' . CheckboxInput($RET['COURSE_ID'], 'tables[' . $_REQUEST['assignment_id'] . '][COURSE_ID]', '' . _('Apply to all Periods for this Course') . '') . '</TD>';
     foreach ($types_RET as $type) {
         $assignment_type_options[$type['ASSIGNMENT_TYPE_ID']] = $type['TITLE'];
     }
     $header .= '<TD>' . SelectInput($RET['ASSIGNMENT_TYPE_ID'] ? $RET['ASSIGNMENT_TYPE_ID'] : $_REQUEST['assignment_type_id'], 'tables[' . $_REQUEST['assignment_id'] . '][ASSIGNMENT_TYPE_ID]', '' . _('Assignment Type') . '', $assignment_type_options, false) . '</TD>';
     $header .= '</TR><TR>';
     $header .= '<TD valign=top>' . DateInput($new && Preferences('DEFAULT_ASSIGNED', 'Gradebook') == 'Y' ? DBDate() : $RET['ASSIGNED_DATE'], 'tables[' . $_REQUEST['assignment_id'] . '][ASSIGNED_DATE]', '' . _('Assigned') . '', !$new) . '</TD>';
     $header .= '<TD valign=top>' . DateInput($new && Preferences('DEFAULT_DUE', 'Gradebook') == 'Y' ? DBDate() : $RET['DUE_DATE'], 'tables[' . $_REQUEST['assignment_id'] . '][DUE_DATE]', '' . _('Due') . '', !$new) . '</TD>';
     $header .= '<TD rowspan=2 colspan=2>' . TextareaInput($RET['DESCRIPTION'], 'tables[' . $_REQUEST['assignment_id'] . '][DESCRIPTION]', '' . _('Description') . '') . '</TD>';
     $header .= '</TR>';
     //		$header .= '<TR><TD valign=top colspan=2>'.($RET['DATE_ERROR']=='Y'?'<Font color=red>Due date earlier than assigned date!</FONT>':'').'</TD></TR>';
     $header .= '</TABLE>';
 } elseif ($_REQUEST['assignment_type_id']) {
     echo "<FORM name=F3 action=Modules.php?modname={$_REQUEST['modname']}&table=gradebook_assignment_types";
     if ($_REQUEST['assignment_type_id'] != 'new') {
         echo "&assignment_type_id={$_REQUEST['assignment_type_id']}";
     }
     echo " method=POST>";
     DrawHeader($title, $delete_button . '<INPUT type=submit value=' . _('Save') . ' onclick="formcheck_assignments();">');
     $header .= '<TABLE cellpadding=3 bgcolor=#F0F0F1 width=100%>';
     $header .= '<TR>';
     $header .= '<TD>' . TextInput($RET['TITLE'], 'tables[' . $_REQUEST['assignment_type_id'] . '][TITLE]', '' . _('Title') . '', 'size=36') . '</TD>';
     if ($programconfig['WEIGHT'] == 'Y') {
         $header .= '<TD>' . TextInput($RET['FINAL_GRADE_PERCENT'], 'tables[' . $_REQUEST['assignment_type_id'] . '][FINAL_GRADE_PERCENT]', ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '<FONT color=red>') . '' . _('Percent of Final Grade') . '' . ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '</FONT>')) . '</TD>';