Esempio n. 1
0
     }
     $where_condition .= " AND u.user_id = " . api_get_user_id();
     $result = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $where_condition);
     break;
 case 'get_exercise_results':
     $course = api_get_course_info();
     //used inside get_exam_results_data()
     $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";
     if ($is_allowedToEdit) {
         $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_duration', 'start_date', 'exe_date', 'score', 'status', 'lp', 'actions');
     }
     $result = ExerciseLib::get_exam_results_data($start, $limit, $sidx, $sord, $exercise_id, $where_condition);
     break;
 case 'get_admin_exercise_results':
     $columns = array('username', 'firstname', 'lastname', 'score', 'link', 'session');
     $result = ExerciseLib::get_admin_exam_results_data($start, $limit, $sidx, $sord, $where_condition);
     break;
 case 'get_hotpotatoes_exercise_results':
     $course = api_get_course_info();
     //used inside get_exam_results_data()
     $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";
     $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions');
     $result = ExerciseLib::get_exam_results_hotpotatoes_data($start, $limit, $sidx, $sord, $hotpot_path, $where_condition);
     //get_exam_results_data($start, $limit, $sidx, $sord, $exercise_id, $where_condition);
     break;
 case 'get_sessions':
     $session_columns = SessionManager::get_session_columns($list_type);
     $columns = $session_columns['simple_column_name'];
     if ($list_type == 'simple') {
         $result = SessionManager::get_sessions_admin(array('where' => $where_condition, 'order' => "{$sidx} {$sord}", 'extra' => $extra_fields, 'limit' => "{$start} , {$limit}"), false);
     } else {