示例#1
0
/**
 * return the HTML source for the menu bar (to navigate between message box)
 *
 * @param int $currentUserId user identification (the admin read message box of an other user)
 * @return string HTML source
 */
function getBarMessageBox($currentUserId, $currentSection)
{
    require_once dirname(__FILE__) . '/messagebox/inbox.lib.php';
    $inboxWithoutFilter = new InBox($currentUserId);
    $sectionList = array('inbox' => get_lang(get_lang('Inbox') . '(' . $inboxWithoutFilter->numberOfUnreadMessage() . ')'), 'outbox' => get_lang('Outbox'), 'trashbox' => get_lang('Trashbox'));
    if (!in_array($currentSection, array_keys($sectionList))) {
        $currentSection = 'inbox';
    }
    $parameter = array();
    if (isset($_REQUEST['userId'])) {
        $parameter['userId'] = (int) $_REQUEST['userId'];
    }
    return claro_html_tab_bar($sectionList, $currentSection, $parameter, 'box', get_path('clarolineRepositoryWeb') . "messaging/messagebox.php");
}
示例#2
0
文件: tools.php 项目: rhertzog/lcs
        $main_tid = $thisTool['tool_id'];
        // course_tool
        $displayToolList[$main_tid]['tid'] = $tid;
        $displayToolList[$main_tid]['icon'] = get_module_url($thisTool['label']) . '/' . $thisTool['icon'];
        $displayToolList[$main_tid]['visibility'] = (bool) $thisTool['visibility'];
        $displayToolList[$main_tid]['activation'] = (bool) $thisTool['activation'];
    }
}
// Get external link list
$courseExtLinkList = claro_get_course_external_link_list();
/*============================================================================
    DISPLAY
 ============================================================================*/
$out = '';
$out .= claro_html_tool_title(get_lang('Edit Tool list'));
$out .= claro_html_tab_bar($sectionList, $currentSection);
$out .= $dialogBox->render();
if ($currentSection == 'toolRights') {
    $out .= '<p>' . get_lang('Select the tools you want to make visible for your user.') . get_lang('An invisible tool will be greyed out on your personal interface.') . '<br />' . get_lang('You can also change the access rights for the different user profiles.') . '</p>' . "\n";
    // Display course tool list
    // Get all profile
    $profileNameList = claro_get_all_profile_name_list();
    $display_profile_list = array_keys($profileNameList);
    $profileRightHtml = new RightProfileToolRightHtml();
    $profileRightHtml->addUrlParam('section', claro_htmlspecialchars($currentSection));
    $profileRightHtml->setCourseToolInfo($displayToolList);
    $profileLegend = array();
    foreach ($display_profile_list as $profileId) {
        $profile = new RightProfile();
        if ($profile->load($profileId)) {
            $profileRight = new RightCourseProfileToolRight();