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


PHP CourseManager::get_course_information_by_id方法代码示例

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


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

示例1: __construct

 /**
  * @param int $course
  * @param int $announcement
  */
 public function __construct($course, $announcement)
 {
     if (empty($course)) {
         $course = api_get_course_int_id();
         $course = CourseManager::get_course_information_by_id($course);
     } else {
         if (is_numeric($course)) {
             $course = CourseManager::get_course_information_by_id($course);
         }
     }
     $this->course = $course;
     $this->session_id = api_get_session_id();
     if (is_numeric($announcement)) {
         $announcement = AnnouncementManager::get_by_id($course['real_id'], $announcement);
     }
     $this->announcement = $announcement;
 }
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:21,代码来源:announcement_email.class.php

示例2: api_get_course_info_by_id

    $courseItemId = $item['real_id'];
    $courseInfo = api_get_course_info_by_id($courseItemId);
    $course_select_list[$courseItemId] = "";
    if ($courseItemId == api_get_course_int_id()) {
        $course_select_list[$courseItemId] = ">    ";
    }
    $course_select_list[$courseItemId] .= $courseInfo['title'];
}
$select_course_html = Display::select('selected_course', $course_select_list, $selected_course, array('class' => 'chzn-select', 'onchange' => 'mark_course_id_changed(); submit_form(this);'));
echo Display::form_row(get_lang('Course'), $select_course_html);
if (empty($selected_course) || $selected_course == '-1') {
    $course_info = api_get_course_info();
    // no course selected, reset menu test / difficult� / type de reponse
    reset_menu_exo_lvl_type();
} else {
    $course_info = CourseManager::get_course_information_by_id($selected_course);
}
// If course has changed, reset the menu default
if ($course_id_changed) {
    reset_menu_exo_lvl_type();
}
$course_id = $course_info['real_id'];
// Redefining table calls
$TBL_EXERCICE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
$TBL_EXERCICES = Database::get_course_table(TABLE_QUIZ_TEST);
$TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
$TBL_REPONSES = Database::get_course_table(TABLE_QUIZ_ANSWER);
$TBL_CATEGORY = Database::get_course_table(TABLE_QUIZ_QUESTION_CATEGORY);
$TBL_COURSE_REL_CATEGORY = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY);
// Get course categories for the selected course
// get category list for the course $selected_course
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:question_pool.php

示例3: isset

$cidReset = true;
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$course_id = isset($_GET['course_id']) ? intval($_GET['course_id']) : null;
$session_id = isset($_GET['session_id']) ? intval($_GET['session_id']) : null;
$user_id = api_get_user_id();
/**
 * Security check
 */
if (empty($course_id)) {
    api_not_allowed();
}
/**
 * Code
 */
$course_info = CourseManager::get_course_information_by_id($course_id);
$tpl = new Template(null);
// Build the form
$form = new FormValidator('set_temp_password', 'POST', api_get_self() . '?course_id=' . $course_id . '&session_id=' . $session_id);
$form->addElement('header', get_lang('CourseRequiresPassword'));
$form->addElement('hidden', 'course_id', $course_id);
$form->addElement('hidden', 'session_id', $session_id);
$form->addElement('password', 'course_password', null, get_lang('Password'));
$form->addElement('style_submit_button', null, get_lang('Accept'), 'class="save"');
if ($form->validate()) {
    $form_values = $form->exportValues();
    if ($form_values['course_password'] === $course_info['registration_code']) {
        Session::write('course_password_' . $course_info['real_id'], true);
        header('Location: ' . api_get_course_url($course_info['code'], $session_id));
        exit;
    } else {
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:set_temp_password.php


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