示例#1
0
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) {
    // Submission download requested
    if ($cmd == 'rqDownload' && (claro_is_platform_admin() || get_conf('allow_download_all_submissions'))) {
        require_once $includePath . '/lib/form.lib.php';
        $downloadForm = '<strong>' . get_lang('Download') . '</strong>' . "\n" . '<form action="' . get_module_url('CLWRK') . '/export.php?assigId=' . $req['assignmentId'] . '" method="POST">' . "\n" . claro_form_relay_context() . '<input type="hidden" name="cmd" value="exDownload" />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_from" value="from" checked /><label for="downloadMode_from">' . get_lang('Submissions posted or modified after date :') . '</label><br />' . "\n" . claro_html_date_form('day', 'month', 'year', time(), 'long') . ' ' . claro_html_time_form('hour', 'minute', time() - fmod(time(), 86400) - 3600) . '<small>' . get_lang('(d/m/y hh:mm)') . '</small>' . '<br /><br />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_all" value="all" /><label for="downloadMode_all">' . get_lang('All submissions') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadOnlyCurrentMembers" id="downloadOnlyCurrentMembers_id" value="yes" checked="checked" /><label for="downloadOnlyCurrentMembers_id">' . get_lang('Download only submissions from current course members') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadScore" id="downloadScore_id" value="yes" checked="checked" /><label for="downloadScore_id">' . get_lang('Download score') . '</label><br /><br />' . "\n" . '<input type="submit" value="' . get_lang('OK') . '" />&nbsp;' . "\n" . claro_html_button('work_list.php?assigId=' . $req['assignmentId'], get_lang('Cancel')) . '</form>' . "\n";
        $dialogBox->form($downloadForm);
    }
}
// Render dialog box
$out .= $dialogBox->render();
/**
 * Submitter (User or group) listing
 */
$headerUrl = $workPager->get_sort_url_list(Url::Contextualize($_SERVER['PHP_SELF'] . '?assigId=' . $req['assignmentId']));
$out .= $workPager->disp_pager_tool_bar(Url::Contextualize($_SERVER['PHP_SELF'] . "?assigId=" . $req['assignmentId'])) . '<table class="claroTable emphaseLine" width="100%">' . "\n" . '<thead>' . "\n" . '<tr class="headerX">' . "\n" . '<th>' . '<a href="' . $headerUrl['name'] . '">' . get_lang('Author(s)') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['last_edit_date'] . '">' . get_lang('Last submission') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['submissionCount'] . '">' . get_lang('Submissions') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['feedbackCount'] . '">' . get_lang('Feedbacks') . '</a>' . '</th>' . "\n";
if ($is_allowedToEditAll) {
    $out .= '<th>' . '<a href="' . $headerUrl['maxScore'] . '">' . get_lang('Best score') . '</a>' . '</th>' . "\n";
}
$out .= '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>';
foreach ($workList as $thisWrk) {
示例#2
0
文件: form.lib.php 项目: rhertzog/lcs
/**
 * build htmlstream for input form of a time
 *
 * @param string $hourFieldName attribute name of the input Hour
 * @param string $minuteFieldName attribute name of the input minutes
 * @param string $unixDate unix timestamp of date to display
 *
 * @return string html stream to output input tag for an hour
 *
 * @author S�bastien Piraux <*****@*****.**>
 *
 */
function claro_disp_time_form($hourFieldName, $minuteFieldName, $unixDate = 0)
{
    pushClaroMessage((function_exists('claro_html_debug_backtrace') ? claro_html_debug_backtrace() : 'claro_html_debug_backtrace() not defined') . 'claro_disp_time_form() is deprecated , use claro_html_time_form()', 'error');
    return claro_html_time_form($hourFieldName, $minuteFieldName, $unixDate);
}
示例#3
0
文件: work.php 项目: rhertzog/lcs
        $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"' : '') . ' />
                <label for="preventUpload">&nbsp;' . get_lang('No, prevent users submitting work after the end date') . '</label>' . '</dd>' . '<dt>' . get_lang('Default works visibility') . '</dt>' . '<dd>
                <input type="radio" name="def_submission_visibility" id="visible" value="VISIBLE" ' . ($assignment->getDefaultSubmissionVisibility() == "VISIBLE" ? 'checked="checked"' : '') . ' />
                <label for="visible">&nbsp;' . get_lang('Visible for all users') . '</label>
                <br />
                <input type="radio" name="def_submission_visibility" id="invisible" value="INVISIBLE" ' . ($assignment->getDefaultSubmissionVisibility() == "INVISIBLE" ? 'checked="checked"' : '') . ' />
                <label for="invisible">&nbsp;' . get_lang('Only visible for teacher(s) and submitter(s)') . '</label>' . '<br /><br />
                <input type="checkbox" name="submission_visibility_applies_to_all" id="submission_visibility_applies_to_all_id" value="yes" />
                <label for="submission_visibility_applies_to_all_id">&nbsp;' . get_lang('Apply default visibility also to sumissions already posted') . '</label>' . '</dd>' . '<dt>&nbsp;</dt>' . '<dd>' . '<input type="submit" name="submitAssignment" value="' . get_lang('Ok') . '" />&nbsp;' . claro_html_button(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '.', get_lang('Cancel')) . '</dd>' . '</dl>' . '</fieldset>' . '</form>';
    }
}
/*--------------------------------------------------------------------
示例#4
0
                </dd>
                <dt><label for="useEndDate"><?php 
echo get_lang('End date');
?>
</label></dt>
                <dd>
                    <input type="checkbox" name="useEndDate" id="useEndDate" <?php 
echo $this->data['useEndDate'] ? ' checked="checked"' : '';
?>
/>
                    <label for="useEndDate"><?php 
echo get_lang('Yes');
?>
</label>
                    <?php 
echo claro_html_date_form('endDay', 'endMonth', 'endYear', $this->data['endDate'], 'long') . ' - ' . claro_html_time_form('endHour', 'endMinute', $this->data['endDate']);
?>
                    <small><?php 
echo get_lang('(d/m/y hh:mm)');
?>
</small>
                </dd>
                <dt><label for="useTimeLimit"><?php 
echo get_lang('Time limit');
?>
</label></dt>
                <dd>
                    <input type="checkbox" name="useTimeLimit" id="useTimeLimit" <?php 
echo $this->data['useTimeLimit'] ? ' checked="checked"' : '';
?>
/>
示例#5
0
文件: form.tpl.php 项目: rhertzog/lcs
                value="<?php 
echo claro_htmlspecialchars($this->event['title']);
?>
" />
            </dd>
            
            <dt><?php 
echo get_lang('Date');
?>
</dt>
            <dd>
                <?php 
echo claro_html_date_form('fday', 'fmonth', 'fyear', $this->event['date'], 'long');
?>
                <?php 
echo claro_html_time_form('fhour', 'fminute', $this->event['date']);
?>
                <p class="notice"><?php 
echo get_lang('(d/m/y hh:mm)');
?>
</p>
            </dd>
            
            <dt>
                <label for="lasting"><?php 
echo get_lang('Lasting');
?>
</label>
            </dt>
            <dd>
                <input type="text" name="lasting" id="lasting" size="20" maxlength="20"