本文整理汇总了PHP中Skill::get_skill_info方法的典型用法代码示例。如果您正苦于以下问题:PHP Skill::get_skill_info方法的具体用法?PHP Skill::get_skill_info怎么用?PHP Skill::get_skill_info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skill
的用法示例。
在下文中一共展示了Skill::get_skill_info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SkillProfile
case 'get_saved_profiles':
$skill_profile = new SkillProfile();
$profiles = $skill_profile->get_all();
Display::display_no_header();
Display::$global_template->assign('profiles', $profiles);
echo Display::$global_template->fetch('default/skill/profile_item.tpl');
break;
case 'get_skills':
$load_user_data = isset($_REQUEST['load_user_data']) ? $_REQUEST['load_user_data'] : null;
$id = intval($_REQUEST['id']);
$skills = $skill->get_all($load_user_data, false, $id);
echo json_encode($skills);
break;
case 'get_skill_info':
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
$skill_info = $skill->get_skill_info($id);
echo json_encode($skill_info);
break;
case 'get_skill_course_info':
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
$skill_info = $skill->get_skill_info($id);
$courses = $skill->get_courses_by_skill($id);
$sessions = $skill->getSessionsBySkill($id);
$html = '';
if (!empty($courses) || !empty($sessions)) {
Display::display_no_header();
Display::$global_template->assign('skill', $skill_info);
Display::$global_template->assign('courses', $courses);
Display::$global_template->assign('sessions', $sessions);
$html = Display::$global_template->fetch('default/skill/skill_info.tpl');
}
示例2: array
//require_once '../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
if (api_get_setting('skill.allow_skills_tool') != 'true') {
api_not_allowed();
}
$interbreadcrumb[] = array('url' => Container::getRouter()->generate('administration'), "name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'skill_list.php', 'name' => get_lang('ManageSkills'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateSkill'));
/* Process data */
$skillParentId = isset($_GET['parent']) ? intval($_GET['parent']) : 0;
$formDefaultValues = [];
$objSkill = new Skill();
$objGradebook = new Gradebook();
if ($skillParentId > 0) {
$skillParentInfo = $objSkill->get_skill_info($skillParentId);
$formDefaultValues = ['parent_id' => $skillParentInfo['id'], 'gradebook_id' => []];
foreach ($skillParentInfo['gradebooks'] as $gradebook) {
$formDefaultValues['gradebook_id'][] = intval($gradebook['id']);
}
}
$allSkills = $objSkill->get_all();
$allGradebooks = $objGradebook->find('all');
$skillList = [0 => get_lang('None')];
$gradebookList = [];
foreach ($allSkills as $skill) {
$skillList[$skill['id']] = $skill['name'];
}
foreach ($allGradebooks as $gradebook) {
$gradebookList[$gradebook['id']] = $gradebook['name'];
}
示例3: array
*/
use ChamiloSession as Session;
$cidReset = true;
require_once '../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
if (api_get_setting('allow_skills_tool') != 'true') {
api_not_allowed();
}
$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'skill_list.php', 'name' => get_lang('ManageSkills'));
/* Process data */
$skillId = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
$objSkill = new Skill();
$objGradebook = new Gradebook();
$skillInfo = $objSkill->get_skill_info($skillId);
$allSkills = $objSkill->get_all();
$allGradebooks = $objGradebook->find('all');
$skillDefaultInfo = ['id' => $skillInfo['id'], 'name' => $skillInfo['name'], 'short_code' => $skillInfo['short_code'], 'description' => $skillInfo['description'], 'parent_id' => $skillInfo['extra']['parent_id'], 'gradebook_id' => []];
foreach ($skillInfo['gradebooks'] as $gradebook) {
$skillDefaultInfo['gradebook_id'][] = $gradebook['id'];
}
$skillList = [0 => get_lang('None')];
$gradebookList = [];
foreach ($allSkills as $skill) {
if ($skill['id'] == $skillInfo['id']) {
continue;
}
$skillList[$skill['id']] = $skill['name'];
}
foreach ($allGradebooks as $gradebook) {