Ejemplo n.º 1
0
                        <blockquote>
                            <input type="checkbox" id="useExpirationDate" name="useExpirationDate" value="true"<?php 
        echo $this->course->useExpirationDate ? ' checked="checked"' : '';
        ?>
 />
                            <label for="useExpirationDate">
                                <?php 
        echo get_lang('to');
        ?>
 (<?php 
        echo get_lang('included');
        ?>
)
                            </label>
                            <?php 
        echo claro_html_date_form('course_expirationDay', 'course_expirationMonth', 'course_expirationYear', $this->course->expirationDate, 'numeric');
        ?>
&nbsp;
                            <span class="notice"><?php 
        echo get_lang('(d/m/y)');
        ?>
</span>
                        </blockquote>


                        <input type="radio" id="course_status_disabled" name="course_status_selection" value="disable" <?php 
        echo $this->course->status == 'pending' || $this->course->status == 'disable' || $this->course->status == 'trash' ? ' checked="checked"' : '';
        ?>
 />&nbsp;
                        <label for="course_status_disabled">
                            <?php 
Ejemplo n.º 2
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) {
Ejemplo n.º 3
0
}
?>
 />
                    <label for="enable_visible_until">
                        <?php 
echo get_lang('Visible until');
?>
 (<?php 
echo get_lang('included');
?>
)
                    </label>
                </dt>
                <dd>
                    <?php 
echo claro_html_date_form('visible_until_day', 'visible_until_month', 'visible_until_year', isset($this->announcement['visibleUntil']) ? strtotime($this->announcement['visibleUntil']) : strtotime('Now +1 day'), 'long');
?>
                </dd>
                <dt>
                    <input name="visibility" id="invisible" value="0" type="radio"<?php 
if (isset($this->announcement['visibility']) && $this->announcement['visibility'] == 'HIDE') {
    ?>
 checked="checked"<?php 
}
?>
 />
                    <label for="invisible">
                        <img src="<?php 
echo get_icon_url('invisible');
?>
" alt="<?php 
Ejemplo n.º 4
0
/**
 * @param string  $dayFieldName attribute name of the input DAY
 * @param string  $monthFieldName attribute name of the input MONTH
 * @param string  $yearFieldName attribute name of the input YEAR
 * @param boolean $unixDate unix timestamp of date to display
 * @param string  $formatMonth display type of month select box : numeric, long, short
 *
 * @author Sébastien Piraux <*****@*****.**>
 *
 * @return string html stream to output input tag for a date
 *
 */
function claro_disp_date_form($dayFieldName, $monthFieldName, $yearFieldName, $unixDate = 0, $formatMonth = 'numeric')
{
    pushClaroMessage((function_exists('claro_html_debug_backtrace') ? claro_html_debug_backtrace() : 'claro_html_debug_backtrace() not defined') . 'claro_disp_date_form() is deprecated , use claro_html_date_form()', 'error');
    return claro_html_date_form($dayFieldName, $monthFieldName, $yearFieldName, $unixDate, $formatMonth);
}
Ejemplo n.º 5
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"' : '';
?>
/>
Ejemplo n.º 6
0
        $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>';
    }
}
/*--------------------------------------------------------------------
Ejemplo n.º 7
0
        $manager = new $ctr(claro_get_current_course_id());
        $manager->deleteAll();
    }
    $dialogBox->success(get_lang('Course statistics are now empty'));
    Console::log("In course " . claro_get_current_course_id() . " : all tracking events deleted by user " . claro_get_current_user_id(), 'COURSE_RESET_ALL_TRACKING');
    $display = DISP_FLUSH_RESULT;
}
/*
 * Prepare output
 */
$nameTools = get_lang('Delete all course statistics');
/*
 * Output
 */
$html = '';
$html .= claro_html_tool_title($nameTools);
if (DISP_FLUSH_RESULT == $display) {
    // display confirm msg and back link
    $dialogBox->info('<small>' . '<a href="courseReport.php">' . '&lt;&lt;&nbsp;' . get_lang('Back') . '</a>' . '</small>' . "\n");
} elseif (DISP_FORM == $display) {
    $dialogBox->warning(get_lang('Delete is definitive.  There is no way to get your data back after delete.'));
    $dialogBox->form('<form action="' . $_SERVER['PHP_SELF'] . '">' . "\n" . claro_form_relay_context() . '<input type="hidden" name="cmd" value="exDelete" />' . "\n" . '<input type="radio" name="scope" id="scope_all" value="ALL" />' . "\n" . '<label for="scope_all">' . get_lang('All') . '</label>' . "\n" . '<br />' . "\n" . '<input type="radio" name="scope" id="scope_before" value="BEFORE" checked="checked" />' . "\n" . '<label for="scope_before" >' . get_lang('Before') . '</label> ' . "\n" . claro_html_date_form('beforeDate[day]', 'beforeDate[month]', 'beforeDate[year]', time(), 'short') . '<br /><br />' . "\n" . '<input type="submit" name="action" value="' . get_lang('Ok') . '" />&nbsp; ' . claro_html_button('courseReport.php', get_lang('Cancel')) . '</form>' . "\n");
}
// end else if $delete
$html .= $dialogBox->render();
/*
 * Output rendering
 */
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Statistics'), 'courseReport.php');
$claroline->display->body->setContent($html);
echo $claroline->display->render();
Ejemplo n.º 8
0
 * @author      Claro Team <*****@*****.**>
 * @since       1.10
 */
require_once dirname(__FILE__) . '/inc/claro_init_global.inc.php';
if (claro_is_user_authenticated()) {
    require_once get_path('incRepositorySys') . '/lib/form.lib.php';
    $dialogBox = new DialogBox();
    $display_form = true;
    if (isset($_REQUEST['fday']) && is_numeric($_REQUEST['fday']) && (isset($_REQUEST['fmonth']) && is_numeric($_REQUEST['fmonth'])) && (isset($_REQUEST['fyear']) && is_numeric($_REQUEST['fyear']))) {
        $_SESSION['last_action'] = $_REQUEST['fyear'] . '-' . $_REQUEST['fmonth'] . '-' . $_REQUEST['fday'] . ' 00:00:00';
        if (claro_get_current_course_id() != '') {
            claro_redirect(Url::Contextualize(get_path('clarolineRepositoryWeb') . '/course/index.php'));
        } else {
            claro_redirect(get_path('clarolineRepositoryWeb') . '/index.php');
        }
    }
    /**
     *     DISPLAY SECTION
     *
     */
    $output = '';
    $output .= claro_html_title(get_lang('Change notification date'), 2);
    $output .= $dialogBox->render();
    if ($display_form) {
        $output .= '<form method="get" action="' . claro_htmlspecialchars($_SERVER['PHP_SELF']) . '">' . claro_form_relay_context() . '<fieldset>' . "\n" . '<dd>' . claro_html_date_form('fday', 'fmonth', 'fyear', 0, 'long') . ' ' . '</dd>' . "\n" . '</dl>' . '</fieldset>' . '<input type="submit" class="claroButton" name="notificationDate" value="' . get_lang('Ok') . '" />' . "\n" . '</form>' . "\n";
    }
    Claroline::getDisplay()->body->appendContent($output);
    echo Claroline::getDisplay()->render();
} else {
    claro_redirect('index.php');
}
Ejemplo n.º 9
0
</label></dt>
            <dd>
                <input size="80" type="text" name="title" id="title"
                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>