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


PHP CourseManager::get_email_of_tutor_to_session方法代码示例

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


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

示例1: set_footer_parameters

    /**
     * Set footer parameters
     */
    private function set_footer_parameters()
    {
        global $_configuration;

        //Show admin data
        //$this->assign('show_administrator_data', api_get_setting('show_administrator_data'));

        if (api_get_setting('show_administrator_data') == 'true') {
            //Administrator name
            $administrator_data = get_lang('Manager').' : '.Display::encrypted_mailto_link(
                    api_get_setting('emailAdministrator'),
                    api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))
                );
            $this->assign('administrator_name', $administrator_data);
        }

        //Loading footer extra content
        if (!api_is_platform_admin()) {
            $extra_footer = trim(api_get_setting('footer_extra_content'));
            if (!empty($extra_footer)) {
                $this->assign('footer_extra_content', $extra_footer);
            }
        }

        //Tutor name
        if (api_get_setting('show_tutor_data') == 'true') {
            // Course manager
            $id_course  = api_get_course_id();
            $id_session = api_get_session_id();
            if (isset($id_course) && $id_course != -1) {
                $tutor_data = '';
                if ($id_session != 0) {
                    $coachs_email = CourseManager::get_email_of_tutor_to_session($id_session, $id_course);
                    $email_link   = array();
                    foreach ($coachs_email as $coach) {
                        $email_link[] = Display::encrypted_mailto_link($coach['email'], $coach['complete_name']);
                    }
                    if (count($coachs_email) > 1) {
                        $tutor_data .= get_lang('Coachs').' : ';
                        $tutor_data .= array_to_string($email_link, CourseManager::USER_SEPARATOR);
                    } elseif (count($coachs_email) == 1) {
                        $tutor_data .= get_lang('Coach').' : ';
                        $tutor_data .= array_to_string($email_link, CourseManager::USER_SEPARATOR);
                    } elseif (count($coachs_email) == 0) {
                        $tutor_data .= '';
                    }
                }
                $this->assign('session_teachers', $tutor_data);
            }
        }

        if (api_get_setting('show_teacher_data') == 'true') {
            // course manager
            $id_course = api_get_course_id();
            if (isset($id_course) && $id_course != -1) {
                $teacher_data = '';
                $mail         = CourseManager::get_emails_of_tutors_to_course($id_course);
                if (!empty($mail)) {
                    $teachers_parsed = array();
                    foreach ($mail as $value) {
                        foreach ($value as $email => $name) {
                            $teachers_parsed[] = Display::encrypted_mailto_link($email, $name);
                        }
                    }
                    $label = get_lang('Teacher');
                    if (count($mail) > 1) {
                        $label = get_lang('Teachers');
                    }
                    $teacher_data .= $label.' : '.array_to_string($teachers_parsed, CourseManager::USER_SEPARATOR);
                }
                $this->assign('teachers', $teacher_data);
            }
        }
        /* $stats = '';
          $this->assign('execution_stats', $stats); */
    }
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:79,代码来源:template.lib.php

示例2: setFooterParameters

 /**
  * Set footer parameters
  */
 private function setFooterParameters()
 {
     //Show admin data
     //$this->assign('show_administrator_data', api_get_setting('show_administrator_data'));
     if (api_get_setting('show_administrator_data') == 'true') {
         //Administrator name
         $administrator_data = get_lang('Manager') . ' : ' . Display::encrypted_mailto_link(api_get_setting('admin.administrator_email'), api_get_person_name(api_get_setting('admin.administrator_name'), api_get_setting('admin.administrator_surname')));
         $this->assign('administrator_name', $administrator_data);
     }
     //Loading footer extra content
     if (!api_is_platform_admin()) {
         //$extra_footer = trim(api_get_setting('footer_extra_content'));
         if (!empty($extra_footer)) {
             $this->assign('footer_extra_content', $extra_footer);
         }
     }
     $courseId = api_get_course_int_id();
     //Tutor name
     if (api_get_setting('show_tutor_data') == 'true') {
         // Course manager
         $id_session = api_get_session_id();
         if (isset($courseId) && $courseId != -1 && !empty($courseId)) {
             $tutor_data = '';
             if ($id_session != 0) {
                 $coachs_email = CourseManager::get_email_of_tutor_to_session($id_session, $courseId);
                 $email_link = array();
                 foreach ($coachs_email as $coach) {
                     $email_link[] = Display::encrypted_mailto_link($coach['email'], $coach['complete_name']);
                 }
                 if (count($coachs_email) > 1) {
                     $tutor_data .= get_lang('Coachs') . ' : ';
                     $tutor_data .= ArrayClass::array_to_string($email_link, CourseManager::USER_SEPARATOR);
                 } elseif (count($coachs_email) == 1) {
                     $tutor_data .= get_lang('Coach') . ' : ';
                     $tutor_data .= ArrayClass::array_to_string($email_link, CourseManager::USER_SEPARATOR);
                 } elseif (count($coachs_email) == 0) {
                     $tutor_data .= '';
                 }
             }
             $this->assign('session_teachers', $tutor_data);
         }
     }
     if (api_get_setting('show_teacher_data') == 'true') {
         // course manager
         if (isset($courseId) && $courseId != -1 && !empty($courseId)) {
             $courseInfo = api_get_course_info();
             $teacher_data = null;
             $label = get_lang('Teacher');
             if (count($courseInfo['teacher_list']) > 1) {
                 $label = get_lang('Teachers');
             }
             $teacher_data .= $label . ' : ' . $courseInfo['teacher_list_formatted'];
             $this->assign('teachers', $teacher_data);
         }
     }
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:59,代码来源:Template.php


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