|
|
|
|
@ -44,16 +44,16 @@ if (isset ($_GET['from']) && $_GET['from'] == 'myspace') { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$nameTools = get_lang("StudentDetails"); |
|
|
|
|
//$nameTools=SECTION_PLATFORM_ADMIN; |
|
|
|
|
//$nameTools = SECTION_PLATFORM_ADMIN; |
|
|
|
|
|
|
|
|
|
$get_course_code = Security :: remove_XSS($_GET['course']); |
|
|
|
|
if (isset ($_GET['details'])) { |
|
|
|
|
if (!empty ($_GET['origin']) && $_GET['origin'] == 'user_course') { |
|
|
|
|
$course_infos = CourseManager :: get_course_information($get_course_code); |
|
|
|
|
$course_info = CourseManager :: get_course_information($get_course_code); |
|
|
|
|
if (empty ($cidReq)) { |
|
|
|
|
$interbreadcrumb[] = array ( |
|
|
|
|
"url" => api_get_path(WEB_COURSE_PATH) . $course_infos['directory'], |
|
|
|
|
'name' => $course_infos['title'] |
|
|
|
|
"url" => api_get_path(WEB_COURSE_PATH) . $course_info['directory'], |
|
|
|
|
'name' => $course_info['title'] |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
$interbreadcrumb[] = array ( |
|
|
|
|
@ -62,9 +62,9 @@ if (isset ($_GET['details'])) { |
|
|
|
|
); |
|
|
|
|
} else |
|
|
|
|
if (!empty ($_GET['origin']) && $_GET['origin'] == 'tracking_course') { |
|
|
|
|
$course_infos = CourseManager :: get_course_information($get_course_code); |
|
|
|
|
$course_info = CourseManager :: get_course_information($get_course_code); |
|
|
|
|
if (empty ($cidReq)) { |
|
|
|
|
//$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_infos['directory'], 'name' => $course_infos['title']); |
|
|
|
|
//$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], 'name' => $course_info['title']); |
|
|
|
|
} |
|
|
|
|
$interbreadcrumb[] = array ( |
|
|
|
|
"url" => "../tracking/courseLog.php?cidReq=" . $get_course_code . '&studentlist=true&id_session=' . (empty ($_SESSION['id_session']) ? '' : $_SESSION['id_session']), |
|
|
|
|
@ -206,9 +206,9 @@ $course_quiz_answer = 'quiz_answer'; |
|
|
|
|
$course_student_publication = Database :: get_course_table(TABLE_STUDENT_PUBLICATION); |
|
|
|
|
|
|
|
|
|
if (isset ($_GET["user_id"]) && $_GET["user_id"] != "") { |
|
|
|
|
$i_user_id = (int) $_GET["user_id"]; |
|
|
|
|
$user_id = (int) $_GET["user_id"]; |
|
|
|
|
} else { |
|
|
|
|
$i_user_id = $_user['user_id']; |
|
|
|
|
$user_id = $_user['user_id']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!empty ($_GET['student'])) { |
|
|
|
|
@ -216,23 +216,23 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
$student_id = intval($_GET['student']); |
|
|
|
|
|
|
|
|
|
// infos about user |
|
|
|
|
$a_infosUser = UserManager :: get_user_info_by_id($student_id); |
|
|
|
|
if ($_user['status'] == DRH && $a_infosUser['hr_dept_id'] != $_user['user_id']) { |
|
|
|
|
$info_user = UserManager :: get_user_info_by_id($student_id); |
|
|
|
|
if ($_user['status'] == DRH && $info_user['hr_dept_id'] != $_user['user_id']) { |
|
|
|
|
api_not_allowed(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$a_infosUser['name'] = api_get_person_name($a_infosUser['firstname'], $a_infosUser['lastname']); |
|
|
|
|
$info_user['name'] = api_get_person_name($info_user['firstname'], $info_user['lastname']); |
|
|
|
|
|
|
|
|
|
// Actions bar |
|
|
|
|
echo '<div class="actions">'; |
|
|
|
|
echo '<a href="javascript: void(0);" onclick="javascript: window.print();"><img src="../img/printmgr.gif"> ' . get_lang('Print') . '</a>'; |
|
|
|
|
echo '<a href="' . api_get_self() . '?' . Security :: remove_XSS($_SERVER['QUERY_STRING']) . '&export=csv"><img src="../img/excel.gif"> ' . get_lang('ExportAsCSV') . '</a>'; |
|
|
|
|
if (!empty ($a_infosUser['email'])) { |
|
|
|
|
$sendMail = Display :: return_icon('send_mail.gif', get_lang('SendMail')) . ' ' . Display :: encrypted_mailto_link($a_infosUser['email'], get_lang('SendMail')); |
|
|
|
|
if (!empty ($info_user['email'])) { |
|
|
|
|
$send_mail = Display :: return_icon('send_mail.gif', get_lang('SendMail')) . ' ' . Display :: encrypted_mailto_link($info_user['email'], get_lang('SendMail')); |
|
|
|
|
} else { |
|
|
|
|
$sendMail = Display :: return_icon('send_mail.gif', get_lang('SendMail')) . ' ' . get_lang('SendMail'); |
|
|
|
|
$send_mail = Display :: return_icon('send_mail.gif', get_lang('SendMail')) . ' ' . get_lang('SendMail'); |
|
|
|
|
} |
|
|
|
|
echo $sendMail; |
|
|
|
|
echo $send_mail; |
|
|
|
|
if (!empty ($_GET['student']) && !empty ($_GET['course'])) { //only show link to connection details if course and student were defined in the URL |
|
|
|
|
echo '<a href="access_details.php?student=' . Security :: remove_XSS($_GET['student']) . '&course=' . Security :: remove_XSS($_GET['course']) . '&origin=' . Security :: remove_XSS($_GET['origin']) . '&cidReq=' . Security :: remove_XSS($_GET['course']) . '">' . Display :: return_icon('statistics.gif', get_lang('AccessDetails')) . ' ' . get_lang('AccessDetails') . '</a>'; |
|
|
|
|
} |
|
|
|
|
@ -240,10 +240,10 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
// is the user online ? |
|
|
|
|
$statistics_database = Database :: get_statistic_database(); |
|
|
|
|
$student_on_line = Security :: remove_XSS($_GET['student']); |
|
|
|
|
$a_usersOnline = WhoIsOnline($student_on_line, $statistics_database, 30); |
|
|
|
|
foreach ($a_usersOnline as $a_online) { |
|
|
|
|
if (in_array($_GET['student'], $a_online)) { |
|
|
|
|
$student_online = Security :: remove_XSS($_GET['student']); |
|
|
|
|
$users_online = WhoIsOnline($student_online, $statistics_database, 30); |
|
|
|
|
foreach ($users_online as $online) { |
|
|
|
|
if (in_array($_GET['student'], $online)) { |
|
|
|
|
$online = get_lang('Yes'); |
|
|
|
|
break; |
|
|
|
|
} else { |
|
|
|
|
@ -252,44 +252,44 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$avg_student_progress = $avg_student_score = $nb_courses = 0; |
|
|
|
|
$sql = 'SELECT course_code FROM ' . $tbl_course_user . ' WHERE user_id=' . Database :: escape_string($a_infosUser['user_id']); |
|
|
|
|
$sql = 'SELECT course_code FROM ' . $tbl_course_user . ' WHERE user_id=' . Database :: escape_string($info_user['user_id']); |
|
|
|
|
$rs = Database::query($sql, __FILE__, __LINE__); |
|
|
|
|
$a_courses = array (); |
|
|
|
|
$courses = array (); |
|
|
|
|
while ($row = Database :: fetch_array($rs)) { |
|
|
|
|
$a_courses[$row['course_code']] = $row['course_code']; |
|
|
|
|
$courses[$row['course_code']] = $row['course_code']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// get the list of sessions where the user is subscribed as student |
|
|
|
|
$sql = 'SELECT DISTINCT course_code FROM ' . Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER) . ' WHERE id_user=' . intval($a_infosUser['user_id']); |
|
|
|
|
$sql = 'SELECT DISTINCT course_code FROM ' . Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER) . ' WHERE id_user=' . intval($info_user['user_id']); |
|
|
|
|
$rs = Database::query($sql, __FILE__, __LINE__); |
|
|
|
|
while ($row = Database :: fetch_array($rs)) { |
|
|
|
|
$a_courses[$row['course_code']] = $row['course_code']; |
|
|
|
|
$courses[$row['course_code']] = $row['course_code']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$course_id = Security :: remove_XSS($_GET['course']); |
|
|
|
|
if (!CourseManager :: is_user_subscribed_in_course($a_infosUser['user_id'], $course_id, true)) { |
|
|
|
|
unset ($a_courses[$key]); |
|
|
|
|
if (!CourseManager :: is_user_subscribed_in_course($info_user['user_id'], $course_id, true)) { |
|
|
|
|
unset ($courses[$key]); |
|
|
|
|
} else { |
|
|
|
|
$nb_courses++; |
|
|
|
|
$avg_student_progress = Tracking :: get_avg_student_progress($a_infosUser['user_id'], $course_id); |
|
|
|
|
$avg_student_progress = Tracking :: get_avg_student_progress($info_user['user_id'], $course_id); |
|
|
|
|
//the score inside the Reporting table |
|
|
|
|
$avg_student_score = Tracking :: get_average_test_scorm_and_lp($a_infosUser['user_id'], $course_id); |
|
|
|
|
$avg_student_score = Tracking :: get_average_test_scorm_and_lp($info_user['user_id'], $course_id); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$avg_student_progress = round($avg_student_progress, 2); |
|
|
|
|
$avg_student_score = round($avg_student_score, 2); |
|
|
|
|
|
|
|
|
|
$first_connection_date = Tracking :: get_first_connection_date($a_infosUser['user_id']); |
|
|
|
|
$first_connection_date = Tracking :: get_first_connection_date($info_user['user_id']); |
|
|
|
|
if ($first_connection_date == '') { |
|
|
|
|
$first_connection_date = get_lang('NoConnexion'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$last_connection_date = Tracking :: get_last_connection_date($a_infosUser['user_id'], true); |
|
|
|
|
$last_connection_date = Tracking :: get_last_connection_date($info_user['user_id'], true); |
|
|
|
|
if ($last_connection_date == '') { |
|
|
|
|
$last_connection_date = get_lang('NoConnexion'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$time_spent_on_the_course = api_time_to_hms(Tracking :: get_time_spent_on_the_course($a_infosUser['user_id'], $course_id)); |
|
|
|
|
$time_spent_on_the_course = api_time_to_hms(Tracking :: get_time_spent_on_the_course($info_user['user_id'], $course_id)); |
|
|
|
|
// cvs informations |
|
|
|
|
$csv_content[] = array ( |
|
|
|
|
get_lang('Informations', '') |
|
|
|
|
@ -300,9 +300,9 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
get_lang('Tel', '') |
|
|
|
|
); |
|
|
|
|
$csv_content[] = array ( |
|
|
|
|
$a_infosUser['name'], |
|
|
|
|
$a_infosUser['email'], |
|
|
|
|
$a_infosUser['phone'] |
|
|
|
|
$info_user['name'], |
|
|
|
|
$info_user['email'], |
|
|
|
|
$info_user['phone'] |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$csv_content[] = array (); |
|
|
|
|
@ -332,7 +332,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
$image_array = UserManager :: get_user_picture_path_by_id($a_infosUser['user_id'], 'web', false, true); |
|
|
|
|
$image_array = UserManager :: get_user_picture_path_by_id($info_user['user_id'], 'web', false, true); |
|
|
|
|
echo '<td class="borderRight" width="10%" valign="top">'; |
|
|
|
|
|
|
|
|
|
// get the path,width and height from original picture |
|
|
|
|
@ -343,7 +343,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
$big_image_height = $big_image_size[1]; |
|
|
|
|
$url_big_image = $big_image . '?rnd=' . time(); |
|
|
|
|
$img_attributes = 'src="' . $image_file . '?rand=' . time() . '" ' . |
|
|
|
|
'alt="' . api_get_person_name($a_infosUser['lastname'], $a_infosUser['firstname']) . '" ' . |
|
|
|
|
'alt="' . api_get_person_name($info_user['lastname'], $info_user['firstname']) . '" ' . |
|
|
|
|
'style="float:' . ($text_dir == 'rtl' ? 'left' : 'right') . '; padding:5px;" '; |
|
|
|
|
|
|
|
|
|
if ($image_array['file'] == 'unknown.jpg') { |
|
|
|
|
@ -368,7 +368,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
echo get_lang('Name') . ' : '; |
|
|
|
|
echo $a_infosUser['name']; |
|
|
|
|
echo $info_user['name']; |
|
|
|
|
?> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
@ -377,8 +377,8 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
echo get_lang('Email') . ' : '; |
|
|
|
|
if (!empty ($a_infosUser['email'])) { |
|
|
|
|
echo '<a href="mailto:' . $a_infosUser['email'] . '">' . $a_infosUser['email'] . '</a>'; |
|
|
|
|
if (!empty ($info_user['email'])) { |
|
|
|
|
echo '<a href="mailto:' . $info_user['email'] . '">' . $info_user['email'] . '</a>'; |
|
|
|
|
} else { |
|
|
|
|
echo get_lang('NoEmail'); |
|
|
|
|
} |
|
|
|
|
@ -391,8 +391,8 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
echo get_lang('Tel') . '. '; |
|
|
|
|
|
|
|
|
|
if (!empty ($a_infosUser['phone'])) { |
|
|
|
|
echo $a_infosUser['phone']; |
|
|
|
|
if (!empty ($info_user['phone'])) { |
|
|
|
|
echo $info_user['phone']; |
|
|
|
|
} else { |
|
|
|
|
echo get_lang('NoTel'); |
|
|
|
|
} |
|
|
|
|
@ -405,8 +405,8 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
echo get_lang('OfficialCode') . ' : '; |
|
|
|
|
|
|
|
|
|
if (!empty ($a_infosUser['official_code'])) { |
|
|
|
|
echo $a_infosUser['official_code']; |
|
|
|
|
if (!empty ($info_user['official_code'])) { |
|
|
|
|
echo $info_user['official_code']; |
|
|
|
|
} else { |
|
|
|
|
echo get_lang('NoOfficialCode'); |
|
|
|
|
} |
|
|
|
|
@ -461,7 +461,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
echo get_lang('Progress'); |
|
|
|
|
Display :: display_icon('info2.gif', get_lang('ScormAndLPProgressTotalAverage'), array ( |
|
|
|
|
Display :: display_icon('info3.gif', get_lang('ScormAndLPProgressTotalAverage'), array ( |
|
|
|
|
'align' => 'absmiddle', |
|
|
|
|
'hspace' => '3px' |
|
|
|
|
)); |
|
|
|
|
@ -476,7 +476,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
echo get_lang('Score'); |
|
|
|
|
Display :: display_icon('info2.gif', get_lang('ScormAndLPTestTotalAverage'), array ( |
|
|
|
|
Display :: display_icon('info3.gif', get_lang('ScormAndLPTestTotalAverage'), array ( |
|
|
|
|
'align' => 'absmiddle', |
|
|
|
|
'hspace' => '3px' |
|
|
|
|
)); |
|
|
|
|
@ -499,7 +499,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
if (!empty ($_GET['details'])) { |
|
|
|
|
$course_code_info = Security :: remove_XSS($_GET['course']); |
|
|
|
|
$a_infosCours = CourseManager :: get_course_information($course_code_info); |
|
|
|
|
$info_course = CourseManager :: get_course_information($course_code_info); |
|
|
|
|
|
|
|
|
|
//get coach and session_name if there is one and if session_mode is activated |
|
|
|
|
if (api_get_setting('use_session_mode') == 'true') { |
|
|
|
|
@ -510,7 +510,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
$sql = 'SELECT id_session |
|
|
|
|
FROM ' . $tbl_session_course_user . ' session_course_user |
|
|
|
|
WHERE session_course_user.id_user = ' . intval($a_infosUser['user_id']) . ' |
|
|
|
|
WHERE session_course_user.id_user = ' . intval($info_user['user_id']) . ' |
|
|
|
|
AND session_course_user.course_code = "' . Database :: escape_string($course_code_info) . '" |
|
|
|
|
ORDER BY id_session DESC'; |
|
|
|
|
$rs = Database::query($sql, __FILE__, __LINE__); |
|
|
|
|
@ -534,36 +534,36 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
if ($session_course_coach_id != 0) { |
|
|
|
|
$coach_infos = UserManager :: get_user_info_by_id($session_course_coach_id); |
|
|
|
|
$a_infosCours['tutor_name'] = api_get_person_name($coach_infos['firstname'], $coach_infos['lastname']); |
|
|
|
|
$info_course['tutor_name'] = api_get_person_name($coach_infos['firstname'], $coach_infos['lastname']); |
|
|
|
|
} |
|
|
|
|
elseif ($session_coach_id != 0) { |
|
|
|
|
$coach_infos = UserManager :: get_user_info_by_id($session_coach_id); |
|
|
|
|
$a_infosCours['tutor_name'] = api_get_person_name($coach_infos['firstname'], $coach_infos['lastname']); |
|
|
|
|
$info_course['tutor_name'] = api_get_person_name($coach_infos['firstname'], $coach_infos['lastname']); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} // end if(api_get_setting('use_session_mode')=='true') |
|
|
|
|
|
|
|
|
|
$date_start = ''; |
|
|
|
|
if (!empty ($a_infosCours['date_start'])) { |
|
|
|
|
$a_date_start = explode('-', $a_infosCours['date_start']); |
|
|
|
|
$date_start = $a_date_start[2] . '/' . $a_date_start[1] . '/' . $a_date_start[0]; |
|
|
|
|
if (!empty ($info_course['date_start'])) { |
|
|
|
|
$date_start = explode('-', $info_course['date_start']); |
|
|
|
|
$date_start = $date_start[2] . '/' . $date_start[1] . '/' . $date_start[0]; |
|
|
|
|
} |
|
|
|
|
$date_end = ''; |
|
|
|
|
if (!empty ($a_infosCours['date_end'])) { |
|
|
|
|
$a_date_end = explode('-', $a_infosCours['date_end']); |
|
|
|
|
$date_end = $a_date_end[2] . '/' . $a_date_end[1] . '/' . $a_date_end[0]; |
|
|
|
|
if (!empty ($info_course['date_end'])) { |
|
|
|
|
$date_end = explode('-', $info_course['date_end']); |
|
|
|
|
$date_end = $date_end[2] . '/' . $date_end[1] . '/' . $date_end[0]; |
|
|
|
|
} |
|
|
|
|
$dateSession = get_lang('From') . ' ' . $date_start . ' ' . get_lang('To') . ' ' . $date_end; |
|
|
|
|
$nb_login = Tracking :: count_login_per_student($a_infosUser['user_id'], $_GET['course']); |
|
|
|
|
$tableTitle = $a_infosCours['title'] . ' | ' . get_lang('CountToolAccess') . ' : ' . $nb_login . ' | ' . get_lang('Tutor') . ' : ' . stripslashes($a_infosCours['tutor_name']) . ((!empty ($session_name)) ? ' | ' . get_lang('Session') . ' : ' . $session_name : ''); |
|
|
|
|
$nb_login = Tracking :: count_login_per_student($info_user['user_id'], $_GET['course']); |
|
|
|
|
$table_title = $info_course['title'] . ' | ' . get_lang('CountToolAccess') . ' : ' . $nb_login . ' | ' . get_lang('Tutor') . ' : ' . stripslashes($info_course['tutor_name']) . ((!empty ($session_name)) ? ' | ' . get_lang('Session') . ' : ' . $session_name : ''); |
|
|
|
|
|
|
|
|
|
$csv_content[] = array (); |
|
|
|
|
$csv_content[] = array (str_replace(' ', '', $tableTitle)); |
|
|
|
|
$csv_content[] = array (str_replace(' ', '', $table_title)); |
|
|
|
|
?> |
|
|
|
|
<tr> |
|
|
|
|
<td colspan="6"> |
|
|
|
|
<strong><?php echo $tableTitle; ?></strong>
|
|
|
|
|
<strong><?php echo $table_title; ?></strong>
|
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
@ -620,27 +620,27 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
</tr> |
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
$a_headerLearnpath = array ( |
|
|
|
|
$headerLearnpath = array ( |
|
|
|
|
get_lang('Learnpath'), |
|
|
|
|
get_lang('Time'), |
|
|
|
|
get_lang('Progress'), |
|
|
|
|
get_lang('LastConnexion') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$t_lp = Database :: get_course_table(TABLE_LP_MAIN, $a_infosCours['db_name']); |
|
|
|
|
$t_lpi = Database :: get_course_table(TABLE_LP_ITEM, $a_infosCours['db_name']); |
|
|
|
|
$t_lpv = Database :: get_course_table(TABLE_LP_VIEW, $a_infosCours['db_name']); |
|
|
|
|
$t_lpiv = Database :: get_course_table(TABLE_LP_ITEM_VIEW, $a_infosCours['db_name']); |
|
|
|
|
$t_lp = Database :: get_course_table(TABLE_LP_MAIN, $info_course['db_name']); |
|
|
|
|
$t_lpi = Database :: get_course_table(TABLE_LP_ITEM, $info_course['db_name']); |
|
|
|
|
$t_lpv = Database :: get_course_table(TABLE_LP_VIEW, $info_course['db_name']); |
|
|
|
|
$t_lpiv = Database :: get_course_table(TABLE_LP_ITEM_VIEW, $info_course['db_name']); |
|
|
|
|
|
|
|
|
|
$tbl_stats_exercices = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES); |
|
|
|
|
$tbl_stats_attempts = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); |
|
|
|
|
$tbl_quiz_questions = Database :: get_course_table(TABLE_QUIZ_QUESTION, $a_infosCours['db_name']); |
|
|
|
|
$tbl_quiz_questions = Database :: get_course_table(TABLE_QUIZ_QUESTION, $info_course['db_name']); |
|
|
|
|
|
|
|
|
|
$sqlLearnpath = "SELECT lp.name,lp.id |
|
|
|
|
$sql_learnpath = "SELECT lp.name,lp.id |
|
|
|
|
FROM $t_lp AS lp ORDER BY lp.name ASC |
|
|
|
|
"; |
|
|
|
|
|
|
|
|
|
$resultLearnpath = Database::query($sqlLearnpath, __FILE__, __LINE__); |
|
|
|
|
$result_learnpath = Database::query($sql_learnpath, __FILE__, __LINE__); |
|
|
|
|
|
|
|
|
|
$csv_content[] = array (); |
|
|
|
|
$csv_content[] = array ( |
|
|
|
|
@ -651,11 +651,11 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
get_lang('LastConnexion', '') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (Database :: num_rows($resultLearnpath) > 0) { |
|
|
|
|
if (Database :: num_rows($result_learnpath) > 0) { |
|
|
|
|
$i = 0; |
|
|
|
|
while ($a_learnpath = Database :: fetch_array($resultLearnpath)) { |
|
|
|
|
while ($learnpath = Database :: fetch_array($result_learnpath)) { |
|
|
|
|
$any_result = false; |
|
|
|
|
$progress = learnpath :: get_db_progress($a_learnpath['id'], $student_id, '%', $a_infosCours['db_name'], true); |
|
|
|
|
$progress = learnpath :: get_db_progress($learnpath['id'], $student_id, '%', $info_course['db_name'], true); |
|
|
|
|
if ($progress === null) { |
|
|
|
|
$progress = '0%'; |
|
|
|
|
} else { |
|
|
|
|
@ -667,7 +667,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
FROM ' . $t_lpiv . ' AS item_view |
|
|
|
|
INNER JOIN ' . $t_lpv . ' AS view |
|
|
|
|
ON item_view.lp_view_id = view.id |
|
|
|
|
AND view.lp_id = ' . $a_learnpath['id'] . ' |
|
|
|
|
AND view.lp_id = ' . $learnpath['id'] . ' |
|
|
|
|
AND view.user_id = ' . intval($_GET['student']); |
|
|
|
|
$rs = Database::query($sql, __FILE__, __LINE__); |
|
|
|
|
$total_time = 0; |
|
|
|
|
@ -682,7 +682,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
FROM ' . $t_lpiv . ' AS item_view |
|
|
|
|
INNER JOIN ' . $t_lpv . ' AS view |
|
|
|
|
ON item_view.lp_view_id = view.id |
|
|
|
|
AND view.lp_id = ' . $a_learnpath['id'] . ' |
|
|
|
|
AND view.lp_id = ' . $learnpath['id'] . ' |
|
|
|
|
AND view.user_id = ' . intval($_GET['student']); |
|
|
|
|
$rs = Database::query($sql, __FILE__, __LINE__); |
|
|
|
|
$start_time = null; |
|
|
|
|
@ -694,31 +694,31 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
//QUIZZ IN LP |
|
|
|
|
$score = Tracking :: get_avg_student_score(intval($_GET['student']), Database :: escape_string($_GET['course']), array ( |
|
|
|
|
$a_learnpath['id'] |
|
|
|
|
$learnpath['id'] |
|
|
|
|
)); |
|
|
|
|
|
|
|
|
|
if (empty ($score)) { |
|
|
|
|
//$score = 0; |
|
|
|
|
} |
|
|
|
|
if ($i % 2 == 0) { |
|
|
|
|
$s_css_class = "row_odd"; |
|
|
|
|
$css_class = "row_odd"; |
|
|
|
|
} else { |
|
|
|
|
$s_css_class = "row_even"; |
|
|
|
|
$css_class = "row_even"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$i++; |
|
|
|
|
|
|
|
|
|
$csv_content[] = array ( |
|
|
|
|
api_html_entity_decode(stripslashes($a_learnpath['name']), ENT_QUOTES, $charset), |
|
|
|
|
api_html_entity_decode(stripslashes($learnpath['name']), ENT_QUOTES, $charset), |
|
|
|
|
api_time_to_hms($total_time), |
|
|
|
|
$score . '%', |
|
|
|
|
$progress, |
|
|
|
|
date('Y-m-d', $start_time) |
|
|
|
|
); |
|
|
|
|
?> |
|
|
|
|
<tr class="<?php echo $s_css_class;?>">
|
|
|
|
|
<tr class="<?php echo $css_class;?>">
|
|
|
|
|
<td> |
|
|
|
|
<?php echo stripslashes($a_learnpath['name']); ?> |
|
|
|
|
<?php echo stripslashes($learnpath['name']); ?> |
|
|
|
|
</td> |
|
|
|
|
<td align="center"> |
|
|
|
|
<?php echo api_time_to_hms($total_time) ?> |
|
|
|
|
@ -759,7 +759,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
$from ='&from=myspace'; |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
|
<a href="lp_tracking.php?course=<?php echo Security::remove_XSS($_GET['course']).$from; ?>&origin=<?php echo Security::remove_XSS($_GET['origin']) ?>&lp_id=<?php echo $a_learnpath['id']?>&student_id=<?php echo $a_infosUser['user_id'] ?>">
|
|
|
|
|
<a href="lp_tracking.php?course=<?php echo Security::remove_XSS($_GET['course']).$from; ?>&origin=<?php echo Security::remove_XSS($_GET['origin']) ?>&lp_id=<?php echo $learnpath['id']?>&student_id=<?php echo $info_user['user_id'] ?>">
|
|
|
|
|
<img src="../img/2rightarrow.gif" border="0" /> |
|
|
|
|
</a> |
|
|
|
|
<?php |
|
|
|
|
@ -768,8 +768,8 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<?php |
|
|
|
|
$dataLearnpath[$i][] = $a_learnpath['name']; |
|
|
|
|
$dataLearnpath[$i][] = $progress . '%'; |
|
|
|
|
$data_learnpath[$i][] = $learnpath['name']; |
|
|
|
|
$data_learnpath[$i][] = $progress . '%'; |
|
|
|
|
$i++; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
@ -808,113 +808,113 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
get_lang('Attempts') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$a_infosCours = CourseManager :: get_course_information(Security :: remove_XSS($_GET['course'])); |
|
|
|
|
$t_tool = Database :: get_course_table(TABLE_TOOL_LIST, $a_infosCours['db_name']); |
|
|
|
|
$info_course = CourseManager :: get_course_information(Security :: remove_XSS($_GET['course'])); |
|
|
|
|
$t_tool = Database :: get_course_table(TABLE_TOOL_LIST, $info_course['db_name']); |
|
|
|
|
$sql = 'SELECT visibility FROM ' . $t_tool . ' WHERE name="quiz"'; |
|
|
|
|
|
|
|
|
|
$resultVisibilityQuizz = Database::query($sql, __FILE__, __LINE__); |
|
|
|
|
$t_quiz = Database :: get_course_table(TABLE_QUIZ_TEST, $a_infosCours['db_name']); |
|
|
|
|
$result_visibility_quizz = Database::query($sql, __FILE__, __LINE__); |
|
|
|
|
$t_quiz = Database :: get_course_table(TABLE_QUIZ_TEST, $info_course['db_name']); |
|
|
|
|
|
|
|
|
|
if (Database :: result($resultVisibilityQuizz, 0, 'visibility') == 1) { |
|
|
|
|
if (Database :: result($result_visibility_quizz, 0, 'visibility') == 1) { |
|
|
|
|
|
|
|
|
|
$sqlExercices = " SELECT quiz.title,id |
|
|
|
|
$sql_exercices = "SELECT quiz.title,id |
|
|
|
|
FROM " . $t_quiz . " AS quiz |
|
|
|
|
WHERE active='1' ORDER BY quiz.title ASC |
|
|
|
|
"; |
|
|
|
|
|
|
|
|
|
$resultExercices = Database::query($sqlExercices, __FILE__, __LINE__); |
|
|
|
|
$result_exercices = Database::query($sql_exercices, __FILE__, __LINE__); |
|
|
|
|
$i = 0; |
|
|
|
|
$is_student = Security :: remove_XSS($_GET['student']); |
|
|
|
|
if (Database :: num_rows($resultExercices) > 0) { |
|
|
|
|
while ($a_exercices = Database :: fetch_array($resultExercices)) { |
|
|
|
|
$sqlEssais = " SELECT COUNT(ex.exe_id) as essais |
|
|
|
|
if (Database :: num_rows($result_exercices) > 0) { |
|
|
|
|
while ($exercices = Database :: fetch_array($result_exercices)) { |
|
|
|
|
$sql_essais = "SELECT COUNT(ex.exe_id) as essais |
|
|
|
|
FROM $tbl_stats_exercices AS ex |
|
|
|
|
WHERE ex.exe_cours_id = '" . $a_infosCours['code'] . "' |
|
|
|
|
AND ex.exe_exo_id = " . $a_exercices['id'] . " |
|
|
|
|
WHERE ex.exe_cours_id = '" . $info_course['code'] . "' |
|
|
|
|
AND ex.exe_exo_id = " . $exercices['id'] . " |
|
|
|
|
AND orig_lp_id = 0 |
|
|
|
|
AND orig_lp_item_id = 0 |
|
|
|
|
AND exe_user_id='" . Database :: escape_string($is_student) . "'"; |
|
|
|
|
$resultEssais = Database::query($sqlEssais, __FILE__, __LINE__); |
|
|
|
|
$a_essais = Database :: fetch_array($resultEssais); |
|
|
|
|
$result_essais = Database::query($sql_essais, __FILE__, __LINE__); |
|
|
|
|
$essais = Database :: fetch_array($result_essais); |
|
|
|
|
|
|
|
|
|
$sqlScore = "SELECT exe_id, exe_result,exe_weighting |
|
|
|
|
$sql_score = "SELECT exe_id, exe_result,exe_weighting |
|
|
|
|
FROM $tbl_stats_exercices |
|
|
|
|
WHERE exe_user_id = " . Database :: escape_string($is_student) . " |
|
|
|
|
AND exe_cours_id = '" . $a_infosCours['code'] . "' |
|
|
|
|
AND exe_exo_id = " . $a_exercices['id'] . " |
|
|
|
|
AND exe_cours_id = '" . $info_course['code'] . "' |
|
|
|
|
AND exe_exo_id = " . $exercices['id'] . " |
|
|
|
|
AND orig_lp_id = 0 |
|
|
|
|
AND orig_lp_item_id = 0 |
|
|
|
|
ORDER BY exe_date DESC LIMIT 1"; |
|
|
|
|
|
|
|
|
|
$resultScore = Database::query($sqlScore, __FILE__, __LINE__); |
|
|
|
|
$result_score = Database::query($sql_score, __FILE__, __LINE__); |
|
|
|
|
$score = 0; |
|
|
|
|
while ($a_score = Database :: fetch_array($resultScore)) { |
|
|
|
|
$score = $score + $a_score['exe_result']; |
|
|
|
|
$weighting = $weighting + $a_score['exe_weighting']; |
|
|
|
|
$exe_id = $a_score['exe_id']; |
|
|
|
|
while ($scores = Database :: fetch_array($result_score)) { |
|
|
|
|
$score = $score + $scores['exe_result']; |
|
|
|
|
$weighting = $weighting + $scores['exe_weighting']; |
|
|
|
|
$exe_id = $scores['exe_id']; |
|
|
|
|
} |
|
|
|
|
$pourcentageScore = 0; |
|
|
|
|
$score_percentage = 0; |
|
|
|
|
if ($weighting != 0) { |
|
|
|
|
//i.e 10.50 |
|
|
|
|
$pourcentageScore = round(($score * 100) / $weighting, 2); |
|
|
|
|
$score_percentage = round(($score * 100) / $weighting, 2); |
|
|
|
|
} else { |
|
|
|
|
$pourcentageScore = null; |
|
|
|
|
$score_percentage = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$weighting = 0; |
|
|
|
|
|
|
|
|
|
$csv_content[] = array ( |
|
|
|
|
$a_exercices['title'], |
|
|
|
|
$pourcentageScore . '%', |
|
|
|
|
$a_essais['essais'] |
|
|
|
|
$exercices['title'], |
|
|
|
|
$score_percentage . '%', |
|
|
|
|
$essais['essais'] |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if ($i % 2 == 0) { |
|
|
|
|
$s_css_class = "row_odd"; |
|
|
|
|
$css_class = "row_odd"; |
|
|
|
|
} else { |
|
|
|
|
$s_css_class = "row_even"; |
|
|
|
|
$css_class = "row_even"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$i++; |
|
|
|
|
|
|
|
|
|
echo '<tr class="' . $s_css_class . '"> |
|
|
|
|
echo '<tr class="' . $css_class . '"> |
|
|
|
|
<td> |
|
|
|
|
'; |
|
|
|
|
echo $a_exercices['title']; |
|
|
|
|
echo $exercices['title']; |
|
|
|
|
echo " </td> |
|
|
|
|
"; |
|
|
|
|
echo " <td align='center'> |
|
|
|
|
"; |
|
|
|
|
if ($a_essais['essais'] > 0) { |
|
|
|
|
echo $pourcentageScore . '%'; |
|
|
|
|
if ($essais['essais'] > 0) { |
|
|
|
|
echo $score_percentage . '%'; |
|
|
|
|
} else { |
|
|
|
|
echo '/'; |
|
|
|
|
$pourcentageScore = 0; |
|
|
|
|
$score_percentage = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo " </td> |
|
|
|
|
<td align='center'> |
|
|
|
|
"; |
|
|
|
|
echo $a_essais['essais']; |
|
|
|
|
echo $essais['essais']; |
|
|
|
|
echo " </td> |
|
|
|
|
<td align='center'> |
|
|
|
|
"; |
|
|
|
|
|
|
|
|
|
$sql_last_attempt = 'SELECT exe_id FROM ' . $tbl_stats_exercices . ' WHERE exe_exo_id="' . $a_exercices['id'] . '" AND exe_user_id="' . Security :: remove_XSS($_GET['student']) . '" AND exe_cours_id="' . $a_infosCours['code'] . '" AND orig_lp_id = 0 AND orig_lp_item_id = 0 ORDER BY exe_date DESC LIMIT 1'; |
|
|
|
|
$resultLastAttempt = Database::query($sql_last_attempt, __FILE__, __LINE__); |
|
|
|
|
if (Database :: num_rows($resultLastAttempt) > 0) { |
|
|
|
|
$id_last_attempt = Database :: result($resultLastAttempt, 0, 0); |
|
|
|
|
$sql_last_attempt = 'SELECT exe_id FROM ' . $tbl_stats_exercices . ' WHERE exe_exo_id="' . $exercices['id'] . '" AND exe_user_id="' . Security :: remove_XSS($_GET['student']) . '" AND exe_cours_id="' . $info_course['code'] . '" AND orig_lp_id = 0 AND orig_lp_item_id = 0 ORDER BY exe_date DESC LIMIT 1'; |
|
|
|
|
$result_last_attempt = Database::query($sql_last_attempt, __FILE__, __LINE__); |
|
|
|
|
if (Database :: num_rows($result_last_attempt) > 0) { |
|
|
|
|
$id_last_attempt = Database :: result($result_last_attempt, 0, 0); |
|
|
|
|
|
|
|
|
|
if ($a_essais['essais'] > 0) |
|
|
|
|
echo '<a href="../exercice/exercise_show.php?id=' . $id_last_attempt . '&cidReq=' . $a_infosCours['code'] . '&student=' . Security :: remove_XSS($_GET['student']) . '&origin=' . (empty ($_GET['origin']) ? 'tracking' : Security :: remove_XSS($_GET['origin'])) . '"> <img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" border="0" /> </a>'; |
|
|
|
|
if ($essais['essais'] > 0) |
|
|
|
|
echo '<a href="../exercice/exercise_show.php?id=' . $id_last_attempt . '&cidReq=' . $info_course['code'] . '&student=' . Security :: remove_XSS($_GET['student']) . '&origin=' . (empty ($_GET['origin']) ? 'tracking' : Security :: remove_XSS($_GET['origin'])) . '"> <img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" border="0" /> </a>'; |
|
|
|
|
} |
|
|
|
|
echo " </td> |
|
|
|
|
</tr> |
|
|
|
|
"; |
|
|
|
|
$dataExercices[$i][] = $a_exercices['title']; |
|
|
|
|
$dataExercices[$i][] = $pourcentageScore . '%'; |
|
|
|
|
$dataExercices[$i][] = $a_essais['essais']; |
|
|
|
|
//$dataExercices[$i][] = corrections; |
|
|
|
|
$data_exercices[$i][] = $exercices['title']; |
|
|
|
|
$data_exercices[$i][] = $score_percentage . '%'; |
|
|
|
|
$data_exercices[$i][] = $essais['essais']; |
|
|
|
|
//$data_exercices[$i][] = corrections; |
|
|
|
|
$i++; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
@ -945,11 +945,11 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
$csv_content[] = array (); |
|
|
|
|
|
|
|
|
|
$nb_assignments = Tracking :: count_student_assignments($a_infosUser['user_id'], $a_infosCours['code']); |
|
|
|
|
$messages = Tracking :: count_student_messages($a_infosUser['user_id'], $a_infosCours['code']); |
|
|
|
|
$links = Tracking :: count_student_visited_links($a_infosUser['user_id'], $a_infosCours['code']); |
|
|
|
|
$documents = Tracking :: count_student_downloaded_documents($a_infosUser['user_id'], $a_infosCours['code']); |
|
|
|
|
$chat_last_connection = Tracking :: chat_last_connection($a_infosUser['user_id'], $a_infosCours['code']); |
|
|
|
|
$nb_assignments = Tracking :: count_student_assignments($info_user['user_id'], $info_course['code']); |
|
|
|
|
$messages = Tracking :: count_student_messages($info_user['user_id'], $info_course['code']); |
|
|
|
|
$links = Tracking :: count_student_visited_links($info_user['user_id'], $info_course['code']); |
|
|
|
|
$documents = Tracking :: count_student_downloaded_documents($info_user['user_id'], $info_course['code']); |
|
|
|
|
$chat_last_connection = Tracking :: chat_last_connection($info_user['user_id'], $info_course['code']); |
|
|
|
|
|
|
|
|
|
$csv_content[] = array ( |
|
|
|
|
get_lang('Student_publication'), |
|
|
|
|
@ -1047,12 +1047,12 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
if (!api_is_platform_admin(true) && $_user['status'] != DRH) { |
|
|
|
|
// courses followed by user where we are coach |
|
|
|
|
if (!isset ($_GET['id_coach'])) { |
|
|
|
|
$a_courses = Tracking :: get_courses_followed_by_coach($_user['user_id']); |
|
|
|
|
$courses = Tracking :: get_courses_followed_by_coach($_user['user_id']); |
|
|
|
|
} else { |
|
|
|
|
$a_courses = Tracking :: get_courses_followed_by_coach(Security :: remove_XSS($_GET['id_coach'])); |
|
|
|
|
$courses = Tracking :: get_courses_followed_by_coach(Security :: remove_XSS($_GET['id_coach'])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (count($a_courses) > 0) { |
|
|
|
|
if (count($courses) > 0) { |
|
|
|
|
$csv_content[] = array (); |
|
|
|
|
$csv_content[] = array ( |
|
|
|
|
get_lang('Course', ''), |
|
|
|
|
@ -1060,16 +1060,16 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
get_lang('Progress', ''), |
|
|
|
|
get_lang('Score', '') |
|
|
|
|
); |
|
|
|
|
foreach ($a_courses as $course_code) { |
|
|
|
|
foreach ($courses as $course_code) { |
|
|
|
|
if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) { |
|
|
|
|
$course_infos = CourseManager :: get_course_information($course_code); |
|
|
|
|
$time_spent_on_course = api_time_to_hms(Tracking :: get_time_spent_on_the_course($a_infosUser['user_id'], $course_code)); |
|
|
|
|
$progress = Tracking :: get_avg_student_progress($a_infosUser['user_id'], $course_code); |
|
|
|
|
$score = Tracking :: get_avg_student_score($a_infosUser['user_id'], $course_code); |
|
|
|
|
$course_info = CourseManager :: get_course_information($course_code); |
|
|
|
|
$time_spent_on_course = api_time_to_hms(Tracking :: get_time_spent_on_the_course($info_user['user_id'], $course_code)); |
|
|
|
|
$progress = Tracking :: get_avg_student_progress($info_user['user_id'], $course_code); |
|
|
|
|
$score = Tracking :: get_avg_student_score($info_user['user_id'], $course_code); |
|
|
|
|
$progress = empty($progress) ? '0%' : $progress.'%'; |
|
|
|
|
$score = empty($score) ? '0%' : $score.'%'; |
|
|
|
|
$csv_content[] = array ( |
|
|
|
|
$course_infos['title'], |
|
|
|
|
$course_info['title'], |
|
|
|
|
$time_spent_on_course, |
|
|
|
|
$progress, |
|
|
|
|
$score |
|
|
|
|
@ -1077,7 +1077,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
echo ' |
|
|
|
|
<tr> |
|
|
|
|
<td align="right"> |
|
|
|
|
' . $course_infos['title'] . ' |
|
|
|
|
' . $course_info['title'] . ' |
|
|
|
|
</td> |
|
|
|
|
<td align="right"> |
|
|
|
|
' . $time_spent_on_course . ' |
|
|
|
|
@ -1090,11 +1090,11 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
</td>'; |
|
|
|
|
if (isset ($_GET['id_coach']) && intval($_GET['id_coach']) != 0) { |
|
|
|
|
echo '<td align="center" width="10"> |
|
|
|
|
<a href="' . api_get_self() . '?student=' . $a_infosUser['user_id'] . '&details=true&course=' . $course_infos['code'] . '&id_coach=' . Security :: remove_XSS($_GET['id_coach']) . '&origin=' . Security :: remove_XSS($_GET['origin']) . '&id_session=' . Security :: remove_XSS($_GET['id_session']) . '#infosStudent"><img src="' . api_get_path(WEB_IMG_PATH) . '2rightarrow.gif" border="0" /></a> |
|
|
|
|
<a href="' . api_get_self() . '?student=' . $info_user['user_id'] . '&details=true&course=' . $course_info['code'] . '&id_coach=' . Security :: remove_XSS($_GET['id_coach']) . '&origin=' . Security :: remove_XSS($_GET['origin']) . '&id_session=' . Security :: remove_XSS($_GET['id_session']) . '#infosStudent"><img src="' . api_get_path(WEB_IMG_PATH) . '2rightarrow.gif" border="0" /></a> |
|
|
|
|
</td>'; |
|
|
|
|
} else { |
|
|
|
|
echo '<td align="center" width="10"> |
|
|
|
|
<a href="' . api_get_self() . '?student=' . $a_infosUser['user_id'] . '&details=true&course=' . $course_infos['code'] . '&origin=' . Security :: remove_XSS($_GET['origin']) . '&id_session=' . Security :: remove_XSS($_GET['id_session']) . '#infosStudent"><img src="' . api_get_path(WEB_IMG_PATH) . '2rightarrow.gif" border="0" /></a> |
|
|
|
|
<a href="' . api_get_self() . '?student=' . $info_user['user_id'] . '&details=true&course=' . $course_info['code'] . '&origin=' . Security :: remove_XSS($_GET['origin']) . '&id_session=' . Security :: remove_XSS($_GET['id_session']) . '#infosStudent"><img src="' . api_get_path(WEB_IMG_PATH) . '2rightarrow.gif" border="0" /></a> |
|
|
|
|
</td>'; |
|
|
|
|
} |
|
|
|
|
echo '</tr>'; |
|
|
|
|
@ -1123,38 +1123,38 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (!empty ($_GET['exe_id'])) { |
|
|
|
|
$t_q = Database :: get_course_table(TABLE_QUIZ_TEST, $a_infosCours['db_name']); |
|
|
|
|
$t_qq = Database :: get_course_table(TABLE_QUIZ_QUESTION, $a_infosCours['db_name']); |
|
|
|
|
$t_qa = Database :: get_course_table(TABLE_QUIZ_ANSWER, $a_infosCours['db_name']); |
|
|
|
|
$t_qtq = Database :: get_course_table(TABLE_QUIZ_TEST_QUESTION, $a_infosCours['db_name']); |
|
|
|
|
$sqlExerciceDetails = " SELECT qq.question, qq.ponderation, qq.id |
|
|
|
|
$t_q = Database :: get_course_table(TABLE_QUIZ_TEST, $info_course['db_name']); |
|
|
|
|
$t_qq = Database :: get_course_table(TABLE_QUIZ_QUESTION, $info_course['db_name']); |
|
|
|
|
$t_qa = Database :: get_course_table(TABLE_QUIZ_ANSWER, $info_course['db_name']); |
|
|
|
|
$t_qtq = Database :: get_course_table(TABLE_QUIZ_TEST_QUESTION, $info_course['db_name']); |
|
|
|
|
$sql_exercice_details = "SELECT qq.question, qq.ponderation, qq.id |
|
|
|
|
FROM " . $t_qq . " as qq |
|
|
|
|
INNER JOIN " . $t_qtq . " as qrq |
|
|
|
|
ON qrq.question_id = qq.id |
|
|
|
|
AND qrq.exercice_id = " . intval($_GET['exe_id']); |
|
|
|
|
|
|
|
|
|
$resultExerciceDetails = Database::query($sqlExerciceDetails, __FILE__, __LINE__); |
|
|
|
|
$result_exercice_details = Database::query($sql_exercice_details, __FILE__, __LINE__); |
|
|
|
|
|
|
|
|
|
$sqlExName = " SELECT quiz.title |
|
|
|
|
$sql_ex_name = "SELECT quiz.title |
|
|
|
|
FROM " . $t_q . " AS quiz |
|
|
|
|
WHERE quiz.id = " . intval($_GET['exe_id']); |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
$resultExName = Database::query($sqlExName, __FILE__, __LINE__); |
|
|
|
|
$a_exName = Database :: fetch_array($resultExName); |
|
|
|
|
$resultExName = Database::query($sql_ex_name, __FILE__, __LINE__); |
|
|
|
|
$exName = Database :: fetch_array($resultExName); |
|
|
|
|
|
|
|
|
|
echo "<table class='data_table'> |
|
|
|
|
<tr> |
|
|
|
|
<th colspan='2'> |
|
|
|
|
" . $a_exName['title'] . " |
|
|
|
|
" . $exName['title'] . " |
|
|
|
|
</th> |
|
|
|
|
</tr> |
|
|
|
|
"; |
|
|
|
|
|
|
|
|
|
while ($a_exerciceDetails = Database :: fetch_array($resultExerciceDetails)) { |
|
|
|
|
while ($exerciceDetails = Database :: fetch_array($result_exercice_details)) { |
|
|
|
|
$sqlAnswer = " SELECT qa.comment, qa.answer |
|
|
|
|
FROM " . $t_qa . " as qa |
|
|
|
|
WHERE qa.question_id = " . $a_exerciceDetails['id']; |
|
|
|
|
WHERE qa.question_id = " . $exerciceDetails['id']; |
|
|
|
|
|
|
|
|
|
$resultAnswer = Database::query($sqlAnswer, __FILE__, __LINE__); |
|
|
|
|
|
|
|
|
|
@ -1163,20 +1163,20 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
echo " |
|
|
|
|
<tr> |
|
|
|
|
<td colspan='2'> |
|
|
|
|
<strong>" . $a_exerciceDetails['question'] . ' /' . $a_exerciceDetails['ponderation'] . "</strong> |
|
|
|
|
<strong>" . $exerciceDetails['question'] . ' /' . $exerciceDetails['ponderation'] . "</strong> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
"; |
|
|
|
|
while ($a_answer = Database :: fetch_array($resultAnswer)) { |
|
|
|
|
while ($answer = Database :: fetch_array($resultAnswer)) { |
|
|
|
|
echo " |
|
|
|
|
<tr> |
|
|
|
|
<td> |
|
|
|
|
" . $a_answer['answer'] . " |
|
|
|
|
" . $answer['answer'] . " |
|
|
|
|
</td> |
|
|
|
|
<td> |
|
|
|
|
"; |
|
|
|
|
if (!empty ($a_answer['comment'])) |
|
|
|
|
echo $a_answer['comment']; |
|
|
|
|
if (!empty ($answer['comment'])) |
|
|
|
|
echo $answer['comment']; |
|
|
|
|
else |
|
|
|
|
echo get_lang('NoComment'); |
|
|
|
|
echo " |
|
|
|
|
@ -1188,7 +1188,7 @@ if (!empty ($_GET['student'])) { |
|
|
|
|
echo "</table>"; |
|
|
|
|
} |
|
|
|
|
//YW - commented out because it doesn't seem to be used |
|
|
|
|
//$a_header = array_merge($a_headerLearnpath,$a_headerExercices,$a_headerProductions); |
|
|
|
|
//$header = array_merge($headerLearnpath,$headerExercices,$headerProductions); |
|
|
|
|
} |
|
|
|
|
if ($export_csv) { |
|
|
|
|
ob_end_clean(); |
|
|
|
|
|