示例#1
0
        $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>');
}
$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";
示例#2
0
$colTitleList = array('user_id' => '<a href="' . $sortUrlList['user_id'] . '">' . get_lang('Numero') . '</a>', 'name' => '<a href="' . $sortUrlList['name'] . '">' . get_lang('Last name') . '</a>', 'firstname' => '<a href="' . $sortUrlList['firstname'] . '">' . get_lang('First name') . '</a>', 'officialCode' => '<a href="' . $sortUrlList['officialCode'] . '">' . get_lang('Administrative code') . '</a>', 'email' => '<a href="' . $sortUrlList['email'] . '">' . get_lang('Email') . '</a>', 'isCourseCreator' => '<a href="' . $sortUrlList['isCourseCreator'] . '">' . get_lang('Status') . '</a>', 'settings' => get_lang('User settings'));
if (get_conf("registrationRestrictedThroughCategories")) {
    $colTitleList['qty_category'] = get_lang('Categories');
}
$colTitleList['qty_class'] = get_lang('Classes');
$colTitleList['qty_course'] = get_lang('Courses');
$colTitleList['delete'] = get_lang('Delete');
$colTitleList['login_as'] = get_lang('Login as');
$userDataGrid = new claro_datagrid();
$userDataGrid->set_grid($userGrid);
$userDataGrid->set_colHead('name');
$userDataGrid->set_colTitleList($colTitleList);
if (count($userGrid) == 0) {
    $userDataGrid->set_noRowMessage('<center>' . get_lang('No user to display') . "\n" . '<br />' . "\n" . '<a href="advanced_user_search.php' . $addtoAdvanced . '">' . get_lang('Search again (advanced)') . '</a></center>' . "\n");
} else {
    $userDataGrid->set_colAttributeList(array('user_id' => array('align' => 'center'), 'officialCode' => array('align' => 'center'), 'settings' => array('align' => 'center'), 'delete' => array('align' => 'center'), 'login_as' => array('align' => 'center')));
}
//---------
// DISPLAY
//---------
//PREPARE
// Javascript
JavascriptLanguage::getInstance()->addLangVar('Are you sure to delete %name ?');
JavascriptLoader::getInstance()->load('admin');
JavascriptLoader::getInstance()->load('admin_users');
$out = '';
// Command list
$cmdList = array();
$cmdList[] = array('img' => 'user', 'name' => get_lang('Create user'), 'url' => 'adminaddnewuser.php');
$cmdList[] = array('img' => 'locked', 'name' => get_lang('Reset all user passwords'), 'url' => $_SERVER['PHP_SELF'] . '?cmd=rqResetAllPasswords');
$out .= claro_html_tool_title($nameTools, null, $cmdList);
示例#3
0
/**
 * PREPARE DISPLAY
 */
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
$contactUidList = claro_get_uid_of_platform_contact();
$requestUidList = claro_get_uid_of_request_admin();
$notifiedUidList = claro_get_uid_of_system_notification_recipient();
foreach ($platformAdminUidList as $k => $platformAdminUid) {
    $userData = user_get_properties($platformAdminUid);
    $userDataGrid[$k]['id'] = $userData['user_id'];
    $userDataGrid[$k]['name'] = $userData['lastname'];
    $userDataGrid[$k]['firstname'] = $userData['firstname'];
    $userDataGrid[$k]['email'] = $userData['email'];
    $userDataGrid[$k]['authSource'] = $userData['authSource'];
    //$userDataGrid[$k]['contact_switch'] = '<input name="contactList[]" type="checkbox" value="' . $platformAdminUid . '" ' . ((bool) in_array($platformAdminUid,$contactUidList)  ? 'checked="checked"  />' : '>');
    $userDataGrid[$k]['request_switch'] = '<input name="requestList[]" type="checkbox" value="' . $platformAdminUid . '" ' . ((bool) in_array($platformAdminUid, $requestUidList) ? 'checked="checked"  /> ' : '> ');
    $userDataGrid[$k]['notification_switch'] = '<input name="notifiedList[]" type="checkbox" value="' . $platformAdminUid . '" ' . ((bool) in_array($platformAdminUid, $notifiedUidList) ? 'checked="checked"  /> ' : '> ');
}
$adminDataGrid = new claro_datagrid($userDataGrid);
$adminDataGrid->set_idLineType('none');
$adminDataGrid->set_colHead('name');
$adminDataGrid->set_colTitleList(array('user id' => get_lang('User id'), 'name' => get_lang('Last name'), 'firstname' => get_lang('First name'), 'email' => get_lang('Email'), 'authSource' => get_lang('Authentication source'), 'request_switch' => get_lang('Request'), 'notification_switch' => get_lang('Notify')));
$adminDataGrid->set_colAttributeList(array('request_switch' => array('align' => 'left'), 'notification_switch' => array('align' => 'left'), 'authSource' => array('align' => 'center')));
/**
 * DISPLAY
 */
$out = '';
// Display tool title
$out .= claro_html_tool_title($nameTools) . claro_html_msg_list($messageList) . '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">' . "\n" . '<input type="hidden" name="cmd" value="setRecipient" />' . "\n" . $adminDataGrid->render() . '<input type="submit" value="' . get_lang('Ok') . '" />&nbsp;' . "\n" . claro_html_button($_SERVER['PHP_SELF'], get_lang('Cancel')) . "\n" . '</form>' . "\n";
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
示例#4
0
        $courseDataList[$numLine]['officialCode'] = $courseLine['officialCode'];
    } else {
        $courseDataList[$numLine]['officialCode'] = '<span class="invisible" >' . $courseLine['officialCode'] . '</span>';
    }
    // Label
    $courseDataList[$numLine]['intitule'] = '<a href="' . get_path('clarolineRepositoryWeb') . 'course/index.php?cid=' . htmlspecialchars($courseLine['sysCode']) . '">' . $courseLine['intitule'] . '</a>' . (!is_null($courseLine['sourceCourseId']) ? ' [' . get_lang('Session') . ']' : '') . ($courseLine['isSourceCourse'] ? ' [' . get_lang('Source') . ']' : '');
    // Course Action Delete
    $courseDataList[$numLine]['cmdDelete'] = '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=rqDelete&amp;delCode=' . $courseLine['sysCode'] . $addToURL . '" ' . ' class="delete" id="' . $courseLine['intituleOrigine'] . '__' . $courseLine['sysCode'] . '">' . "\n" . '<img src="' . get_icon_url('delete') . '" border="0" alt="" />' . "\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>', 'cmdDelete' => get_lang('Delete')));
$courseDataGrid->set_colAttributeList(array('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>');
/**
 * DISPLAY
 */
$out = '';
$out .= claro_html_tool_title($nameTools);
if (!empty($isSearched)) {
    $dialogBox->info('<b>' . get_lang('Search on') . '</b> : <small>' . $isSearched . '</small>');
}
$out .= $dialogBox->render();
// DISPLAY : List of datas
$out .= $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF']) . $courseDataGrid->render() . $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF']);
$out .= '<script type="text/javascript">
示例#5
0
$nameTools = get_lang('Scan technical fault');
$htmlHeadXtra[] = "\n<style media='print' type='text/css'>\n<!--\nTD {border-bottom: thin dashed Gray;}\n-->\n</style>";
$display = $is_allowedToCheckProblems ? DISP_RESULT : DISP_NOT_ALLOWED;
////////////// OUTPUT ///////////////
$out = '';
$out .= claro_html_tool_title($nameTools);
switch ($display) {
    case DISP_NOT_ALLOWED:
        $dialogBox = new DialogBox();
        $dialogBox->error(get_lang('Not allowed'));
        $out .= $dialogBox->render();
        break;
    case DISP_RESULT:
        $dg = new claro_datagrid();
        $dg->set_idLineType('numeric');
        $dg->set_colAttributeList(array('qty' => array('width' => '15%', 'align' => 'center')));
        // in $view, a 1 in X posof the $view string means that the 'category' number X
        // will be show, 0 means don't show
        $out .= '<small>' . '[<a href="' . $_SERVER['PHP_SELF'] . '?view=111111111">' . get_lang('Show all') . '</a>]' . '&nbsp;' . '[<a href="' . $_SERVER['PHP_SELF'] . '?view=000000000">' . get_lang('Show none') . '</a>]' . '</small>' . "\n\n";
        if (isset($_REQUEST['view'])) {
            $view = strip_tags($_REQUEST['view']);
        } else {
            $view = "000000000";
        }
        $levelView = -1;
        /***************************************************************************
         *        Main
         ***************************************************************************/
        $tempView = $view;
        $levelView++;
        $out .= '<p>' . "\n";
示例#6
0
        $userCourseGrid[$courseKey]['isCourseManager'] = '<img class="qtip" src="' . get_icon_url('manager') . '" alt="' . get_lang('Course manager') . '" />';
    } else {
        $userCourseGrid[$courseKey]['isCourseManager'] = '<img class="qtip" src="' . get_icon_url('user') . '" alt="' . get_lang('Student') . '" />';
    }
    $userCourseGrid[$courseKey]['edit_course_user'] = '******' . $course['sysCode'] . '&amp;uidToEdit=' . $uidToEdit . '&amp;ccfrom=uclist">' . '<img src="' . get_icon_url('edit') . '" alt="' . get_lang('Course manager') . '" title="' . get_lang('User\'s course settings') . '" />' . '</a>';
    $userCourseGrid[$courseKey]['delete'] = '<a href="' . $_SERVER['PHP_SELF'] . '?uidToEdit=' . $uidToEdit . '&amp;cmd=unsubscribe' . $addToUrl . '&amp;courseId=' . claro_htmlspecialchars($course['sysCode']) . '&amp;sort=' . $pagerSortKey . '&amp;dir=' . $pagerSortDir . '&amp;offset=' . $offset . '"' . ' onclick="return ADMIN.confirmationUnReg(\'' . clean_str_for_javascript($userData['firstname'] . ' ' . $userData['lastname']) . '\');">' . "\n" . '<img src="' . get_icon_url('unenroll') . '" alt="' . get_lang('Delete') . '" />' . "\n" . '</a>' . "\n";
}
$sortUrlList = $myPager->get_sort_url_list($_SERVER['PHP_SELF'] . '?uidToEdit=' . $uidToEdit);
$userCourseDataGrid = new claro_datagrid();
$userCourseDataGrid->set_grid($userCourseGrid);
// extended setting for this datagrid
$userCourseDataGrid->set_colTitleList(array('officialCode' => '<a href="' . $sortUrlList['officialCode'] . '">' . get_lang('Course code') . '</a>', 'name' => '<a href="' . $sortUrlList['name'] . '">' . get_lang('Course title') . '</a>', 'profileId' => '<a href="' . $sortUrlList['profileId'] . '">' . get_lang('User profile') . '</a>', 'isCourseManager' => '<a href="' . $sortUrlList['isCourseManager'] . '">' . get_lang('Role') . '</a>', 'edit_course_user' => get_lang('Edit settings') . '</a>', 'delete' => get_lang('Unregister user')));
if (0 == count($userCourseGrid)) {
    $userCourseDataGrid->set_noRowMessage(get_lang('No course to display'));
} else {
    $userCourseDataGrid->set_colAttributeList(array('officialCode' => array('align' => 'left'), 'name' => array('align' => 'left'), 'isCourseManager' => array('align' => 'center'), 'edit_course_user' => array('align' => 'center'), 'delete' => array('align' => 'center')));
}
// Initialisation of global variables and used libraries
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
$nameTools = get_lang('User course list');
// Javascript confirm pop up declaration for header
JavascriptLanguage::getInstance()->addLangVar('Are you sure you want to unregister %name ?');
JavascriptLanguage::getInstance()->addLangVar('Are you sure you want to unregister %name for all courses?');
JavascriptLoader::getInstance()->load('admin');
// Command list
$cmdList[] = array('img' => 'usersetting', 'name' => get_lang('User settings'), 'url' => 'admin_profile.php?uidToEdit=' . $uidToEdit);
$cmdList[] = array('img' => 'course', 'name' => get_lang('Enrol to a new course'), 'url' => '../auth/courses.php?cmd=rqReg&amp;uidToEdit=' . $uidToEdit . '&amp;category=&amp;fromAdmin=usercourse');
$cmdList[] = array('img' => 'delete', 'name' => get_lang('Unregister for all courses'), 'url' => $_SERVER['PHP_SELF'] . '?cmd=rqRmAll&amp;uidToEdit=' . $uidToEdit, 'params' => array('onclick' => "return ADMIN.confirmationUnRegForAllCourses('" . clean_str_for_javascript($userData['firstname'] . " " . $userData['lastname']) . "');"));
if ('ulist' == $cfrom) {
    $cmdList[] = array('img' => 'back', 'name' => get_lang('Back to user list'), 'url' => 'admin_users.php');
}