本文整理匯總了PHP中EfrontLesson::getSkills方法的典型用法代碼示例。如果您正苦於以下問題:PHP EfrontLesson::getSkills方法的具體用法?PHP EfrontLesson::getSkills怎麽用?PHP EfrontLesson::getSkills使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類EfrontLesson
的用法示例。
在下文中一共展示了EfrontLesson::getSkills方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: EfrontLesson
$question_lesson = eF_getTableData("questions", "lessons_ID", "id = " . $_GET['edit_question']);
if (!empty($question_lesson) && $question_lesson[0]['lessons_ID'] != 0) {
$lesson = new EfrontLesson($question_lesson[0]['lessons_ID']);
$skills_to_propose = array();
// If the lesson belongs only to courses, get all skills of its courses
if ($lesson->lesson['course_only']) {
$lesson_belonging_courses = $lesson->getCourses(true);
foreach ($lesson_belonging_courses as $course) {
$course_skills = $course->getSkills(true);
foreach ($course_skills as $skillID => $skill) {
$skills_to_propose[] = $skillID;
}
}
} else {
// Else get only its own skills
$lesson_skills = $lesson->getSkills(true);
foreach ($lesson_skills as $skillID => $skill) {
$skills_to_propose[] = $skillID;
}
}
if (!empty($skills_to_propose)) {
echo implode(" ", $skills_to_propose);
} else {
header("HTTP/1.0 500 ");
}
exit;
} else {
header("HTTP/1.0 500 ");
exit;
}
}
示例2: unset
if ($lesson['languages_NAME'] != $editedUser->user['languages_NAME']) {
unset($lessons[$key]);
}
}
}
if ($lesson['course_only']) {
unset($lessons[$key]);
}
}
foreach ($lessons as $key => $lesson) {
if (!$lesson['partof']) {
unset($lessons[$key]);
} else {
$obj = new EfrontLesson($lesson['id']);
$lessons[$key]['link'] = $obj->toHTMLTooltipLink(basename($_SERVER['PHP_SELF']) . '?ctg=lessons&edit_lesson=' . $lesson['id']);
$lessons[$key]['skills_offered'] = sizeof($obj->getSkills(true));
}
}
$roles = EfrontLessonUser::getLessonsRoles(true);
$smarty->assign("T_ROLES_ARRAY", $roles);
isset($_GET['limit']) ? $limit = $_GET['limit'] : ($limit = G_DEFAULT_TABLE_SIZE);
if (isset($_GET['sort'])) {
isset($_GET['order']) ? $order = $_GET['order'] : ($order = 'asc');
$lessons = eF_multiSort($lessons, $_GET['sort'], $order);
}
if (isset($_GET['filter'])) {
$lessons = eF_filterData($lessons, $_GET['filter']);
}
$smarty->assign("T_ASSIGNED_LESSONS_SIZE", sizeof($lessons));
if (isset($_GET['limit']) && eF_checkParameter($_GET['limit'], 'int')) {
isset($_GET['offset']) && eF_checkParameter($_GET['offset'], 'int') ? $offset = $_GET['offset'] : ($offset = 0);