|
|
|
|
@ -5237,7 +5237,6 @@ class Tracking |
|
|
|
|
if (!empty($session_id)) { |
|
|
|
|
$sessionCondition = " AND s.id = $session_id"; |
|
|
|
|
} |
|
|
|
|
$lpShowMaxProgress = api_get_configuration_value('lp_show_max_progress_instead_of_average'); |
|
|
|
|
|
|
|
|
|
// Get the list of sessions where the user is subscribed as student |
|
|
|
|
if (api_is_multiple_url_enabled()) { |
|
|
|
|
@ -5345,6 +5344,13 @@ class Tracking |
|
|
|
|
foreach ($courses as $course_code => $course_title) { |
|
|
|
|
$courseInfo = api_get_course_info($course_code); |
|
|
|
|
$courseId = $courseInfo['real_id']; |
|
|
|
|
$lpShowMaxProgress = api_get_configuration_value('lp_show_max_progress_instead_of_average'); |
|
|
|
|
if (api_get_configuration_value('lp_show_max_progress_or_average_enable_course_level_redefinition')) { |
|
|
|
|
$lpShowProgressCourseSetting = api_get_course_setting('lp_show_max_or_average_progress', $courseInfo, true); |
|
|
|
|
if (in_array($lpShowProgressCourseSetting, ['max', 'average'])) { |
|
|
|
|
$lpShowMaxProgress = ('max' === $lpShowProgressCourseSetting); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$total_time_login = self::get_time_spent_on_the_course( |
|
|
|
|
$user_id, |
|
|
|
|
@ -8977,6 +8983,14 @@ class TrackingCourseLog |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$lpShowMaxProgress = api_get_configuration_value('lp_show_max_progress_instead_of_average'); |
|
|
|
|
if (api_get_configuration_value('lp_show_max_progress_or_average_enable_course_level_redefinition')) { |
|
|
|
|
$lpShowProgressCourseSetting = api_get_course_setting('lp_show_max_or_average_progress', $courseInfo, true); |
|
|
|
|
if (in_array($lpShowProgressCourseSetting, ['max', 'average'])) { |
|
|
|
|
$lpShowMaxProgress = ('max' === $lpShowProgressCourseSetting); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
while ($user = Database::fetch_array($res, 'ASSOC')) { |
|
|
|
|
$userIdList[] = $user['user_id']; |
|
|
|
|
$user['official_code'] = $user['col0']; |
|
|
|
|
@ -9006,7 +9020,6 @@ class TrackingCourseLog |
|
|
|
|
true |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$lpShowMaxProgress = api_get_configuration_value('lp_show_max_progress_instead_of_average'); |
|
|
|
|
$avg_student_progress = Tracking::get_avg_student_progress( |
|
|
|
|
$user['user_id'], |
|
|
|
|
$course_code, |
|
|
|
|
|