/** * @param string $in_hotpot_path * @return int */ function get_count_exam_hotpotatoes_results($in_hotpot_path) { return get_exam_results_hotpotatoes_data(0, 0, '', '', $in_hotpot_path, true, ''); }
if (!(api_is_allowed_to_edit() || api_is_coach())) { return array(); } require_once api_get_path(SYS_CODE_PATH) . 'work/work.lib.php'; $columns = array('student', 'works'); $result = getWorkUserListData($workId, api_get_course_id(), api_get_session_id(), api_get_group_id(), $start, $limit, $sidx, $sord); break; case 'get_hotpotatoes_exercise_results': $course = api_get_course_info(); $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document"; if (api_is_allowed_to_edit(null, true) || api_is_drh()) { $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions'); } else { $columns = array('exe_date', 'score', 'actions'); } $result = get_exam_results_hotpotatoes_data($start, $limit, $sidx, $sord, $hotpot_path, $whereCondition); break; case 'get_sessions_tracking': if (api_is_drh()) { $sessions = SessionManager::get_sessions_followed_by_drh(api_get_user_id(), $start, $limit, false, false, false, null, $keyword); } else { // Sessions for the coach $sessions = Tracking::get_sessions_coached_by_user(api_get_user_id(), $start, $limit, false, $keyword); } $columns = array('name', 'date', 'course_per_session', 'student_per_session', 'details'); $result = array(); if (!empty($sessions)) { foreach ($sessions as $session) { if (api_drh_can_access_all_session_content()) { $count_courses_in_session = count(SessionManager::get_course_list_by_session_id($session['id'])); } else {