示例#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
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Exercises'), Url::Contextualize(get_module_url('CLQWZ') . '/exercise.php'));
$nameTools = get_lang('Question pool');
// Tool list
$toolList = array();
if (!is_null($exId)) {
    $toolList[] = array('img' => 'back', 'name' => get_lang('Go back to the exercise'), 'url' => claro_htmlspecialchars(Url::Contextualize('edit_exercise.php?exId=' . $exId)));
}
$toolList[] = array('img' => 'default_new', 'name' => get_lang('New question'), 'url' => claro_htmlspecialchars(Url::Contextualize('edit_question.php?cmd=rqEdit')));
$out = '';
$out .= claro_html_tool_title($nameTools, null, $toolList);
$out .= $dialogBox->render();
//-- filter listbox
$attr['onchange'] = 'filterForm.submit()';
$out .= "\n" . '<form method="get" name="filterForm" action="question_pool.php">' . "\n" . '<input type="hidden" name="exId" value="' . $exId . '" />' . "\n" . claro_form_relay_context() . "\n" . '<p align="right">' . "\n" . '<label for="filter">' . get_lang('Filter') . '&nbsp;:&nbsp;</label>' . "\n" . claro_html_form_select('filter', $filterList, $filter, $attr) . "\n" . '<noscript>' . "\n" . '<input type="submit" value="' . get_lang('Ok') . '" />' . "\n" . '</noscript>' . "\n" . '</p>' . "\n" . '</form>' . "\n\n";
//-- pager
$out .= $myPager->disp_pager_tool_bar($pagerUrl);
/*
 * enable multiple question selection
 */
if (!is_null($exId)) {
    $out .= '<form method="post" name="QCMEncode" action="' . $_SERVER['PHP_SELF'] . '?cmd=recupMultipleQuestions">' . "\n";
    $out .= '<input type="hidden" name="exId" value="' . $exId . '" />' . "\n";
}
//-- list
$display = new ModuleTemplate('CLQWZ', 'question_list.tpl.php');
$display->assign('exId', $exId);
$display->assign('questionList', $questionList);
$display->assign('context', is_null($exId) ? 'pool' : 'reuse');
$display->assign('localizedQuestionType', get_localized_question_type());
$display->assign('offset', $offset);
$out .= $display->render();
示例#3
0
    $offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0;
    $myPager = new claro_sql_pager($sql, $offset, $modulePerPage);
    //$pagerSortDir = isset($_REQUEST['dir' ]) ? $_REQUEST['dir' ] : SORT_ASC;
    $moduleList = $myPager->get_result_list();
}
//----------------------------------
// DISPLAY
//----------------------------------
$out = '';
//display title
$out .= claro_html_tool_title($nameTools);
//Display Forms or dialog box(if needed)
$out .= $dialogBox->render();
if (!empty($dock)) {
    //Display TOP Pager list
    $out .= $myPager->disp_pager_tool_bar('module_dock.php?dock=' . $dock);
    // start table...
    $out .= '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . '<thead>' . '<tr align="center" valign="top">' . '<th>' . get_lang('Icon') . '</th>' . '<th>' . get_lang('Module name') . '</th>' . '<th colspan="2">' . get_lang('Order') . '</th>' . '<th>' . get_lang('Remove from the dock') . '</th>' . '</tr>' . '</thead>' . '<tbody>';
    $iteration = 1;
    $enditeration = sizeof($moduleList);
    foreach ($moduleList as $module) {
        //display settings...
        $class_css = $module['activation'] == 'activated' ? 'item' : 'invisible item';
        //find icon
        if (file_exists(get_module_path($module['label']) . '/icon.png')) {
            $icon = '<img src="' . get_module_url($module['label']) . '/icon.png" />';
        } elseif (file_exists(get_module_path($module['label']) . '/icon.gif')) {
            $icon = '<img src="' . get_module_url($module['label']) . '/icon.gif" />';
        } else {
            $icon = '<small>' . get_lang('No icon') . '</small>';
        }
示例#4
0
} else {
    $title = get_lang('Search on') . ' : ';
}
//Pager
if (isset($_REQUEST['order_crit'])) {
    $addToURL = '&amp;order_crit=' . $_SESSION['admin_register_order_crit'] . '&amp;dir=' . $_SESSION['admin_register_dir'];
}
//------------------------------------
// DISPLAY
//------------------------------------
// Display tool title
$out = '';
$out .= claro_html_tool_title($nameTools);
// Display Forms or dialog box(if needed)
$out .= $dialogBox->render();
$out .= '<table width="100%" class="claroTableForm" >' . '<tr>' . '<td align="left">' . "\n" . '<b>' . $title . '</b>' . "\n" . '<small>' . "\n" . $isSearched . "\n" . '</small>' . "\n" . '</td>' . "\n" . '<td align="right">' . "\n" . '<form action="' . $_SERVER['PHP_SELF'] . '" >' . "\n" . '<label for="search">' . get_lang('Make search') . '</label> :' . "\n" . '<input type="text" value="' . claro_htmlspecialchars($search) . '" name="search" id="search" />' . "\n" . '<input type="submit" value=" ' . get_lang('Ok') . ' "/>' . "\n" . '<input type="hidden" name="newsearch" value="yes" />' . "\n" . '<input type="hidden" name="cidToEdit" value="' . $cidToEdit . '" />' . "\n" . '</form>' . "\n" . '</td>' . "\n" . '</tr>' . "\n" . '</table>' . "\n" . '<a class="claroCmd" href="admincourseusers.php?cidToEdit=' . $cidToEdit . '">' . get_lang('Course members') . '</a><br /><br />' . $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF'] . '?cidToEdit=' . $cidToEdit . $addToURL) . '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . "\n" . '<thead>' . "\n" . '<tr align="center" valign="top">' . "\n" . '<th>' . '<a href="' . $_SERVER['PHP_SELF'] . '?order_crit=user_id&amp;chdir=yes&amp;search=' . $search . '&amp;cidToEdit=' . $cidToEdit . '">' . get_lang('User id') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $_SERVER['PHP_SELF'] . '?order_crit=nom' . '&amp;chdir=yes&amp;search=' . $search . '&amp;cidToEdit=' . $cidToEdit . '">' . get_lang('Last name') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $_SERVER['PHP_SELF'] . '?order_crit=prenom' . '&amp;chdir=yes' . '&amp;search=' . $search . '&amp;cidToEdit=' . $cidToEdit . '">' . get_lang('First name') . '</a>' . '</th>' . "\n" . '<th>' . get_lang('Enrol as student') . '</th>' . "\n" . '<th>' . get_lang('Enrol as course manager') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>';
// Start the list of users...
$addToURL = isset($_REQUEST['addToURL']) ? $_REQUEST['addToURL'] : '';
if (isset($_REQUEST['order_crit'])) {
    $addToURL = '&amp;order_crit=' . $_REQUEST['order_crit'];
}
if (isset($_REQUEST['offset'])) {
    $addToURL = '&amp;offset=' . $_REQUEST['offset'];
}
foreach ($userList as $user) {
    if (isset($_REQUEST['search']) && $_REQUEST['search'] != '') {
        $user['nom'] = preg_replace("/^(" . $_REQUEST['search'] . ")/i", '<b>\\1</b>', $user['nom']);
        $user['prenom'] = preg_replace("/^(" . $_REQUEST['search'] . ")/i", "<b>\\1</b>", $user['prenom']);
    }
    $out .= '<tr>' . "\n" . '<td align="center">' . $user['ID'] . '</td>' . "\n" . '<td align="left">' . $user['nom'] . '</td>' . '<td align="left">' . $user['prenom'] . '</td>';
    if (!is_null($user['isCourseManager']) && $user['isCourseManager'] == 0) {
示例#5
0
$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>');
}
$out .= $dialogBox->render();
// DISPLAY : Search/filter panel
$out .= '<table width="100%">' . "\n\n" . '<tr>' . "\n" . '<td align="right"  valign="top">' . "\n\n" . '<form action="' . $_SERVER['PHP_SELF'] . '">' . "\n" . '<label for="search">' . get_lang('Make new search') . ' : </label>' . "\n" . '<input type="text" value="' . claro_htmlspecialchars($search) . '" name="search" id="search" />' . "\n" . '<input type="submit" value=" ' . get_lang('Ok') . ' " />' . "\n" . '<input type="hidden" name="newsearch" value="yes" />' . "\n" . '[<a class="claroCmd" href="advanced_course_search.php' . $addtoAdvanced . '">' . get_lang('Advanced') . '</a>]' . "\n" . '</form>' . "\n\n" . '</td>' . "\n" . '</tr>' . "\n\n" . '</table>' . "\n\n";
// DISPLAY : List of datas
$out .= $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF']) . $courseDataGrid->render() . $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF']);
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
/**
 * Prepares the sql request to select courses in database.
 *
 * @return string $sql
 */
function prepare_get_filtred_course_list()
{
    $tbl_mdb_names = claro_sql_get_main_tbl();
    $sqlFilter = array();
    // Prepare filter deal with KEY WORDS classification call
    if (isset($_SESSION['admin_course_search'])) {
        $sqlFilter[] = "(  co.`intitule`  LIKE '%" . claro_sql_escape(pr_star_replace($_SESSION['admin_course_search'])) . "%'" . "\n" . "   OR co.`administrativeNumber` LIKE '%" . claro_sql_escape(pr_star_replace($_SESSION['admin_course_search'])) . "%'" . "\n" . ")";
    }
示例#6
0
    }
}
$form .= "</select>";
$form .= "<input type=\"submit\" value=\"OK\" />";
$form .= "</form>";
$dialogBox->form($form);
echo $dialogBox->render();
// select variables with same content
$sql = " SELECT DISTINCT L1.language , L1.varContent , L1.varName , L1.sourceFile\n    FROM " . $tbl_translation . " L1,\n         " . $tbl_translation . " L2,\n         " . $tbl_used_lang . " U\n    WHERE L1.language = \"" . $language . "\" and\n        L1.language = L2.language and\n        L1.varContent = L2.varContent and\n        L1.varName <> L2.varName and\n        L1.varName = U.varName\n    ORDER BY L1.varContent, L1.varName";
// build pager
$myPager = new claro_sql_pager($sql, $offset, $resultPerPage);
$results = $myPager->get_result_list();
// display nb results
echo '<p>' . get_lang('Total') . ': ' . $myPager->totalItemCount . '</p>';
// display pager
echo $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF'] . '?language=' . $language);
// display table header
echo "<table class=\"claroTable\" width=\"100%\">\n<thead>\n<tr class=\"headerX\">\n<th>N°</th>\n<th>language</th>\n<th>varName</th>\n<th>varContent</th>\n<th>sourceFile</th>\n</tr>\n</thead>\n<tbody>";
$varContent = "";
$i = $offset;
$color = true;
foreach ($results as $result) {
    if ($result['varContent'] != $varContent) {
        $varContent = $result['varContent'];
        $color = !$color;
    }
    if ($color == true) {
        echo "<tr style=\"background-color: #ccc;\">";
    } else {
        echo "<tr>";
    }
示例#7
0
文件: work.php 项目: rhertzog/lcs
                <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());
    }
示例#8
0
$noQUERY_STRING = true;
$out = '';
// Title
$out .= claro_html_tool_title($nameTools, null, $cmdList) . $dialogBox->render() . '<div>' . "\n" . '<ul id="navlist">' . "\n";
// Display the module type tabbed naviguation bar
foreach ($moduleTypeList as $type) {
    if ($typeReq == $type) {
        $out .= '<li><a href="module_list.php?typeReq=' . $type . '" class="current">' . $typeLabel[$type] . '</a></li>' . "\n";
    } else {
        $out .= '<li><a href="module_list.php?typeReq=' . $type . '">' . $typeLabel[$type] . '</a></li>' . "\n";
    }
}
$out .= '</ul>' . "\n" . '</div>' . "\n";
// Display Pager list
if ($myPager->get_next_offset()) {
    $out .= $myPager->disp_pager_tool_bar('module_list.php?typeReq=' . $typeReq);
}
// Start table...
$out .= '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . "\n\n" . '<thead>' . "\n" . '<tr>' . "\n" . '<th>' . get_lang('Icon') . '</th>' . "\n" . '<th>' . get_lang('Module name') . '</th>' . "\n" . '<th>' . get_lang('Module administration') . '</th>' . "\n";
if ($typeReq == 'applet') {
    $out .= '<th>' . get_lang('Display') . '</th>' . "\n";
} else {
    $out .= '<th colspan="2">' . get_lang('Order') . '</th>' . "\n";
}
$out .= '<th>' . get_lang('Properties') . '</th>' . "\n" . '<th>' . get_lang('Uninstall') . '</th>' . "\n" . '<th>' . get_lang('Activated') . '</th>' . "\n";
if ($typeReq == 'tool') {
    $out .= '<th>' . get_lang('Default visibility') . '</th>' . "\n";
}
$out .= '</tr>' . "\n" . '</thead>' . "\n\n" . '<tbody>';
// Start the list of modules...
foreach ($moduleList as $module) {
示例#9
0
    $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 = '';
$out .= claro_html_tool_title($nameTools, null, $cmdList);
$out .= $dialogBox->render();
$userDataGrid = new claro_datagrid($userDataList);
$userDataGrid->set_option_list($dg_opt_list);
$out .= $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF'] . '?cidToEdit=' . $cidToEdit) . $userDataGrid->render() . $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF'] . '?cidToEdit=' . $cidToEdit);
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
示例#10
0
if ($displayForm) {
    $out .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" >' . "\n\n" . claro_form_relay_context() . '<input type="hidden" name="cmd" value="exEdit" />' . "\n" . '<input type="hidden" name="catId" value="' . $catId . '" />' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n";
    $out .= '<table border="0" cellpadding="5">' . "\n";
    //--
    // title
    $out .= '<tr>' . "\n" . '<td valign="top"><label for="title">' . get_lang('Title') . '&nbsp;<span class="required">*</span>&nbsp;:</label></td>' . "\n" . '<td><input type="text" name="title" id="title" size="60" maxlength="200" value="' . $form['title'] . '" /></td>' . "\n" . '</tr>' . "\n\n";
    // description
    $out .= '<tr>' . "\n" . '<td valign="top"><label for="description">' . get_lang('Description') . '&nbsp;:</label></td>' . "\n" . '<td>' . claro_html_textarea_editor('description', $form['description']) . '</td>' . "\n" . '</tr>' . "\n\n";
    //--
    $out .= '<tr>' . "\n" . '<td>&nbsp;</td>' . "\n" . '<td><small>' . get_lang('<span class="required">*</span> denotes required field') . '</small></td>' . "\n" . '</tr>' . "\n\n";
    //-- buttons
    $out .= '<tr>' . "\n" . '<td>&nbsp;</td>' . "\n" . '<td>' . '<input type="submit" name="" id="" value="' . get_lang('Ok') . '" />&nbsp;&nbsp;' . claro_html_button(Url::Contextualize($_SERVER['PHP_SELF']), get_lang("Cancel")) . '</td>' . "\n" . '</tr>' . "\n\n";
    $out .= '</table>' . "\n\n" . '</form>' . "\n\n";
}
//-- pager
$out .= $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF']);
//-- list
$out .= '<table class="claroTable emphaseLine" border="0" align="center" cellpadding="2" cellspacing="2" width="100%">' . "\n\n" . '<thead>' . "\n" . '<tr>' . "\n" . '<th>' . get_lang('Title') . '</th>' . "\n";
$colspan = 1;
if ($is_allowedToEdit) {
    $out .= '<th>' . get_lang('Modify') . '</th>' . "\n" . '<th>' . get_lang('Delete') . '</th>' . "\n";
    $colspan = 3;
}
$out .= '</tr>' . "\n" . '</thead>' . "\n\n" . '<tbody>' . "\n\n";
if (!empty($questionCategoryList)) {
    foreach ($questionCategoryList as $aCategory) {
        $out .= '<tr>' . "\n" . '<td>' . $aCategory['title'] . '</a>' . '</td>' . "\n";
        $out .= '<td align="center">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize('question_category.php?cmd=rqEdit&amp;catId=' . $aCategory['id'])) . '">' . '<img src="' . get_icon_url('edit') . '" alt="' . get_lang('Modify') . '" />' . '</a>' . '</td>' . "\n";
        $confirmString = get_lang('Are you sure you want to delete this category ?');
        $out .= '<td align="center">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize('question_category.php?catId=' . $aCategory['id'] . '&amp;cmd=exDel')) . '" onclick="javascript:if(!confirm(\'' . clean_str_for_javascript($confirmString) . '\')) return false;">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" />' . '</a>' . '</td>' . "\n";
        $out .= '</tr>' . "\n\n";
示例#11
0
$dialogBox = new DialogBox();
// Deal with interbredcrumps
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Classes'), get_path('rootAdminWeb') . 'admin_class.php');
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
$nameTools = get_lang('Class members');
$out = '';
if (empty($class_id)) {
    $dialogBox->error(get_lang('Class not found'));
    $out .= $dialogBox->render();
} else {
    $cmdList = array();
    $cmdList[] = array('img' => 'enroll', 'name' => get_lang('Register class for course'), 'url' => claro_htmlspecialchars(get_path('clarolineRepositoryWeb') . 'auth/courses.php?' . 'cmd=rqReg&fromAdmin=class&class_id=' . $class_id));
    // Display tool title
    $out .= claro_html_tool_title(get_lang('Course list') . ' : ' . $classinfo['name'], null, $cmdList);
    // Pager
    $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF'] . '&amp;class_id=' . $class_id);
    // Display list of cours
    // start table...
    // TODO datagrid
    $out .= '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . '<thead>' . '<tr align="center" valign="top">' . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;order_crit=code&amp;chdir=yes">' . get_lang('Course code') . '</a></th>' . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;order_crit=intitule&amp;chdir=yes">' . get_lang('Course title') . '</a></th>' . '<th>' . get_lang('Course settings') . '</th>' . '<th>' . get_lang('Unregister from class') . '</th>' . '</tr>' . '</thead>' . '<tbody>';
    // Start the list of users
    foreach ($resultList as $list) {
        $list['officialCode'] = isset($list['officialCode']) ? $list['officialCode'] : ' - ';
        $out .= '<tr>' . '<td align="center" >' . $list['code'] . '</td>' . '<td align="left" >' . $list['intitule'] . '</td>' . '<td align="center">' . '<a href="../course/settings.php?adminContext=1' . '&amp;cidReq=' . $list['code'] . '&amp;cfrom=xxx">' . '<img src="' . get_icon_url('settings') . '" alt="' . get_lang('Course settings') . '" />' . '</a>' . '</td>' . '<td align="center">' . '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=unsubscribe&amp;class_id=' . $class_id . '&amp;offset=' . $offset . '&amp;course_id=' . $list['code'] . '" ' . ' onclick="return ADMIN.confirmationUnReg(\'' . clean_str_for_javascript($list['code']) . '\');">' . '<img src="' . get_icon_url('unenroll') . '" alt="" />' . '</a>' . '</td>' . '</tr>';
    }
    // end display users table
    if (empty($resultList)) {
        $out .= '<tr>' . '<td colspan="5" align="center">' . get_lang('No course to display') . '<br />' . '<a href="' . get_path('clarolineRepositoryWeb') . 'admin/admin_class.php">' . get_lang('Back') . '</a>' . '</td>' . '</tr>';
    }
    $out .= '</tbody>' . "\n" . '</table>' . "\n";
    //Pager
示例#12
0
echo claro_html_tool_title($nameTools) . '<p>Total variables in Claroline scripts: <strong>' . $count_total_diff_var . '</strong></p>';
if (isset($_REQUEST['exCmd']) && $_REQUEST['exCmd'] == 'ToTranslate') {
    if (isset($_REQUEST['lang'])) {
        $language = $_REQUEST['lang'];
    } else {
        $language = DEFAULT_LANGUAGE;
    }
    printf("<p><a href=\"%s\">Back</a></p>", $_SERVER['PHP_SELF']);
    printf("<h4>Missing variables in %s</h4>", $language);
    // count missing lang var in devel complete file for this language
    $sql = " SELECT DISTINCT u.varName, u.sourceFile \n             FROM " . $tbl_used_lang . " u \n             LEFT JOIN " . $tbl_translation . " t ON \n             (\n                u.varName = t.varName \n                AND t.language=\"" . $language . "\"\n             ) \n             WHERE t.varContent is NULL\n             ORDER BY u.varName, u.sourceFile ";
    // build pager
    $myPager = new claro_sql_pager($sql, $offset, $resultPerPage);
    $result_missing_var = $myPager->get_result_list();
    // display pager
    echo $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF'] . '?exCmd=ToTranslate&lang=' . $language);
    // display table header
    echo "<table class=\"claroTable\" width=\"100%\" >\n";
    echo "<thead>" . "<tr class=\"headerX\">" . "<th>VarName</th>" . "<th>SourceFile</th>" . "</tr>" . "</thead>" . "<tbody>\n";
    // variables used to switch background color
    $varName = '';
    $color = true;
    // browse missing variables
    foreach ($result_missing_var as $row_missing_var) {
        // get values
        $sourceFile = $row_missing_var['sourceFile'];
        if ($row_missing_var['varName'] != $varName) {
            $varName = $row_missing_var['varName'];
            $color = !$color;
        }
        // display row
示例#13
0
    $dialogBox->error(get_lang('Class not found'));
    $out .= $dialogBox->render();
} else {
    // Display tool title
    $out .= claro_html_tool_title($nameTools . ' : ' . $classinfo['name']);
    // Display Forms or dialog box(if needed)
    $out .= $dialogBox->render();
    // Display tool link
    $out .= '<p><a class="claroCmd" href="' . get_path('clarolineRepositoryWeb') . 'admin/admin_class_user.php?class_id=' . $class_id . '">' . get_lang('Class members') . '</a></p>' . "\n";
    if (isset($_REQUEST['cfrom']) && $_REQUEST['cfrom'] == 'clist') {
        $out .= claro_html_button('admin_courses.php', get_lang('Back to course list'));
    }
    // Display search form
    $out .= '<div style="text-align: right">' . "\n" . '<form action="' . $_SERVER['PHP_SELF'] . '" method="GET">' . "\n" . '<input type="hidden" name="class_id" value="' . $class_id . '" />' . "\n" . '<input type="text" value="' . claro_htmlspecialchars($search) . '" name="search" id="search" size="20" />' . "\n" . '<input type="submit" value=" ' . get_lang('Search') . ' " />' . "\n" . '</form>' . "\n" . '</div>' . "\n";
    // Display pager
    $out .= $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF'] . '?class_id=' . $class_id . ('&order_crit=' . $order_crit) . (isset($_REQUEST['dir']) ? '&dir=' . $_REQUEST['dir'] : '') . (isset($_REQUEST['search']) ? '&search=' . $_REQUEST['search'] : ''));
    // Display list of users
    // start table...
    if ($search == '') {
        $out .= '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . "\n" . '<thead>' . "\n" . '<tr align="center" valign="top">' . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;order_crit=user_id&amp;chdir=yes">' . get_lang('User id') . '</a></th>' . "\n" . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;order_crit=nom&amp;chdir=yes"    >' . get_lang('Last name') . '</a></th>' . "\n" . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;order_crit=prenom&amp;chdir=yes" >' . get_lang('First name') . '</a></th>' . "\n" . '<th>' . get_lang('Register to the class') . '</th>' . '<th>' . get_lang('Unregister from class') . '</th>' . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n";
    } else {
        $out .= '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . "\n" . '<thead>' . "\n" . '<tr align="center" valign="top">' . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;search=' . $search . '&amp;order_crit=user_id&amp;chdir=yes">' . get_lang('User id') . '</a></th>' . "\n" . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;search=' . $search . '&amp;order_crit=nom&amp;chdir=yes"    >' . get_lang('Last name') . '</a></th>' . "\n" . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;search=' . $search . '&amp;order_crit=prenom&amp;chdir=yes" >' . get_lang('First name') . '</a></th>' . "\n" . '<th>' . get_lang('Register to the class') . '</th>' . '<th>' . get_lang('Unregister from class') . '</th>' . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n";
    }
    // Start the list of users...
    foreach ($resultList as $list) {
        $out .= '<tr>' . '<td align="center">' . '<a name="u' . $list['user_id'] . '"></a>' . $list['user_id'] . '</td>' . "\n" . '<td align="left">' . $list['nom'] . '</td>' . "\n" . '<td align="left">' . $list['prenom'] . '</td>' . "\n";
        // Register
        if ($list['id'] == null) {
            $out .= '<td align="center">' . "\n" . '<a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;cmd=subscribe&user_id=' . $list['user_id'] . '&amp;offset=' . $offset . '#u' . $list['user_id'] . '">' . "\n" . '<img src="' . get_icon_url('enroll') . '" alt="' . get_lang('Register to the class') . '" />' . "\n" . '</a>' . "\n" . '</td>' . "\n";
        } else {
            $out .= '<td align="center">' . "\n" . '<small>' . get_lang('User already in class') . '</small>' . "\n" . '</td>' . "\n";
示例#14
0
 case DISPLAY_FORM:
     // Display form
     if (empty($profile->id)) {
         $out .= claro_html_tool_title(get_lang('Add new profile', null, $cmdList));
     } else {
         $out .= claro_html_tool_title(get_lang('Edit profile', null, $cmdList));
     }
     if (!empty($form)) {
         $dialogBox->form($form);
         $out .= $dialogBox->render();
     }
 case DISPLAY_LIST:
     // List of course profile
     $out .= claro_html_tool_title(get_lang('Course profile list'), null, $cmdList);
     // Pager display
     $out .= $profilePager->disp_pager_tool_bar($_SERVER['PHP_SELF']);
     // Display table header
     $out .= '<table class="claroTable emphaseLine" width="100%" >' . "\n" . '<thead>' . "\n" . '<tr>' . "\n" . '<th>' . get_lang('Name') . '</th>' . "\n" . '<th>' . get_lang('Description') . '</th>' . "\n" . '<th>' . get_lang('Edit') . '</th>' . "\n" . '<th>' . get_lang('Rights') . '</th>' . "\n" . '<th>' . get_lang('Delete') . '</th>' . "\n" . '<th>' . get_lang('Lock') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>';
     foreach ($profileList as $thisProfile) {
         $out .= '<tr align="center">' . "\n" . '<td align="left">' . get_lang($thisProfile['name']) . '</td>' . "\n" . '<td align="left">' . get_lang($thisProfile['description']) . '</td>' . "\n" . '<td><a href="' . $_SERVER['PHP_SELF'] . '?cmd=rqEdit&profile_id=' . $thisProfile['id'] . '"><img src="' . get_icon_url('edit') . '" alt="' . get_lang('Edit') . '" /></td>' . "\n" . '<td><a href="profile.php?display_profile=' . $thisProfile['id'] . '"><img src="' . get_icon_url('settings') . '" alt="' . get_lang('Edit') . '" /></td>' . "\n";
         if ($thisProfile['required'] == '0') {
             $out .= '<td><a href="' . $_SERVER['PHP_SELF'] . '?cmd=exDelete&profile_id=' . $thisProfile['id'] . '&amp;offset=' . $offset . '"><img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" /></td>' . "\n";
         } else {
             $out .= '<td>' . '-' . '</td>' . "\n";
         }
         if ($thisProfile['locked'] == '0') {
             $out .= '<td><a href="' . $_SERVER['PHP_SELF'] . '?cmd=exLock&profile_id=' . $thisProfile['id'] . '&amp;offset=' . $offset . '"><img src="' . get_icon_url('unlock') . '" alt="' . get_lang('Lock') . '" /></td>' . "\n";
         } else {
             $out .= '<td><a href="' . $_SERVER['PHP_SELF'] . '?cmd=exUnlock&profile_id=' . $thisProfile['id'] . '&amp;offset=' . $offset . '"><img src="' . get_icon_url('locked') . '" alt="' . get_lang('Unlock') . '" /></td>' . "\n";
         }
         $out .= '</tr>' . "\n\n";
示例#15
0
if (!empty($resultList)) {
    $cmdList[] = '<a class="claroCmd" href="' . $_SERVER['PHP_SELF'] . '?cmd=unsubscribe_all&amp;class_id=' . $class_id . '"' . ' onclick="if (confirm(\'' . clean_str_for_javascript(get_lang('Unregister all users ?')) . '\')){return true;}else{return false;}">' . '<img src="' . get_icon_url('deluser') . '" /> ' . get_lang('Unregister all users') . '</a>';
} else {
    $cmdList[] = '<span class="claroCmdDisabled" >' . '<img src="' . get_icon_url('deluser') . '" alt="" />' . get_lang('Unregister all users') . '</span>';
}
//------------------------------------
// Display section
//------------------------------------
$out = '';
if (!empty($class_id)) {
    $out .= claro_html_tool_title($nameTools . ' : ' . $classinfo['name']);
    $out .= $dialogBox->render();
    // Display menu
    $out .= '<p>' . claro_html_menu_horizontal($cmdList) . '</p>';
    // Display pager
    $out .= $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF'] . '?class_id=' . $class_id);
    // Display search form
    $out .= '<div style="text-align: right">' . "\n" . '<form action="' . $_SERVER['PHP_SELF'] . '" method="GET">' . "\n" . '<input type="hidden" name="class_id" value="' . $class_id . '" />' . "\n" . '<input type="text" value="' . claro_htmlspecialchars($search) . '" name="search" id="search" size="20" />' . "\n" . '<input type="submit" value=" ' . get_lang('Search') . ' " />' . "\n" . '</form>' . "\n" . '</div>' . "\n" . '<br />' . "\n";
    // Display list of users
    // start table...
    $out .= '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . '<thead>' . '<tr align="center" valign="top">' . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;order_crit=user_id&amp;chdir=yes">' . get_lang('User id') . '</a></th>' . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;order_crit=nom&amp;chdir=yes">' . get_lang('Last name') . '</a></th>' . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;order_crit=prenom&amp;chdir=yes">' . get_lang('First name') . '</a></th>' . '<th><a href="' . $_SERVER['PHP_SELF'] . '?class_id=' . $class_id . '&amp;order_crit=officialCode&amp;chdir=yes">' . get_lang('Administrative code') . '</a></th>' . '<th>' . get_lang('Email') . '</th>' . '<th>' . get_lang('Unregister from class') . '</th>' . '</tr>' . '</thead>' . '<tbody>';
    // Start the list of users...
    foreach ($resultList as $list) {
        $list['officialCode'] = isset($list['officialCode']) ? $list['officialCode'] : ' - ';
        $out .= '<tr>' . '<td align="center" >' . $list['user_id'] . '</td>' . '<td align="left" >' . $list['nom'] . '</td>' . '<td align="left" >' . $list['prenom'] . '</td>' . '<td align="center">' . $list['officialCode'] . '</td>' . '<td align="left">' . $list['email'] . '</td>' . '<td align="center">' . "\n" . '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=unsubscribe&amp;offset=' . $offset . '&amp;user_id=' . $list['user_id'] . '&amp;class_id=' . $class_id . '" ' . ' onclick="return ADMIN.confirmationUnReg(\'' . clean_str_for_javascript($list['prenom'] . ' ' . $list['nom']) . '\');">' . "\n" . '<img src="' . get_icon_url('unenroll') . '" alt="" />' . "\n" . '</a>' . "\n" . '</td></tr>' . "\n";
    }
    // end display users table
    if (empty($resultList)) {
        $out .= '<tr>' . '<td colspan="6" align="center">' . get_lang('No user to display') . '<br />' . '<a href="' . get_path('clarolineRepositoryWeb') . 'admin/admin_class.php">' . get_lang('Back') . '</a>' . '</td>' . '</tr>';
    }
    $out .= '</tbody>' . "\n" . '</table>' . "\n";