Example #1
0
/**
 * Gets count of exam results
 * @todo this function should be moved in a library  + no global calls
 */
function get_count_exam_results($exercise_id, $extra_where_conditions)
{
    $count = get_exam_results_data(null, null, null, null, $exercise_id, $extra_where_conditions, true);
    return $count;
}
Example #2
0
     } else {
         $result = get_work_user_list_from_documents($start, $limit, $sidx, $sord, $work_id, api_get_user_id(), $whereCondition);
     }
     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');
         $officialCodeInList = api_get_configuration_value('show_official_code_exercise_result_list');
         if ($officialCodeInList == true) {
             $columns = array_merge(array('official_code'), $columns);
         }
     }
     $result = get_exam_results_data($start, $limit, $sidx, $sord, $exercise_id, $whereCondition);
     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()) {
         $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_work_student_list_overview':
     if (!(api_is_allowed_to_edit() || api_is_coach())) {
         return array();
     }