Exemplo n.º 1
0
$out = '';
$out .= claro_html_tool_title($pageTitle, null, $cmdList);
/**
 * ASSIGNMENT INFOS
 */
$out .= '<p>' . "\n" . '<small>' . "\n" . '<b>' . get_lang('Title') . '</b> : ' . "\n" . $assignment->getTitle() . '<br />' . "\n" . get_lang('<b>From</b> %startDate <b>until</b> %endDate', array('%startDate' => claro_html_localised_date(get_locale('dateTimeFormatLong'), $assignment->getStartDate()), '%endDate' => claro_html_localised_date(get_locale('dateTimeFormatLong'), $assignment->getEndDate()))) . '<br />' . "\n" . '<b>' . get_lang('Submission type') . '</b> : ' . "\n";
if ($assignment->getSubmissionType() == 'TEXT') {
    $out .= get_lang('Text only (text required, no file)');
} elseif ($assignment->getSubmissionType() == 'TEXTFILE') {
    $out .= get_lang('Text with attached file (text required, file optional)');
} else {
    $out .= get_lang('File (file required, description text optional)');
}
$out .= '<br />' . "\n" . '<b>' . get_lang('Submission visibility') . '</b> : ' . "\n" . ($assignment->getDefaultSubmissionVisibility() == 'VISIBLE' ? get_lang('Visible for all users') : get_lang('Only visible for teacher(s) and submitter(s)')) . '<br />' . "\n" . '<b>' . get_lang('Assignment type') . '</b> : ' . "\n" . ($assignment->getAssignmentType() == 'INDIVIDUAL' ? get_lang('Individual') : get_lang('Groups')) . '<br />' . "\n" . '<b>' . get_lang('Allow late upload') . '</b> : ' . "\n" . ($assignment->getAllowLateUpload() == 'YES' ? get_lang('Users can submit after end date') : get_lang('Users can not submit after end date')) . '</small>' . "\n" . '</p>' . "\n";
// description of assignment
if ($assignment->getDescription() != '') {
    $out .= '<b><small>' . get_lang('Description') . '</small></b>' . "\n" . '<blockquote>' . "\n" . '<small>' . "\n" . claro_parse_user_text($assignment->getDescription()) . '</small>' . "\n" . '</blockquote>' . "\n" . '<br />' . "\n";
}
// show to authenticated and anonymous users
if ($textOrFilePresent && ($showAfterEndDate || $showAfterPost)) {
    $out .= '<fieldset>' . "\n" . '<legend>' . '<b>' . get_lang('Feedback') . '</b>' . '</legend>';
    if ($assignment->getAutoFeedbackText() != '') {
        $out .= claro_parse_user_text($assignment->getAutoFeedbackText());
    }
    if ($assignment->getAutoFeedbackFilename() != '') {
        $target = get_conf('open_submitted_file_in_new_window') ? 'target="_blank"' : '';
        $out .= '<p><a href="' . claro_htmlspecialchars(Url::Contextualize($assignment->getAssigDirWeb() . $assignment->getAutoFeedbackFilename())) . '" ' . $target . '>' . $assignment->getAutoFeedbackFilename() . '</a></p>';
    }
    $out .= '</fieldset>' . '<br />' . "\n";
}
if ($is_allowedToEditAll) {
Exemplo n.º 2
0
    }
    if (get_conf('mail_notification', false) && !get_conf('automatic_mail_notification', false)) {
        $cmdList[] = array('img' => 'settings', 'name' => get_lang('Assignments preferences'), 'url' => claro_htmlspecialchars(Url::Contextualize('work_settings.php')));
    }
}
$out = '';
$out .= claro_html_tool_title($nameTools, $helpUrl, $cmdList);
if ($is_allowedToEdit) {
    $out .= $dialogBox->render();
    // Form
    if (isset($displayAssigForm) && $displayAssigForm) {
        $out .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" enctype="multipart/form-data">' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . '<input type="hidden" name="cmd" value="' . $cmdToSend . '" />' . "\n" . claro_form_relay_context() . "\n" . '<fieldset>';
        if (!is_null($assigId)) {
            $out .= '<input type="hidden" name="assigId" value="' . $assigId . '" />' . "\n";
        }
        $out .= '<dl>' . '<dt><label for="title">' . get_lang('Assignment title') . ' <span class="required">*</span></label></dt>' . '<dd><input type="text" name="title" id="title" size="50" maxlength="200" value="' . claro_htmlspecialchars($assignment->getTitle()) . '" /></dd>' . '<dt><label for="description">' . get_lang('Description') . '<br /></label></dt>' . '<dd>' . claro_html_textarea_editor('description', $assignment->getDescription()) . '</dd>' . '<dt>' . get_lang('Submission type') . '</dt>' . '<dd>' . '<input type="radio" name="authorized_content" id="authorizeFile" value="FILE" ' . ($assignment->getSubmissionType() == "FILE" ? 'checked="checked"' : '') . ' />
                <label for="authorizeFile">&nbsp;' . get_lang('File (file required, description text optional)') . '</label>
                <br />
                <input type="radio" name="authorized_content" id="authorizeText" value="TEXT" ' . ($assignment->getSubmissionType() == "TEXT" ? 'checked="checked"' : '') . '/>
                <label for="authorizeText">&nbsp;' . get_lang('Text only (text required, no file)') . '</label>
                <br />
                <input type="radio" name="authorized_content" id="authorizeTextFile" value="TEXTFILE" ' . ($assignment->getSubmissionType() == "TEXTFILE" ? 'checked="checked"' : '') . ' />
                <label for="authorizeTextFile">&nbsp;' . get_lang('Text with attached file (text required, file optional)') . '</label>' . '</dd>' . '<dt>' . get_lang('Assignment type') . '</dt>' . '<dd>' . '<input type="radio" name="assignment_type" id="individual" value="INDIVIDUAL" ' . ($assignment->getAssignmentType() == "INDIVIDUAL" ? 'checked="checked"' : '') . ' />
                <label for="individual">&nbsp;' . get_lang('Individual') . '</label>
                <br />
                <input type="radio" name="assignment_type" id="group" value="GROUP" ' . ($assignment->getAssignmentType() == "GROUP" ? 'checked="checked"' : '') . ' />
                <label for="group">&nbsp;' . get_lang('Groups (from groups tool, only group members can post)') . '</label>' . '</dd>' . '<dt>' . get_lang('Start date') . '</dt>' . '<dd>' . claro_html_date_form('startDay', 'startMonth', 'startYear', $assignment_data['start_date'], 'long') . ' ' . claro_html_time_form('startHour', 'startMinute', $assignment_data['start_date']) . '<p class="notice">' . get_lang('(d/m/y hh:mm)') . '</p>' . '</dd>' . '<dt>' . get_lang('End date') . '</dt>' . '<dd>' . claro_html_date_form('endDay', 'endMonth', 'endYear', $assignment_data['end_date'], 'long') . ' ' . claro_html_time_form('endHour', 'endMinute', $assignment_data['end_date']) . '<p class="notice">' . get_lang('(d/m/y hh:mm)') . '</p>' . '</dd>' . '<dt>' . get_lang('Allow late upload') . '</dt>' . '<dd>
                <input type="radio" name="allow_late_upload" id="allowUpload" value="YES" ' . ($assignment->getAllowLateUpload() == "YES" ? 'checked="checked"' : '') . ' />
                <label for="allowUpload">&nbsp;' . get_lang('Yes, allow users to submit works after end date') . '</label>
                <br />
                <input type="radio" name="allow_late_upload" id="preventUpload" value="NO" ' . ($assignment->getAllowLateUpload() == "NO" ? 'checked="checked"' : '') . ' />