|
|
|
@ -118,6 +118,7 @@ if (!empty($course_list)) { |
|
|
|
|
'publicated_on ASC', |
|
|
|
|
true |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$lp_list = $list->get_flat_list(); |
|
|
|
|
|
|
|
|
|
$lp_count = 0; |
|
|
|
@ -129,9 +130,9 @@ if (!empty($course_list)) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$course_info = api_get_course_info($course_data['code']); |
|
|
|
|
$exercise_count = count(get_all_exercises($course_info, $session_id, true)); |
|
|
|
|
|
|
|
|
|
$max_mutation_date = ''; |
|
|
|
|
|
|
|
|
|
$last_date = Tracking::get_last_connection_date_on_the_course( |
|
|
|
@ -161,7 +162,10 @@ if (!empty($course_list)) { |
|
|
|
|
|
|
|
|
|
if (strtotime($last_date) < strtotime($lp_date_original)) { |
|
|
|
|
if (empty($icons)) { |
|
|
|
|
$icons .= ' '.Display::return_icon($image, get_lang('TitleNotification').': '.$label.' - '.$lp_date_original).' '; |
|
|
|
|
$icons .= ' '.Display::return_icon( |
|
|
|
|
$image, |
|
|
|
|
get_lang('TitleNotification').': '.$label.' - '.$lp_date_original |
|
|
|
|
).' '; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -250,12 +254,22 @@ foreach ($final_array as $session_data) { |
|
|
|
|
if(!empty($exercise_result['exe_weighting']) && intval($exercise_result['exe_weighting']) != 0) { |
|
|
|
|
$my_score = $exercise_result['exe_result']/$exercise_result['exe_weighting']; |
|
|
|
|
} |
|
|
|
|
$position = get_exercise_result_ranking($my_score, $exercise_result['exe_id'], $my_exercise_id, $my_course_code, $session_id, $user_list); |
|
|
|
|
//$exercise_info->exercise = Display::url($exercise_info->exercise, api_get_path(WEB_CODE_PATH)."exercice/exercice.php?cidReq=$my_course_code&exerciseId={$exercise_info->id}&id_session=$session_id&show=result", array('target'=>SESSION_LINK_TARGET,'class'=>'exercise-result-link')); |
|
|
|
|
$exercise_info->exercise = Display::url($exercise_info->exercise, api_get_path(WEB_CODE_PATH)."exercice/result.php?cidReq=$my_course_code&id={$exercise_result['exe_id']}&id_session=$session_id&show_headers=1", array('target'=>SESSION_LINK_TARGET,'class'=>'exercise-result-link')); |
|
|
|
|
$position = get_exercise_result_ranking( |
|
|
|
|
$my_score, |
|
|
|
|
$exercise_result['exe_id'], |
|
|
|
|
$my_exercise_id, |
|
|
|
|
$my_course_code, |
|
|
|
|
$session_id, |
|
|
|
|
$user_list |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$exercise_info->exercise = Display::url( |
|
|
|
|
$exercise_info->exercise, |
|
|
|
|
api_get_path(WEB_CODE_PATH)."exercice/result.php?cidReq=$my_course_code&id={$exercise_result['exe_id']}&id_session=$session_id&show_headers=1", |
|
|
|
|
array('target'=>SESSION_LINK_TARGET,'class'=>'exercise-result-link') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$my_real_array[]= array( |
|
|
|
|
//'date' => api_get_local_time($exercise_result['exe_date']), |
|
|
|
|
'status' => Display::return_icon('quiz.gif', get_lang('Attempted'),'', ICON_SIZE_SMALL), |
|
|
|
|
'date' => $start_date, |
|
|
|
|
'course' => $course_data['name'], |
|
|
|
@ -275,9 +289,13 @@ foreach ($final_array as $session_data) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$exercise_info->exercise = Display::url($exercise_info->exercise, api_get_path(WEB_CODE_PATH)."exercice/overview.php?cidReq=$my_course_code&exerciseId={$exercise_info->id}&id_session=$session_id", array('target'=>SESSION_LINK_TARGET)); |
|
|
|
|
$exercise_info->exercise = Display::url( |
|
|
|
|
$exercise_info->exercise, |
|
|
|
|
api_get_path(WEB_CODE_PATH)."exercice/overview.php?cidReq=$my_course_code&exerciseId={$exercise_info->id}&id_session=$session_id", |
|
|
|
|
array('target'=>SESSION_LINK_TARGET) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$new_exercises[]= array( |
|
|
|
|
//'date' => api_get_local_time($exercise_result['exe_date']), |
|
|
|
|
'status' => Display::return_icon('star.png', get_lang('New'), array('width'=>ICON_SIZE_SMALL)), |
|
|
|
|
'date' => $start_date, |
|
|
|
|
'course' => $course_data['name'], |
|
|
|
@ -349,11 +367,20 @@ $extra_params_courses['pgbuttons'] = false;*/ |
|
|
|
|
//$extra_params_courses['autowidth'] = 'true'; |
|
|
|
|
|
|
|
|
|
$url = api_get_path(WEB_AJAX_PATH).'course_home.ajax.php?a=session_courses_lp_default&session_id='.$session_id.'&course_id='.$course_id; |
|
|
|
|
$columns = array(get_lang('PublicationDate'),get_lang('Course'), get_lang('LearningPaths')); |
|
|
|
|
$column_model = array(array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'true'), |
|
|
|
|
$columns = array( |
|
|
|
|
get_lang('PublicationDate'), |
|
|
|
|
get_lang('Course'), |
|
|
|
|
get_lang('LearningPaths') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$column_model = array( |
|
|
|
|
array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'true'), |
|
|
|
|
array('name'=>'course', 'index'=>'course', 'width'=>'300', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'), |
|
|
|
|
array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true')); |
|
|
|
|
array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$extra_params = array(); |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
$extra_params['sortname'] = 'date'; |
|
|
|
|
$extra_params['sortorder'] = 'asc'; |
|
|
|
@ -388,8 +415,12 @@ $extra_params_course['height'] = "100%"; |
|
|
|
|
//Per Week grid |
|
|
|
|
$url_week = api_get_path(WEB_AJAX_PATH).'course_home.ajax.php?a=session_courses_lp_by_week&session_id='.$session_id.'&course_id='.$course_id; |
|
|
|
|
$column_week = array( |
|
|
|
|
get_lang('PeriodWeek'), get_lang('PublicationDate'), get_lang('Course'), get_lang('LearningPaths') |
|
|
|
|
get_lang('PeriodWeek'), |
|
|
|
|
get_lang('PublicationDate'), |
|
|
|
|
get_lang('Course'), |
|
|
|
|
get_lang('LearningPaths') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$column_week_model = array( |
|
|
|
|
array('name'=>'week', 'index'=>'week', 'width'=>'40', 'align'=>'left', 'sortable'=>'false'), |
|
|
|
|
array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'false'), |
|
|
|
@ -458,6 +489,7 @@ $(function() { |
|
|
|
|
width:550, |
|
|
|
|
modal: true |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$(".opener").click(function() { |
|
|
|
|
var my_id = $(this).attr('id'); |
|
|
|
|
var big_image = '#main_graph_' + my_id; |
|
|
|
@ -493,14 +525,40 @@ if (empty($my_reporting)) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Main headers |
|
|
|
|
$headers = array(get_lang('Courses'), get_lang('LearningPaths'), get_lang('MyQCM'), get_lang('MyStatistics')); |
|
|
|
|
$headers = array( |
|
|
|
|
get_lang('Courses'), |
|
|
|
|
get_lang('LearningPaths'), |
|
|
|
|
get_lang('MyQCM'), |
|
|
|
|
get_lang('MyStatistics') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Sub headers |
|
|
|
|
$sub_header = array(get_lang('AllLearningPaths'), get_lang('PerWeek'), get_lang('ByCourse')); |
|
|
|
|
$sub_header = array( |
|
|
|
|
get_lang('AllLearningPaths'), |
|
|
|
|
get_lang('PerWeek'), |
|
|
|
|
get_lang('ByCourse') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Sub headers data |
|
|
|
|
$lp_tabs = Display::tabs($sub_header, array(Display::grid_html('list_default'), Display::grid_html('list_week'), Display::grid_html('list_course')), 'sub_tab'); |
|
|
|
|
$lp_tabs = Display::tabs( |
|
|
|
|
$sub_header, |
|
|
|
|
array( |
|
|
|
|
Display::grid_html('list_default'), |
|
|
|
|
Display::grid_html('list_week'), |
|
|
|
|
Display::grid_html('list_course') |
|
|
|
|
), |
|
|
|
|
'sub_tab' |
|
|
|
|
); |
|
|
|
|
$courses_tab = Display::grid_html('courses'); |
|
|
|
|
// Main headers data |
|
|
|
|
echo Display::tabs($headers, array($courses_tab, $lp_tabs, Display::grid_html('exercises'), $my_reporting)); |
|
|
|
|
echo Display::tabs( |
|
|
|
|
$headers, |
|
|
|
|
array( |
|
|
|
|
$courses_tab, |
|
|
|
|
$lp_tabs, |
|
|
|
|
Display::grid_html('exercises'), |
|
|
|
|
$my_reporting |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
Display::display_footer(); |
|
|
|
|