'select '.$course_id.' as course_id, '. $reports_modules_quiz_toolid.' as tool_id, '. 'q.id as child_id, q.title as child_name, '. "'".$course_code."'".' as course_code from '.Database::get_course_table(TABLE_QUIZ_TEST).' q ', 'values_query_function' => 'reports_modules_quiz_quizVal')); } /** * @todo fix the exe_cours_id field * @param $quiz * @param $key_id * @return array */ function reports_modules_quiz_quizVal($quiz, $key_id) { return array('type'=> 'sql', 'sql' => 'select '.$key_id.', exe_user_id as uid, '. 'session_id, -1 as attempt, exe_result as score, '. REPORTS_PROGRESS_COMPLETED.' as progress, '. 'exe_duration as time, exe_date as ts from '. Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCICES). ' where exe_cours_id = '."'".$quiz['course_code']."'". ' and exe_exo_id='.$quiz['child_id']); }