当前位置: 首页>>代码示例>>PHP>>正文


PHP CourseManager::get_teacher_list_from_course_code_to_string方法代码示例

本文整理汇总了PHP中CourseManager::get_teacher_list_from_course_code_to_string方法的典型用法代码示例。如果您正苦于以下问题:PHP CourseManager::get_teacher_list_from_course_code_to_string方法的具体用法?PHP CourseManager::get_teacher_list_from_course_code_to_string怎么用?PHP CourseManager::get_teacher_list_from_course_code_to_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CourseManager的用法示例。


在下文中一共展示了CourseManager::get_teacher_list_from_course_code_to_string方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_lang

$course_name = get_lang('Course').' '.$courseInfo['name'];

if ($session_id) {
    echo Display::page_subheader(
        Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.api_get_session_name($session_id).' '.
        Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name
    );
} else {
    echo Display::page_subheader(
        Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$courseInfo['name']
    );
}

$teacherList = CourseManager::get_teacher_list_from_course_code_to_string(
    $courseInfo['code'],
    ',',
    false
);

$coaches = null;
if (!empty($session_id)) {
    $coaches = CourseManager::get_coachs_from_course_to_string(
        $session_id,
        $courseInfo['code'],
        ',',
        false
    );
}

if (!empty($teacherList)) {
    echo Display::page_subheader2(get_lang('Teachers'));
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:courseLog.php

示例2: html_to_pdf_with_template

    /**
     * Export the given HTML to PDF, using a global template
     * @param string $content the HTML content
     *
     * @uses export/table_pdf.tpl
     */
    public function html_to_pdf_with_template($content)
    {
        global $_configuration;
        Display :: display_no_header();

        // Assignments
        Display::$global_template->assign('pdf_content', $content);

        $organization = api_get_setting('Institution');
        $img = api_get_path(SYS_CODE_PATH).'css/'.api_get_visual_theme().'/images/header-logo.png';

        // Search for classic logo
        if (file_exists($img)) {
            $img = api_get_path(WEB_CODE_PATH).'css/'.api_get_visual_theme().'/images/header-logo.png';
            $organization = "<img src='$img'>";
        } else {
            // Just use the platform title.
            if (!empty($organization)) {
                $organization = '<h2 align="left">'.$organization.'</h2>';
            }
        }

        // Use custom logo image.
        if (isset($_configuration['pdf_logo_header']) &&
            $_configuration['pdf_logo_header']
        ) {
            $img = api_get_path(SYS_CODE_PATH).'css/'.api_get_visual_theme().'/images/pdf_logo_header.png';
            if (file_exists($img)) {
                $img = api_get_path(WEB_CODE_PATH) . 'css/' . api_get_visual_theme() . '/images/pdf_logo_header.png';
                $organization = "<img src='$img'>";
            }
        }

        Display::$global_template->assign('organization', $organization);

        //Showing only the current teacher/admin instead the all teacher list name see BT#4080

        if (isset($this->params['show_real_course_teachers']) &&
            $this->params['show_real_course_teachers']
        ) {
            if (isset($this->params['session_info']) &&
                !empty($this->params['session_info'])
            ) {
                $teacher_list = SessionManager::getCoachesByCourseSessionToString(
                    $this->params['session_info']['id'],
                    $this->params['course_code']

                );
            } else {
                $teacher_list = CourseManager::get_teacher_list_from_course_code_to_string(
                    $this->params['course_code']
                );
            }
        } else {
            $user_info = api_get_user_info();
            $teacher_list = $user_info['complete_name'];
        }

        Display::$global_template->assign('pdf_course', $this->params['course_code']);
        Display::$global_template->assign('pdf_course_info', $this->params['course_info']);
        Display::$global_template->assign('pdf_session_info', $this->params['session_info']);
        Display::$global_template->assign('pdf_date', api_format_date(api_get_local_time(), DATE_TIME_FORMAT_LONG));
        Display::$global_template->assign('pdf_teachers', $teacher_list);
        Display::$global_template->assign('pdf_title', $this->params['pdf_title']);
        Display::$global_template->assign('add_signatures', $this->params['add_signatures']);

        // Getting template
        $tpl = Display::$global_template->get_template('export/table_pdf.tpl');
        $html = Display::$global_template->fetch($tpl);
        $html = api_utf8_encode($html);

        $css_file = api_get_path(TO_SYS, WEB_CSS_PATH).'/print.css';
        $css = file_exists($css_file) ? @file_get_contents($css_file) : '';
        self::content_to_pdf($html, $css, $this->params['filename'], $this->params['course_code']);
    }
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:81,代码来源:pdf.lib.php

示例3: get_lang

 case 'pdf':
     $description = '<table class="data_table_no_border">';
     if (api_get_session_id()) {
         $description .= '<tr><td>' . get_lang('Session') . ': </td><td class="highlight">' . api_get_session_name(api_get_session_id()) . '</td>';
     }
     $description .= '<tr><td>' . get_lang('Course') . ': </td><td class="highlight">' . $course_info['name'] . '</td>';
     $teachers = CourseManager::get_teacher_list_from_course_code($course_info['real_id']);
     //If I'm a teacher in this course show just my name
     if (isset($teachers[$user_id])) {
         if (!empty($teachers)) {
             $teacher_info = $teachers[$user_id];
             $description .= '<tr><td>' . get_lang('Teacher') . ': </td><td class="highlight">' . api_get_person_name($teacher_info['firstname'], $teacher_info['lastname']) . '</td>';
         }
     } else {
         //If not show all teachers
         $teachers = CourseManager::get_teacher_list_from_course_code_to_string($course_info['real_id']);
         if (!empty($teachers)) {
             $description .= '<tr><td>' . get_lang('Teachers') . ': </td><td class="highlight">' . $teachers . '</td>';
         }
     }
     if (!empty($session_id)) {
         //If I'm a coach
         $coaches = CourseManager::get_coach_list_from_course_code($course_info['real_id'], $session_id);
         if (isset($coaches) && isset($coaches[$user_id])) {
             $user_info = api_get_user_info($user_id);
             $description .= '<tr><td>' . get_lang('Coach') . ': </td><td class="highlight">' . $user_info['complete_name'] . '</td>';
         } else {
             //If not show everything
             $teachers = CourseManager::get_coach_list_from_course_code_to_string($course_info['real_id'], $session_id);
             if (!empty($teachers)) {
                 $description .= '<tr><td>' . get_lang('Coachs') . ': </td><td class="highlight">' . $coaches . '</td>';
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:user.php

示例4: return_courses_in_categories


//.........这里部分代码省略.........
        }
        $result .= $htmlTitre;
        if ($thereIsSubCat) {
            $result .=  $htmlListCat;
        }
        while ($categoryName = Database::fetch_array($resCats)) {
            $result .= '<h3>' . $categoryName['name'] . "</h3>\n";
        }
        $numrows = Database::num_rows($sql_result_courses);
        $courses_list_string = '';
        $courses_shown = 0;
        if ($numrows > 0) {
            $courses_list_string .= Display::page_header(get_lang('CourseList'));
            $courses_list_string .= "<ul>";
            if (api_get_user_id()) {
                $courses_of_user = self::get_courses_of_user(api_get_user_id());
            }
            foreach ($course_list as $course) {
                // $setting_show_also_closed_courses
                if ($course['visibility'] == COURSE_VISIBILITY_HIDDEN) { continue; }
                if (!$setting_show_also_closed_courses) {
                    // If we do not show the closed courses
                    // we only show the courses that are open to the world (to everybody)
                    // and the courses that are open to the platform (if the current user is a registered user.
                    if (($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM) || ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD)) {
                        $courses_shown++;
                        $courses_list_string .= "<li>";
                        $courses_list_string .= '<a href="'.$web_course_path.$course['directory'].'/">'.$course['title'].'</a><br />';
                        $course_details = array();
                        if (api_get_setting('display_coursecode_in_courselist') == 'true') {
                            $course_details[] = $course['visual_code'];
                        }
                        if (api_get_setting('display_teacher_in_courselist') == 'true') {
                            $course_details[] = CourseManager::get_teacher_list_from_course_code_to_string($course['code']);
                        }
                        if (api_get_setting('show_different_course_language') == 'true' && $course['course_language'] != api_get_setting('platformLanguage')) {
                            $course_details[] = $course['course_language'];
                        }
                        $courses_list_string .= implode(' - ', $course_details);
                        $courses_list_string .= "</li>";
                    }
                } else {
                    // We DO show the closed courses.
                    // The course is accessible if (link to the course homepage):
                    // 1. the course is open to the world (doesn't matter if the user is logged in or not): $course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD);
                    // 2. the user is logged in and the course is open to the world or open to the platform: ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM);
                    // 3. the user is logged in and the user is subscribed to the course and the course visibility is not COURSE_VISIBILITY_CLOSED;
                    // 4. the user is logged in and the user is course admin of te course (regardless of the course visibility setting);
                    // 5. the user is the platform admin api_is_platform_admin().
                    //
                    $courses_shown++;
                    $courses_list_string .= "<li>";
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)
                        || ($user_identified && array_key_exists($course['code'], $courses_of_user)
                            && $course['visibility'] != COURSE_VISIBILITY_CLOSED)
                        || $courses_of_user[$course['code']]['status'] == '1'
                        || api_is_platform_admin()) {
                            $courses_list_string .= '<a href="'.$web_course_path.$course['directory'].'/">';
                        }
                    $courses_list_string .= $course['title'];
                    if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD
                        || ($user_identified && $course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM)
                        || ($user_identified && array_key_exists($course['code'], $courses_of_user)
                            && $course['visibility'] != COURSE_VISIBILITY_CLOSED)
                            || $courses_of_user[$course['code']]['status'] == '1'
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:67,代码来源:userportal.lib.php

示例5: return_title

/**
 * Display the title of a course in course catalog
 * @param $course
 */
function return_title($course)
{
    $html = '';
    $linkCourse = api_get_course_url($course['code']);
    $title = cut($course['title'], 70);
    $ajax_url = api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=add_course_vote';
    $teachers = CourseManager::get_teacher_list_from_course_code_to_string($course['code']);
    $rating = Display::return_rating_system('star_' . $course['real_id'], $ajax_url . '&amp;course_id=' . $course['real_id'], $course['point_info']);
    $html .= '<h4 class="title"><a href="' . $linkCourse . '">' . cut($title, 60) . '</a></h4>';
    $html .= '<div class="teachers">' . $teachers . '</div>';
    $html .= '<div class="ranking">' . $rating . '</div>';
    return $html;
}
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:17,代码来源:courses_categories.php

示例6: html_to_pdf_with_template

 /**
  * Export the given HTML to PDF, using a global template
  *
  * @uses export/table_pdf.tpl
  * @param $content
  * @param bool|false $saveToFile
  * @param bool|false $returnHtml
  *
  * @return string
  */
 public function html_to_pdf_with_template($content, $saveToFile = false, $returnHtml = false)
 {
     if (empty($this->template)) {
         $tpl = new Template('', false, false, false);
     } else {
         $tpl = $this->template;
     }
     // Assignments
     // Assignments
     $tpl->assign('pdf_content', $content);
     $organization = api_get_setting('Institution');
     $img = api_get_path(SYS_CSS_PATH) . 'themes/' . api_get_visual_theme() . '/images/header-logo.png';
     // Search for classic logo
     if (file_exists($img)) {
         $img = api_get_path(WEB_CSS_PATH) . 'themes/' . api_get_visual_theme() . '/images/header-logo.png';
         $organization = "<img src='{$img}'>";
     } else {
         // Just use the platform title.
         if (!empty($organization)) {
             $organization = '<h2 align="left">' . $organization . '</h2>';
         }
     }
     // Use custom logo image.
     $pdfLogo = api_get_setting('pdf_logo_header');
     if ($pdfLogo === 'true') {
         $visualTheme = api_get_visual_theme();
         $img = api_get_path(SYS_CSS_PATH) . 'themes/' . $visualTheme . '/images/pdf_logo_header.png';
         if (file_exists($img)) {
             $img = api_get_path(WEB_CSS_PATH) . 'themes/' . $visualTheme . '/images/pdf_logo_header.png';
             $organization = "<img src='{$img}'>";
         }
     }
     $tpl->assign('organization', $organization);
     //Showing only the current teacher/admin instead the all teacher list name see BT#4080
     if (isset($this->params['show_real_course_teachers']) && $this->params['show_real_course_teachers']) {
         if (isset($this->params['session_info']) && !empty($this->params['session_info'])) {
             $teacher_list = SessionManager::getCoachesByCourseSessionToString($this->params['session_info']['id'], $this->params['course_info']['real_id']);
         } else {
             $teacher_list = CourseManager::get_teacher_list_from_course_code_to_string($this->params['course_code']);
         }
     } else {
         $user_info = api_get_user_info();
         if ($this->params['show_teacher_as_myself']) {
             $teacher_list = $user_info['complete_name'];
         }
     }
     $tpl->assign('pdf_course', $this->params['course_code']);
     $tpl->assign('pdf_course_info', $this->params['course_info']);
     $tpl->assign('pdf_session_info', $this->params['session_info']);
     $tpl->assign('pdf_date', $this->params['pdf_date']);
     $tpl->assign('pdf_teachers', $teacher_list);
     $tpl->assign('pdf_title', $this->params['pdf_title']);
     $tpl->assign('pdf_student_info', $this->params['student_info']);
     $tpl->assign('show_grade_generated_date', $this->params['show_grade_generated_date']);
     $tpl->assign('add_signatures', $this->params['add_signatures']);
     // Getting template
     $tableTemplate = $tpl->get_template('export/table_pdf.tpl');
     $html = $tpl->fetch($tableTemplate);
     $html = api_utf8_encode($html);
     $css_file = api_get_path(TO_SYS, WEB_CSS_PATH) . '/print.css';
     $css = file_exists($css_file) ? @file_get_contents($css_file) : '';
     $html = self::content_to_pdf($html, $css, $this->params['filename'], $this->params['course_code'], 'D', $saveToFile, null, $returnHtml);
     if ($returnHtml) {
         return $html;
     }
 }
开发者ID:secuencia24,项目名称:chamilo-lms,代码行数:76,代码来源:pdf.lib.php

示例7: exportAllStudentWorkFromPublication

/**
 * @param int $workId
 * @param array $courseInfo
 * @param int $sessionId
 * @param string $format
 * @return bool
 */
function exportAllStudentWorkFromPublication(
    $workId,
    $courseInfo,
    $sessionId,
    $format = 'pdf'
) {
    if (empty($courseInfo)) {
        return false;
    }

    $workData = get_work_data_by_id($workId);

    if (empty($workData)) {
        return false;
    }

    $assignment = get_work_assignment_by_id($workId);

    $courseCode = $courseInfo['code'];
    $header = get_lang('Course').': '.$courseInfo['title'];
    $teachers = CourseManager::get_teacher_list_from_course_code_to_string(
        $courseCode
    );

    if (!empty($sessionId)) {
        $sessionInfo = api_get_session_info($sessionId);
        if (!empty($sessionInfo)) {
            $header .= ' - ' . $sessionInfo['name'];
            $header .= '<br />' . $sessionInfo['description'];
            $teachers = SessionManager::getCoachesByCourseSessionToString(
                $sessionId,
                $courseCode
            );
        }
    }

    $header .= '<br />'.get_lang('Teachers').': '.$teachers.'<br />';
    $header .= '<br />'.get_lang('Date').': '.api_get_local_time().'<br />';
    $header .= '<br />'.get_lang('StudentPublication').': '.$workData['title'].'<br />';

    $content = null;
    $expiresOn = null;

    if (!empty($assignment) && isset($assignment['expires_on'])) {
        $content .= '<br /><strong>' . get_lang('ExpiryDate') . '</strong>: ' . api_get_local_time($assignment['expires_on']);
        $expiresOn = api_get_local_time($assignment['expires_on']);
    }

    if (!empty($workData['description'])) {
        $content .= '<br /><strong>' . get_lang('Description') . '</strong>: ' . $workData['description'];
    }

    $workList = get_work_user_list(null, null, null, null, $workId);

    switch ($format) {
        case 'pdf':
            if (!empty($workList)) {
                require_once api_get_path(LIBRARY_PATH).'pdf.lib.php';

                $table = new HTML_Table(array('class' => 'data_table'));
                $headers = array(
                    get_lang('Name'),
                    get_lang('User'),
                    get_lang('HandOutDateLimit'),
                    get_lang('SentDate'),
                    get_lang('Filename'),
                    get_lang('Score'),
                    get_lang('Feedback')
                );

                $column = 0;
                foreach($headers as $header) {
                    $table->setHeaderContents(0, $column, $header);
                    $column++;
                }

                $row = 1;

                //$pdf->set_custom_header($header);
                foreach ($workList as $work) {
                    $content .= '<hr />';
                    // getWorkComments need c_id
                    $work['c_id'] = $courseInfo['real_id'];

                    //$content .= get_lang('Date').': '.api_get_local_time($work['sent_date_from_db']).'<br />';
                    $score = null;
                    if (!empty($work['qualification_only'])) {
                        $score = $work['qualification_only'];
                    }
                    //$content .= get_lang('Description').': '.$work['description'].'<br />';
                    $comments = getWorkComments($work);

                    $feedback = null;
//.........这里部分代码省略.........
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:101,代码来源:work.lib.php

示例8: process_hot_course_item

 public static function process_hot_course_item($courses, $my_course_code_list = array())
 {
     $ajax_url = api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=add_course_vote';
     foreach ($courses as &$my_course) {
         $course_info = api_get_course_info_by_id($my_course['c_id']);
         $my_course['extra_info'] = $course_info;
         $my_course['extra_info']['go_to_course_button'] = '';
         $my_course['extra_info']['register_button'] = '';
         $access_link = self::get_access_link_by_user(api_get_user_id(), $course_info, $my_course_code_list);
         //Course visibility
         if ($access_link && in_array('register', $access_link)) {
             $stok = Security::get_token();
             $my_course['extra_info']['register_button'] = Display::url(get_lang('Subscribe'), api_get_path(WEB_COURSE_PATH) . $course_info['path'] . '/index.php?action=subscribe&amp;sec_token=' . $stok, array('class' => 'btn btn-primary'));
         }
         if ($access_link && in_array('enter', $access_link)) {
             $my_course['extra_info']['go_to_course_button'] = Display::url(get_lang('GoToCourse'), api_get_path(WEB_COURSE_PATH) . $course_info['path'] . '/index.php', array('class' => 'btn btn-primary'));
         }
         // Description
         $my_course['extra_info']['description_button'] = '';
         if ($course_info['visibility'] == COURSE_VISIBILITY_OPEN_WORLD || in_array($course_info['real_id'], $my_course_code_list)) {
             $my_course['extra_info']['description_button'] = Display::url(get_lang('Description'), api_get_path(WEB_AJAX_PATH) . 'course_home.ajax.php?a=show_course_information&amp;code=' . $course_info['code'], array('class' => 'ajax btn btn-default'));
         }
         $my_course['extra_info']['teachers'] = CourseManager::get_teacher_list_from_course_code_to_string($course_info['real_id']);
         $point_info = self::get_course_ranking($course_info['real_id'], 0);
         $my_course['extra_info']['rating_html'] = Display::return_rating_system('star_' . $course_info['real_id'], $ajax_url . '&amp;course_id=' . $course_info['real_id'], $point_info);
     }
     return $courses;
 }
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:28,代码来源:course.lib.php

示例9: display_title

/**
 * Display the title of a course in course catalog
 * @param $course
 */
function display_title($course)
{
    $title      = cut($course['title'], 70);
    $ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote';
    $teachers = CourseManager::get_teacher_list_from_course_code_to_string($course['code']);
    $rating = Display::return_rating_system('star_'.$course['real_id'], $ajax_url.'&amp;course_id='.$course['real_id'], $course['point_info']);

    $teachers = '<h5>'.$teachers.'</h5>';
    echo '<div class="categories-course-description">';
    echo '<h3>'.cut($title, 60).'</h3>';
    echo $teachers;
    echo $rating;
    echo '</div>';  // categories-course-description
}
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:18,代码来源:courses_categories.php

示例10: getCourseParamsForDisplay

 /**
  * Return tab of params to display a course title in the My Courses tab
  * Check visibility, right, and notification icons, and load_dirs option
  * @param $courseId
  * @param bool $loadDirs
  * @return array
  */
 public static function getCourseParamsForDisplay($courseId, $loadDirs = false)
 {
     $user_id = api_get_user_id();
     // Table definitions
     $TABLECOURS = Database::get_main_table(TABLE_MAIN_COURSE);
     $TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER);
     $TABLE_ACCESS_URL_REL_COURSE = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
     $current_url_id = api_get_current_access_url_id();
     // Get course list auto-register
     $special_course_list = self::get_special_course_list();
     $without_special_courses = '';
     if (!empty($special_course_list)) {
         $without_special_courses = ' AND course.code NOT IN ("' . implode('","', $special_course_list) . '")';
     }
     //AND course_rel_user.relation_type<>".COURSE_RELATION_TYPE_RRHH."
     $sql = "SELECT course.id, course.title, course.code, course.subscribe subscr, course.unsubscribe unsubscr, course_rel_user.status status,\n                course_rel_user.sort sort, course_rel_user.user_course_cat user_course_cat\n                FROM    {$TABLECOURS}      course,\n                        {$TABLECOURSUSER}  course_rel_user, " . $TABLE_ACCESS_URL_REL_COURSE . " url\n                WHERE   course.id=" . intval($courseId) . "\n                        AND course.id = course_rel_user.c_id\n                        AND url.c_id = course.id\n                        AND course_rel_user.user_id = " . intval($user_id) . "\n                        {$without_special_courses} ";
     // If multiple URL access mode is enabled, only fetch courses
     // corresponding to the current URL.
     if (api_get_multiple_access_url() && $current_url_id != -1) {
         $sql .= " AND url.course_code=course.code AND access_url_id=" . intval($current_url_id);
     }
     // Use user's classification for courses (if any).
     $sql .= " ORDER BY course_rel_user.user_course_cat, course_rel_user.sort ASC";
     $result = Database::query($sql);
     // Browse through all courses. We can only have one course because of the  course.id=".intval($courseId) in sql query
     $course = Database::fetch_array($result);
     $course_info = api_get_course_info($course['code']);
     //$course['id_session'] = null;
     $course_info['id_session'] = null;
     $course_info['status'] = $course['status'];
     // For each course, get if there is any notification icon to show
     // (something that would have changed since the user's last visit).
     $show_notification = Display::show_notification($course_info);
     // New code displaying the user's status in respect to this course.
     $status_icon = Display::return_icon('blackboard.png', $course_info['title'], array(), ICON_SIZE_LARGE);
     $params = array();
     $params['right_actions'] = '';
     if (api_is_platform_admin()) {
         if ($loadDirs) {
             $params['right_actions'] .= '<a id="document_preview_' . $course_info['real_id'] . '_0" class="document_preview" href="javascript:void(0);">' . Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'), ICON_SIZE_SMALL) . '</a>';
             $params['right_actions'] .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'course_info/infocours.php?cidReq=' . $course['code'] . '">' . Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'), ICON_SIZE_SMALL) . '</a>';
             $params['right_actions'] .= Display::div('', array('id' => 'document_result_' . $course_info['real_id'] . '_0', 'class' => 'document_preview_container'));
         } else {
             $params['right_actions'] .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'course_info/infocours.php?cidReq=' . $course['code'] . '">' . Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'), ICON_SIZE_SMALL) . '</a>';
         }
         if ($course_info['status'] == COURSEMANAGER) {
             //echo Display::return_icon('teachers.gif', get_lang('Status').': '.get_lang('Teacher'), array('style'=>'width: 11px; height: 11px;'));
         }
     } else {
         if ($course_info['visibility'] != COURSE_VISIBILITY_CLOSED) {
             if ($loadDirs) {
                 $params['right_actions'] .= '<a id="document_preview_' . $course_info['real_id'] . '_0" class="document_preview" href="javascript:void(0);">' . Display::return_icon('folder.png', get_lang('Documents'), array('align' => 'absmiddle'), ICON_SIZE_SMALL) . '</a>';
                 $params['right_actions'] .= Display::div('', array('id' => 'document_result_' . $course_info['real_id'] . '_0', 'class' => 'document_preview_container'));
             } else {
                 if ($course_info['status'] == COURSEMANAGER) {
                     $params['right_actions'] .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'course_info/infocours.php?cidReq=' . $course['code'] . '">' . Display::return_icon('edit.png', get_lang('Edit'), array('align' => 'absmiddle'), ICON_SIZE_SMALL) . '</a>';
                 }
             }
         }
     }
     $course_title_url = '';
     if ($course_info['visibility'] != COURSE_VISIBILITY_CLOSED || $course['status'] == COURSEMANAGER) {
         $course_title_url = api_get_path(WEB_COURSE_PATH) . $course_info['path'] . '/?id_session=0';
         $course_title = Display::url($course_info['title'], $course_title_url);
     } else {
         $course_title = $course_info['title'] . " " . Display::tag('span', get_lang('CourseClosed'), array('class' => 'item_closed'));
     }
     // Start displaying the course block itself
     if (api_get_setting('display_coursecode_in_courselist') == 'true') {
         $course_title .= ' (' . $course_info['visual_code'] . ') ';
     }
     $teachers = '';
     if (api_get_setting('display_teacher_in_courselist') == 'true') {
         $teachers = CourseManager::get_teacher_list_from_course_code_to_string($course['code'], self::USER_SEPARATOR, true);
     }
     $params['link'] = $course_title_url;
     $params['icon'] = $status_icon;
     $params['title'] = $course_title;
     $params['teachers'] = $teachers;
     if ($course_info['visibility'] != COURSE_VISIBILITY_CLOSED) {
         $params['notifications'] = $show_notification;
     }
     return $params;
 }
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:91,代码来源:course.lib.php


注:本文中的CourseManager::get_teacher_list_from_course_code_to_string方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。