Example #1
0
             $errorCounter++;
         }
     }
     $dgDataAnalyseResult = new claro_datagrid($dataAnalyseResult);
     $dgDataAnalyseResult->set_idLineType('numeric');
     $dgDataAnalyseResult->set_noRowMessage(get_lang('There is no category'));
     $dgDataAnalyseResult->set_colTitleList(array('Code' => get_lang('Code'), 'Result' => get_lang('Result'), 'Message' => get_lang('Message')));
     if (0 < $errorCounter) {
         $analyseTreeResultMsg['error'][] = get_lang('%nb errors found', array('%nb' => $errorCounter));
     }
     // analyse Course onwance
     if (false === ($courseOwnanceCheck = checkCourseOwnance())) {
         $courseOwnanceCheck = array();
     }
     $dgCourseOwnanceCheck = new claro_datagrid($courseOwnanceCheck);
     $dgCourseOwnanceCheck->set_idLineType('numeric');
     $dgCourseOwnanceCheck->set_colTitleList(array(get_lang('Course code'), get_lang('Unknow faculty')));
     $view = DISP_ANALYSE;
     break;
 case 'repairTree':
     $repairResult = repairTree();
     if ($repairResult) {
         $repairResultMsg['success'][] = get_lang('Categories structure is right');
     } else {
         switch ($failure = claro_failure::get_last_failure()) {
             case 'node_moved':
                 $repairResultMsg['warning'][] = get_lang('Node Moved, relaunch repair process to complete');
                 break;
         }
     }
     $view = DISP_REPAIR_RESULT;
Example #2
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();
Example #3
0
    } 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";
// DISPLAY : List of datas
Example #4
0
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
$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++;