Exemple #1
0
 protected function getManagerLinkList()
 {
     $courseManageToolLinkList = array();
     if ($this->viewMode != 'STUDENT') {
         $courseManageToolLinkList[] = '<a class="claroCmd" href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/tools.php', $this->currentCourseContext)) . '">' . '<img src="' . get_icon_url('edit') . '" alt="" /> ' . get_lang('Edit Tool list') . '</a>';
         $courseManageToolLinkList[] = '<a class="claroCmd" href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/settings.php', $this->currentCourseContext)) . '">' . '<img src="' . get_icon_url('settings') . '" alt="" /> ' . get_lang('Course settings') . '</a>';
         if (!ClaroCourse::isSessionCourse($this->courseId) && claro_is_allowed_to_create_course() && (get_conf('courseSessionAllowed', true) || claro_is_platform_admin())) {
             $courseManageToolLinkList[] = '<a class="claroCmd" href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/create.php', array('course_sourceCourseId' => $this->courseId))) . '">' . '<img src="' . get_icon_url('duplicate') . '" alt="" /> ' . get_lang("Create a session course") . '</a>';
         }
         if (get_conf('is_trackingEnabled')) {
             $courseManageToolLinkList[] = '<a class="claroCmd" href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'tracking/courseReport.php', $this->currentCourseContext)) . '">' . '<img src="' . get_icon_url('statistics') . '" alt="" /> ' . get_lang('Statistics') . '</a>';
         }
         $extraManageToolList = get_course_manage_module_list(true);
         if ($extraManageToolList) {
             foreach ($extraManageToolList as $extraManageTool) {
                 $courseManageToolLinkList[] = '<a class="claroCmd" href="' . claro_htmlspecialchars(Url::Contextualize(get_module_entry_url($extraManageTool['label']))) . '">' . '<img src="' . get_module_icon_url($extraManageTool['label'], $extraManageTool['icon'], 'settings') . '" alt="" /> ' . get_lang($extraManageTool['name']) . '</a>';
             }
         }
     }
     return $courseManageToolLinkList;
 }
Exemple #2
0
// Start the list of modules...
foreach ($moduleList as $module) {
    // Display settings...
    $class_css = $module['activation'] == 'activated' ? '' : ' class="invisible" ';
    // Find icon
    $modulePath = get_module_path($module['label']);
    switch ($typeReq) {
        case 'crsmanage':
        case 'admin':
            $moduleDefaultIcon = 'settings';
            break;
        default:
            $moduleDefaultIcon = 'exe';
            break;
    }
    $iconUrl = get_module_icon_url($module['label'], array_key_exists('icon', $module) ? $module['icon'] : null, $moduleDefaultIcon);
    $icon = '<img src="' . $iconUrl . '" alt="" />';
    // Module_id and icon column
    $out .= "\n" . '<tr ' . $class_css . '>' . "\n" . '<td align="center">' . $icon . '</td>' . "\n";
    // Name column
    $moduleName = $module['name'];
    $out .= '<td align="left">' . get_lang($moduleName) . '</td>' . "\n";
    if (file_exists(get_module_path($module['label']) . '/admin.php') && $module['type'] != 'tool') {
        $out .= '<td align="left"><a href="' . get_module_url($module['label']) . '/admin.php" >' . get_lang('Go to administration') . '</a></td>' . "\n";
    } else {
        $out .= '<td align="left">-</td>' . "\n";
    }
    // Displaying location column
    if ($module['type'] == 'applet') {
        $out .= '<td align="left"><small>';
        if (empty($module_dock[$module['id']])) {