} } // default : display all profile if (empty($display_profile_list)) { $profileNameList = claro_get_all_profile_name_list(); $display_profile_list = array_keys($profileNameList); $display_profile_url_param = 'all'; } //================================= // Display section //================================= // define bredcrumb ClaroBreadCrumbs::getInstance()->prepend(get_lang('Course profile list'), 'profile_list.php'); $out = ''; // Set display right $profileRightHtml = new RightProfileToolRightHtml(); $profileRightHtml->addUrlParam('display_profile', $display_profile_url_param); $profileFoundCount = 0; foreach ($display_profile_list as $profileId) { $profile = new RightProfile(); if ($profile->load($profileId)) { $profileRight = new RightCourseProfileToolRight(); $profileRight->setCourseId(claro_get_current_course_id()); $profileRight->load($profile); $profileRightHtml->addRightProfileToolRight($profileRight); $profileFoundCount++; } } if ($profileFoundCount == 0) { $dialogBox->error(get_lang('Profile not found')); $out .= $dialogBox->render();
// 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(); $profileRight->setCourseId(claro_get_current_course_id()); $profileRight->load($profile); $profileRightHtml->addRightProfileToolRight($profileRight); $profileLegend[] = get_lang($profileNameList[$profileId]['name']) . ' : <em>' . get_lang($profileNameList[$profileId]['description']) . '</em>'; } } $out .= '<p><small><span style="text-decoration: underline">' . get_lang('Profile list') . '</span> : ' . implode($profileLegend, ' - ') . '.</small></p>'; $out .= '<blockquote>' . "\n" . $profileRightHtml->displayProfileToolRightList() . '</blockquote>' . "\n";