本文整理汇总了PHP中Tracking::is_allowed_to_coach_student方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracking::is_allowed_to_coach_student方法的具体用法?PHP Tracking::is_allowed_to_coach_student怎么用?PHP Tracking::is_allowed_to_coach_student使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracking
的用法示例。
在下文中一共展示了Tracking::is_allowed_to_coach_student方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: api_get_path
include_once api_get_path(LIBRARY_PATH) . 'course.lib.php';
include_once api_get_path(LIBRARY_PATH) . 'usermanager.lib.php';
require_once 'scorm_cloud.lib.php';
$this_section = "session_my_space";
$export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
if ($export_csv) {
ob_start();
}
$csv_content = array();
$user_id = intval($_GET['student_id']);
if (isset($_GET['course'])) {
$cidReq = Security::remove_XSS($_GET['course']);
}
$user_infos = UserManager::get_user_info_by_id($user_id);
$name = $user_infos['firstname'] . ' ' . $user_infos['lastname'];
if (!api_is_platform_admin(true) && !CourseManager::is_course_teacher($_user['user_id'], $cidReq) && !Tracking::is_allowed_to_coach_student($_user['user_id'], $_GET['student_id']) && $user_infos['hr_dept_id'] !== $_user['user_id']) {
Display::display_header('');
api_not_allowed();
Display::display_footer();
}
$course_exits = CourseManager::course_exists($cidReq);
if (!empty($course_exits)) {
$_course = CourseManager::get_course_information($cidReq);
} else {
api_not_allowed();
}
$_course['dbNameGlu'] = $_configuration['table_prefix'] . $_course['db_name'] . $_configuration['db_glue'];
$lp_id = intval($_GET['lp_id']);
$lp_view_id = cloud_getLpViewId($cidReq, $lp_id, $user_id);
$regid = cloud_getRegId($cidReq, $lp_view_id);
$interbreadcrumb[] = array("url" => api_get_path(WEB_COURSE_PATH) . $_course['directory'], 'name' => $_course['title']);
示例2: api_get_path
}
require_once api_get_path(SYS_CODE_PATH) . 'newscorm/learnpath.class.php';
require_once api_get_path(SYS_CODE_PATH) . 'newscorm/learnpathItem.class.php';
$session_id = isset($_REQUEST['id_session']) && !empty($_REQUEST['id_session']) ? intval($_REQUEST['id_session']) : api_get_session_id();
$export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
if ($export_csv) {
ob_start();
}
$csv_content = array();
$user_id = intval($_GET['student_id']);
if (isset($_GET['course'])) {
$cidReq = Security::remove_XSS($_GET['course']);
}
$user_infos = UserManager::get_user_info_by_id($user_id);
$name = api_get_person_name($user_infos['firstname'], $user_infos['lastname']);
if (!api_is_platform_admin(true) && !CourseManager::is_course_teacher(api_get_user_id(), api_get_course_int_id()) && !Tracking::is_allowed_to_coach_student(api_get_user_id(), $_GET['student_id']) && !api_is_drh() && !api_is_course_tutor()) {
api_not_allowed();
}
$course_exits = CourseManager::course_exists($cidReq);
if (!empty($course_exits)) {
$course_info = api_get_course_info($cidReq);
} else {
api_not_allowed();
}
if (!empty($_GET['origin']) && $_GET['origin'] == 'user_course') {
$interbreadcrumb[] = array("url" => api_get_path(WEB_COURSE_PATH) . $course_info['directory'], 'name' => $course_info['name']);
$interbreadcrumb[] = array("url" => "../user/user.php?cidReq=" . $cidReq, "name" => get_lang("Users"));
} else {
if (!empty($_GET['origin']) && $_GET['origin'] == 'tracking_course') {
$interbreadcrumb[] = array("url" => "../tracking/courseLog.php?cidReq=" . $cidReq . '&id_session=' . $session_id, "name" => get_lang("Tracking"));
} else {
示例3: isset
$user_id = isset($_GET['student_id']) ? intval($_GET['student_id']) : api_get_user_id();
$courseCode = isset($_GET['course']) ? Security::remove_XSS($_GET['course']) : api_get_course_id();
$origin = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : null;
$lp_id = intval($_GET['lp_id']);
$csv_content = array();
$course_info = api_get_course_info($courseCode);
if (empty($course_info) || empty($lp_id)) {
api_not_allowed();
}
$userInfo = api_get_user_info($user_id);
$name = $userInfo['complete_name'];
if (!api_is_platform_admin(true) &&
!CourseManager :: is_course_teacher(api_get_user_id(), $courseCode) &&
!Tracking :: is_allowed_to_coach_student(api_get_user_id(), $user_id) && !api_is_drh() && !api_is_course_tutor()) {
api_not_allowed();
}
if ($origin == 'user_course') {
$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], 'name' => $course_info['name']);
$interbreadcrumb[] = array ("url" => "../user/user.php?cidReq=".$courseCode, "name" => get_lang("Users"));
} else if($origin == 'tracking_course') {
$interbreadcrumb[] = array ("url" => "../tracking/courseLog.php?cidReq=".$courseCode.'&id_session='.$session_id, "name" => get_lang("Tracking"));
} else {
$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
$interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang("MyStudents"));
$interbreadcrumb[] = array ("url" => "myStudents.php?student=".$user_id, "name" => get_lang("StudentDetails"));
$nameTools=get_lang("DetailsStudentInCourse");
}
示例4: isset
$this_section = SECTION_COURSES;
}
$session_id = isset($_REQUEST['id_session']) && !empty($_REQUEST['id_session']) ? intval($_REQUEST['id_session']) : api_get_session_id();
$export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
$user_id = isset($_GET['student_id']) ? intval($_GET['student_id']) : api_get_user_id();
$courseCode = isset($_GET['course']) ? Security::remove_XSS($_GET['course']) : api_get_course_id();
$origin = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : null;
$lp_id = intval($_GET['lp_id']);
$csv_content = array();
$course_info = api_get_course_info($courseCode);
if (empty($course_info) || empty($lp_id)) {
api_not_allowed();
}
$userInfo = api_get_user_info($user_id);
$name = $userInfo['complete_name'];
if (!api_is_platform_admin(true) && !CourseManager::is_course_teacher(api_get_user_id(), $courseCode) && !Tracking::is_allowed_to_coach_student(api_get_user_id(), $user_id) && !api_is_drh() && !api_is_course_tutor()) {
api_not_allowed();
}
if ($origin == 'user_course') {
$interbreadcrumb[] = array("url" => api_get_path(WEB_COURSE_PATH) . $course_info['directory'], 'name' => $course_info['name']);
$interbreadcrumb[] = array("url" => "../user/user.php?cidReq=" . $courseCode, "name" => get_lang("Users"));
} else {
if ($origin == 'tracking_course') {
$interbreadcrumb[] = array("url" => "../tracking/courseLog.php?cidReq=" . $courseCode . '&id_session=' . $session_id, "name" => get_lang("Tracking"));
} else {
$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
$interbreadcrumb[] = array("url" => "student.php", "name" => get_lang("MyStudents"));
$interbreadcrumb[] = array("url" => "myStudents.php?student=" . $user_id, "name" => get_lang("StudentDetails"));
$nameTools = get_lang("DetailsStudentInCourse");
}
}