本文整理汇总了PHP中GradebookUtils::get_course_id_by_link_id方法的典型用法代码示例。如果您正苦于以下问题:PHP GradebookUtils::get_course_id_by_link_id方法的具体用法?PHP GradebookUtils::get_course_id_by_link_id怎么用?PHP GradebookUtils::get_course_id_by_link_id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GradebookUtils
的用法示例。
在下文中一共展示了GradebookUtils::get_course_id_by_link_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: api_block_anonymous_users
<?php
/* For licensing terms, see /license.txt */
/**
* Script
* @package chamilo.gradebook
*/
//$cidReset = true;
require_once '../inc/global.inc.php';
api_block_anonymous_users();
GradebookUtils::block_students();
$tbl_grade_links = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
//selected name of database
$course_id = GradebookUtils::get_course_id_by_link_id($_GET['editlink']);
$tbl_forum_thread = Database::get_course_table(TABLE_FORUM_THREAD);
$tbl_work = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
$tbl_attendance = Database::get_course_table(TABLE_ATTENDANCE);
$linkarray = LinkFactory::load($_GET['editlink']);
$link = $linkarray[0];
if ($link->is_locked() && !api_is_platform_admin()) {
api_not_allowed();
}
$linkcat = isset($_GET['selectcat']) ? Security::remove_XSS($_GET['selectcat']) : '';
$linkedit = isset($_GET['editlink']) ? Security::remove_XSS($_GET['editlink']) : '';
$session_id = api_get_session_id();
if ($session_id == 0) {
$cats = Category::load(null, null, $course_code, null, null, $session_id, false);
//already init
} else {
$cats = Category::load_session_categories(null, $session_id);
}
示例2: api_protect_course_script
*/
$cidReset = true;
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_GRADEBOOK;
api_protect_course_script(true);
api_block_anonymous_users();
if (!api_is_allowed_to_edit()) {
header('Location: /index.php');
exit;
}
$my_selectcat = isset($_GET['selectcat']) ? intval($_GET['selectcat']) : '';
if (empty($my_selectcat)) {
api_not_allowed();
}
$course_id = GradebookUtils::get_course_id_by_link_id($my_selectcat);
$table_link = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
$table_evaluation = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
$tbl_forum_thread = Database::get_course_table(TABLE_FORUM_THREAD);
$tbl_work = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
$tbl_attendance = Database::get_course_table(TABLE_ATTENDANCE);
$table_evaluated[LINK_EXERCISE] = array(TABLE_QUIZ_TEST, 'title', 'id', get_lang('Exercise'));
$table_evaluated[LINK_DROPBOX] = array(TABLE_DROPBOX_FILE, 'name', 'id', get_lang('Dropbox'));
$table_evaluated[LINK_STUDENTPUBLICATION] = array(TABLE_STUDENT_PUBLICATION, 'url', 'id', get_lang('Student_publication'));
$table_evaluated[LINK_LEARNPATH] = array(TABLE_LP_MAIN, 'name', 'id', get_lang('Learnpath'));
$table_evaluated[LINK_FORUM_THREAD] = array(TABLE_FORUM_THREAD, 'thread_title_qualify', 'thread_id', get_lang('Forum'));
$table_evaluated[LINK_ATTENDANCE] = array(TABLE_ATTENDANCE, 'attendance_title_qualify', 'id', get_lang('Attendance'));
$table_evaluated[LINK_SURVEY] = array(TABLE_SURVEY, 'code', 'survey_id', get_lang('Survey'));
$submitted = isset($_POST['submitted']) ? $_POST['submitted'] : '';
if ($submitted == 1) {
Display::display_confirmation_message(get_lang('GradebookWeightUpdated')) . '<br /><br />';