本文整理汇总了PHP中ExerciseLib::get_exam_results_data方法的典型用法代码示例。如果您正苦于以下问题:PHP ExerciseLib::get_exam_results_data方法的具体用法?PHP ExerciseLib::get_exam_results_data怎么用?PHP ExerciseLib::get_exam_results_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExerciseLib
的用法示例。
在下文中一共展示了ExerciseLib::get_exam_results_data方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_work_user_list_from_documents
} 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 ExerciseLib::get_exam_results_data()
$documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";
if ($is_allowedToEdit || api_is_student_boss()) {
$columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_duration', 'start_date', 'exe_date', 'score', 'user_ip', 'status', 'lp', 'actions');
$officialCodeInList = api_get_setting('exercise.show_official_code_exercise_result_list');
if ($officialCodeInList === 'true') {
$columns = array_merge(array('official_code'), $columns);
}
}
$result = ExerciseLib::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 = ExerciseLib::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();
}
示例2: indexAction
//.........这里部分代码省略.........
$user_info = api_get_user_info($item['user_id']);
$personal_course_list = \UserManager::get_personal_session_course_list($item['user_id']);
$count_skill_by_course = array();
foreach ($personal_course_list as $course_item) {
if (!isset($skills_in_course[$course_item['code']])) {
$count_skill_by_course[$course_item['code']] = $skill->get_count_skills_by_course($course_item['code']);
$skills_in_course[$course_item['code']] = $count_skill_by_course[$course_item['code']];
} else {
$count_skill_by_course[$course_item['code']] = $skills_in_course[$course_item['code']];
}
}
$item['photo'] = \Display::img($user_info['avatar_small']);
$item['currently_learning'] = !empty($count_skill_by_course) ? array_sum($count_skill_by_course) : 0;
}
}
break;
case 'get_work_user_list':
if (isset($type) && $type == 'simple') {
$columns = array('type', 'firstname', 'lastname', 'username', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions');
} else {
$columns = array('type', 'firstname', 'lastname', 'username', 'title', 'sent_date', 'actions');
}
$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');
} else {
//$columns = array('exe_duration', 'start_date', 'exe_date', 'score', 'status', 'actions');
}
$result = \ExerciseLib::get_exam_results_data($start, $limit, $sidx, $sord, $exercise_id, $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 {
$result = SessionManager::get_sessions_admin_complete(array('where' => $where_condition, 'order' => "{$sidx} {$sord}", 'extra' => $extra_fields, 'limit' => "{$start} , {$limit}"));
}
break;
case 'get_timelines':
$columns = array('headline', 'actions');
//$columns = array('headline', 'type', 'start_date', 'end_date', 'text', 'media', 'media_credit', 'media_caption', 'title_slide', 'parent_id');
if (!in_array($sidx, $columns)) {
$sidx = 'headline';
}
$course_id = api_get_course_int_id();
$result = Database::select('*', $obj->table, array('where' => array('parent_id = ? AND c_id = ?' => array('0', $course_id)), 'order' => "{$sidx} {$sord}", 'LIMIT' => "{$start} , {$limit}"));
$new_result = array();
foreach ($result as $item) {
if (!$item['status']) {
$item['name'] = '<font style="color:#AAA">' . $item['name'] . '</font>';
}
$item['headline'] = Display::url($item['headline'], api_get_path(WEB_CODE_PATH) . 'timeline/view.php?id=' . $item['id']);