本文整理汇总了PHP中CourseManager::process_hot_course_item方法的典型用法代码示例。如果您正苦于以下问题:PHP CourseManager::process_hot_course_item方法的具体用法?PHP CourseManager::process_hot_course_item怎么用?PHP CourseManager::process_hot_course_item使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CourseManager
的用法示例。
在下文中一共展示了CourseManager::process_hot_course_item方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: json_encode
}
echo json_encode($gradebook_list);
break;
case 'find_gradebooks':
$gradebooks = $gradebook->find('all', array('where' => array('name LIKE %?% ' => $_REQUEST['tag'])));
$return = array();
foreach ($gradebooks as $item) {
$item['caption'] = $item['name'];
$item['value'] = $item['id'];
$return[] = $item;
}
echo json_encode($return);
break;
case 'get_course_info_popup':
$course_info = api_get_course_info($_REQUEST['code']);
$courses = CourseManager::process_hot_course_item([['c_id' => $course_info['real_id']]]);
Display::display_no_header();
Display::$global_template->assign('hot_courses', $courses);
echo Display::$global_template->fetch('default/layout/hot_course_item_popup.tpl');
break;
case 'gradebook_exists':
$data = $gradebook->get($_REQUEST['gradebook_id']);
if (!empty($data)) {
echo 1;
} else {
echo 0;
}
break;
case 'get_skills_by_profile':
$skill_rel_profile = new SkillRelProfile();
$profile_id = isset($_REQUEST['profile_id']) ? $_REQUEST['profile_id'] : null;
示例2: json_encode
echo json_encode($gradebook_list);
break;
case 'find_gradebooks':
$gradebooks = $gradebook->find('all', array('where' => array('name LIKE %?% ' => $_REQUEST['tag'])));
$return = array();
foreach ($gradebooks as $item) {
$item['caption'] = $item['name'];
$item['value'] = $item['id'];
$return[] = $item;
}
echo json_encode($return);
break;
case 'get_course_info_popup':
$course_info = api_get_course_info($_REQUEST['code']);
$course_info['course_code'] = $course_info['code'];
$courses = CourseManager::process_hot_course_item(array($course_info));
Display::display_no_header();
Display::$global_template->assign('hot_courses', $courses);
echo Display::$global_template->fetch('default/layout/hot_course_item_popup.tpl');
break;
case 'gradebook_exists':
$data = $gradebook->get($_REQUEST['gradebook_id']);
if (!empty($data)) {
echo 1;
} else {
echo 0;
}
break;
case 'get_skills_by_profile':
$skill_rel_profile = new SkillRelProfile();
$profile_id = isset($_REQUEST['profile_id']) ? $_REQUEST['profile_id'] : null;