示例#1
0
     }
     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
0
     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;