本文整理汇总了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);