|
|
|
@ -1121,9 +1121,11 @@ class Tracking |
|
|
|
|
STUDENT |
|
|
|
|
); |
|
|
|
|
$students = array(); |
|
|
|
|
if (is_array($studentList)) { |
|
|
|
|
foreach ($studentList as $studentData) { |
|
|
|
|
$students[] = $studentData['user_id']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$studentBossesList = SessionManager::getAllUsersFromCoursesFromAllSessionFromStatus( |
|
|
|
|
'drh_all', |
|
|
|
@ -1141,9 +1143,11 @@ class Tracking |
|
|
|
|
STUDENT_BOSS |
|
|
|
|
); |
|
|
|
|
$studentBosses = array(); |
|
|
|
|
if (is_array($studentBossesList)) { |
|
|
|
|
foreach ($studentBossesList as $studentBossData) { |
|
|
|
|
$studentBosses[] = $studentBossData['user_id']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$teacherList = SessionManager::getAllUsersFromCoursesFromAllSessionFromStatus( |
|
|
|
|
'drh_all', |
|
|
|
@ -1182,9 +1186,11 @@ class Tracking |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$humanResourcesList = array(); |
|
|
|
|
if (is_array($humanResources)) { |
|
|
|
|
foreach ($humanResources as $item) { |
|
|
|
|
$humanResourcesList[] = $item['user_id']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$platformCourses = SessionManager::getAllCoursesFollowedByUser( |
|
|
|
|
$userId, |
|
|
|
@ -1772,7 +1778,11 @@ class Tracking |
|
|
|
|
|
|
|
|
|
$sql = "SELECT count(id) FROM $tbl_course_quiz |
|
|
|
|
WHERE c_id = {$course_info['real_id']} $condition_active $condition_quiz "; |
|
|
|
|
$count_quiz = Database::fetch_row(Database::query($sql)); |
|
|
|
|
$count_quiz = 0; |
|
|
|
|
$countQuizResult = Database::query($sql); |
|
|
|
|
if (!empty($countQuizResult)) { |
|
|
|
|
$count_quiz = Database::fetch_row($countQuizResult); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!empty($count_quiz[0]) && !empty($student_id)) { |
|
|
|
|
if (is_array($student_id)) { |
|
|
|
@ -1789,7 +1799,7 @@ class Tracking |
|
|
|
|
$result = Database::query($sql); |
|
|
|
|
$exercise_list = array(); |
|
|
|
|
$exercise_id = null; |
|
|
|
|
if (Database::num_rows($result)) { |
|
|
|
|
if (!empty($result) && Database::num_rows($result)) { |
|
|
|
|
while ($row = Database::fetch_array($result)) { |
|
|
|
|
$exercise_list[] = $row['id']; |
|
|
|
|
} |
|
|
|
@ -4686,7 +4696,10 @@ class Tracking |
|
|
|
|
} |
|
|
|
|
//Score |
|
|
|
|
$html .= Display::tag('td', $percentage_score, array('align'=>'center')); |
|
|
|
|
$html .= Display::tag('td', $last_connection, array('align'=>'center')); |
|
|
|
|
if (empty($last_connection) or is_bool($last_connection)) { |
|
|
|
|
$last_connection = ''; |
|
|
|
|
} |
|
|
|
|
$html .= Display::tag('td', $last_connection, array('align' => 'center')); |
|
|
|
|
|
|
|
|
|
if ($course_code == $courseCodeFromGet && $_GET['session_id'] == $session_id_from_get) { |
|
|
|
|
$details = '<a href="#">'; |
|
|
|
@ -4852,6 +4865,9 @@ class Tracking |
|
|
|
|
$my_score = $score/$weighting; |
|
|
|
|
} |
|
|
|
|
//@todo this function slows the page |
|
|
|
|
if (is_int($user_list)) { |
|
|
|
|
$user_list = array($user_list); |
|
|
|
|
} |
|
|
|
|
$position = ExerciseLib::get_exercise_result_ranking($my_score, $exe_id, $exercices['id'], $course_info['code'], $session_id, $user_list); |
|
|
|
|
|
|
|
|
|
$graph = self::generate_exercise_result_thumbnail_graph($to_graph_exercise_result[$exercices['id']]); |
|
|
|
@ -5527,7 +5543,8 @@ class Tracking |
|
|
|
|
* @param int $sessionId The session ID (session.id) |
|
|
|
|
* @param int $courseId The course ID (course.id) |
|
|
|
|
* @param int $exerciseId The quiz ID (c_quiz.id) |
|
|
|
|
* @param int $answer The answer status (0 = incorrect, 1 = correct, 2 = both) |
|
|
|
|
* @param string $date_from |
|
|
|
|
* @param string $date_to |
|
|
|
|
* @param array $options An array of options you can pass to the query (limit, where and order) |
|
|
|
|
* @return array An array with the data of exercise(s) progress |
|
|
|
|
*/ |
|
|
|
|