當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。