示例#1
0
    $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) {
    $out .= '<tr align="center">' . "\n" . '<td align="left">' . $thisWrk['name'] . '</td>' . "\n" . '<td>' . (!empty($thisWrk['title']) ? $thisWrk['title'] . '<small> ( ' . $thisWrk['last_edit_date'] . ' )</small>' : '&nbsp;') . '</td>' . "\n" . '<td>' . $thisWrk['submissionCount'] . '</td>' . "\n" . '<td>' . $thisWrk['feedbackCount'] . '</td>' . "\n";
    if ($is_allowedToEditAll) {
        $out .= '<td>' . (!is_null($thisWrk['maxScore']) && $thisWrk['maxScore'] > -1 ? $thisWrk['maxScore'] : get_lang('No score')) . '</td>' . "\n";
    }
    $out .= '</tr>' . "\n\n";
}
$out .= '</tbody>' . "\n" . '</table>' . "\n\n" . $workPager->disp_pager_tool_bar(Url::Contextualize($_SERVER['PHP_SELF'] . "?assigId=" . $req['assignmentId']));
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
示例#2
0
文件: work.php 项目: rhertzog/lcs
                <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>';
    }
}
/*--------------------------------------------------------------------
                          ASSIGNMENT LIST
  --------------------------------------------------------------------*/
// if we don't display assignment form
if (!isset($displayAssigForm) || !$displayAssigForm) {
    $headerUrl = $assignmentPager->get_sort_url_list($_SERVER['PHP_SELF']);
    $out .= $assignmentPager->disp_pager_tool_bar($_SERVER['PHP_SELF']);
    $out .= '<table class="claroTable" width="100%">' . "\n" . '<tr class="headerX">' . '<th><a href="' . $headerUrl['title'] . '">' . get_lang('Title') . '</a></th>' . "\n" . '<th><a href="' . $headerUrl['assignment_type'] . '">' . get_lang('Type') . '</a></th>' . "\n" . '<th><a href="' . $headerUrl['start_date_unix'] . '">' . get_lang('Start date') . '</a></th>' . "\n" . '<th><a href="' . $headerUrl['end_date_unix'] . '">' . get_lang('End date') . '</a></th>' . "\n";
    $colspan = 4;
    if (isset($_REQUEST['submitGroupWorkUrl']) && !empty($_REQUEST['submitGroupWorkUrl'])) {
        $out .= '<th>' . get_lang('Publish') . '</th>' . "\n";
        $colspan++;
    }
    if ($is_allowedToEdit) {
        $out .= '<th>' . get_lang('Edit') . '</th>' . "\n" . '<th>' . get_lang('Delete') . '</th>' . "\n" . '<th>' . get_lang('Visibility') . '</th>' . "\n";
        $colspan += 3;
    }
    $out .= '</tr>' . "\n" . '<tbody>' . "\n\n";
    $atLeastOneAssignmentToShow = false;
    if (claro_is_user_authenticated()) {
        $date = $claro_notifier->get_notification_date(claro_get_current_user_id());
示例#3
0
    // Users in course
    $courseDataList[$numLine]['qty_cm'] = '<a href="admincourseusers.php' . '?cidToEdit=' . $courseLine['sysCode'] . $addToURL . '&amp;cfrom=clist">' . get_lang('%nb member(s)', array('%nb' => $courseLine['qty_stu'] + $courseLine['qty_cm'])) . '</a>' . '<br />' . "\n" . '<small><small>' . "\n" . get_lang('%nb course(s) manager(s)', array('%nb' => $courseLine['qty_cm'])) . ' - ' . get_lang('%nb student(s)', array('%nb' => $courseLine['qty_stu'])) . "\n" . '</small></small>' . "\n";
    if ($courseLine['registration'] == 'open' && !empty($courseLine['registrationKey'])) {
        $regIcon = 'key';
    } else {
        $regIcon = $courseLine['registration'];
    }
    // Course Settings
    $courseDataList[$numLine]['cmdSetting'] = '<a href="' . get_path('clarolineRepositoryWeb') . 'course/settings.php?adminContext=1' . '&amp;cidReq=' . $courseLine['sysCode'] . $addToURL . '&amp;cfrom=clist' . (!is_null($courseLine['sourceCourseId']) ? '&amp;courseType=session' : '') . '">' . '<img src="' . get_icon_url('settings') . '" alt="" />' . '&nbsp;&nbsp;&nbsp;' . '<img src="' . get_icon_url($imgVisibilityStatus[$courseLine['visibility']]) . '" alt="" /> ' . '<img src="' . get_icon_url($imgAccessStatus[$courseLine['access']]) . '" alt="" /> ' . '<img src="' . get_icon_url($imgRegistrationStatus[$regIcon]) . '" alt="" />' . '</a>';
    // Course Action Delete
    $courseDataList[$numLine]['cmdDelete'] = '<a href="' . claro_htmlspecialchars($_SERVER['PHP_SELF'] . '?cmd=exDelete&delCode=' . $courseLine['sysCode'] . $addToURL) . '" ' . 'onclick="return ADMIN.confirmationDel(\'' . clean_str_for_javascript($courseLine['intitule']) . '\');">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" />' . "\n" . '</a>' . "\n";
}
/**
 * CONFIG DATAGRID
 */
$sortUrlList = $myPager->get_sort_url_list($_SERVER['PHP_SELF']);
$courseDataGrid = new claro_datagrid($courseDataList);
$courseDataGrid->set_colTitleList(array('officialCode' => '<a href="' . $sortUrlList['officialCode'] . '">' . get_lang('Course code') . '</a>', 'intitule' => '<a href="' . $sortUrlList['intitule'] . '">' . get_lang('Course title') . '</a>', 'qty_cm' => get_lang('Course members'), 'cmdSetting' => get_lang('Course settings'), 'cmdDelete' => get_lang('Delete')));
$courseDataGrid->set_colAttributeList(array('qty_cm' => array('align' => 'right'), 'cmdSetting' => array('align' => 'center'), 'cmdDelete' => array('align' => 'center')));
$courseDataGrid->set_idLineType('none');
$courseDataGrid->set_colHead('officialCode');
$courseDataGrid->set_noRowMessage(get_lang('There is no course matching such criteria') . '<br />' . '<a href="advanced_course_search.php' . $addtoAdvanced . '">' . get_lang('Search again (advanced)') . '</a>');
// Command list
$cmdList = array();
$cmdList[] = array('img' => 'courseadd', 'name' => get_lang('Create course'), 'url' => '../course/create.php?adminContext=1');
// Display
$out = '';
$out .= claro_html_tool_title($nameTools, null, $cmdList);
if (!empty($isSearched)) {
    $dialogBox->info('<b>' . get_lang('Search on') . '</b> : <small>' . $isSearched . '</small>');
}
示例#4
0
    $userDataList[$lineId]['profileId'] = claro_get_profile_name($user['profileId']);
    if ($user['isCourseManager']) {
        $userDataList[$lineId]['isCourseManager'] = '<img class="qtip" src="' . get_icon_url('manager') . '" ' . 'alt="' . get_lang('Course manager') . '" ' . 'title="' . get_lang('Course manager') . '" />';
    } else {
        $userDataList[$lineId]['isCourseManager'] = '<img class="qtip" src="' . get_icon_url('user') . '" ' . 'alt="' . get_lang('Student') . '" ' . 'title="' . get_lang('Student') . '" />';
    }
    $userDataList[$lineId]['cmd_cu_edit'] = '<a href="admin_user_course_settings.php' . '?cidToEdit=' . $cidToEdit . '&amp;uidToEdit=' . $user['user_id'] . '&amp;ccfrom=culist">' . '<img src="' . get_icon_url('edit') . '" alt="' . get_lang('Edit') . '"/>' . '</a>';
    $userDataList[$lineId]['cmd_cu_unenroll'] = '<a href="' . $_SERVER['PHP_SELF'] . '?cidToEdit=' . $cidToEdit . '&amp;cmd=unsub&amp;user_id=' . $user['user_id'] . '&amp;pager_offset=' . $pager_offset . '" ' . ' onclick="return ADMIN.confirmationUnReg(\'' . clean_str_for_javascript($user['username']) . '\');">' . "\n" . '<img src="' . get_icon_url('unenroll') . '" alt="' . get_lang('Unregister user') . '" />' . "\n" . '</a>' . "\n";
}
// end display users table
// Prepare output
// Javascript confirm pop up declaration for header
JavascriptLanguage::getInstance()->addLangVar('Are you sure you want to unregister %name ?');
JavascriptLoader::getInstance()->load('admin');
// Config Datagrid
$sortUrlList = $myPager->get_sort_url_list($_SERVER['PHP_SELF'] . '?cidToEdit=' . $cidToEdit);
$dg_opt_list['idLineShift'] = $myPager->offset + 1;
$dg_opt_list['colTitleList'] = array('user_id' => '<a href="' . $sortUrlList['user_id'] . '">' . get_lang('User id') . '</a>', 'name' => '<a href="' . $sortUrlList['name'] . '">' . get_lang('Last name') . '</a>', 'firstname' => '<a href="' . $sortUrlList['firstname'] . '">' . get_lang('First name') . '</a>', 'profileId' => '<a href="' . $sortUrlList['profileId'] . '">' . get_lang('Profile') . '</a>', 'isCourseManager' => '<a href="' . $sortUrlList['isCourseManager'] . '">' . get_lang('Course manager') . '</a>', 'cmd_cu_edit' => get_lang('Edit'), 'cmd_cu_unenroll' => get_lang('Unregister user'));
$dg_opt_list['colAttributeList'] = array('user_id' => array('align' => 'center'), 'isCourseManager' => array('align' => 'center'), 'cmd_cu_edit' => array('align' => 'center'), 'cmd_cu_unenroll' => array('align' => 'center'));
$nameTools = get_lang('Course members');
$nameTools .= " : " . $courseData['name'];
// Deal with interbreadcrumbs
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
// Command list
$cmdList = array();
$cmdList[] = array('name' => get_lang('Enroll a user'), 'url' => 'adminregisteruser.php' . '?cidToEdit=' . $cidToEdit);
if ($cfrom == 'clist') {
    $cmdList[] = array('img' => 'back', 'name' => get_lang('Back to course list'), 'url' => 'admin_courses.php');
}
// Display
$out = '';