diff --git a/main/inc/lib/tracking.lib.php b/main/inc/lib/tracking.lib.php index 353dc60eca..736a1f598f 100755 --- a/main/inc/lib/tracking.lib.php +++ b/main/inc/lib/tracking.lib.php @@ -147,6 +147,8 @@ class Tracking return null; } + $hideTime = api_get_configuration_value('hide_lp_time'); + $lp_id = intval($lp_id); $lp_item_id = intval($lp_item_id); $user_id = intval($user_id); @@ -191,6 +193,11 @@ class Tracking if ($type == 'classic') { $actionColumn = '
' . get_lang('ScormScore') . ' | -- ' . get_lang('ScormTime') . ' - | + '.$timeHeader.' '.$actionColumn.' @@ -247,9 +252,12 @@ class Tracking $csv_content[] = array( get_lang('ScormLessonTitle'), get_lang('ScormStatus'), - get_lang('ScormScore'), - get_lang('ScormTime') + get_lang('ScormScore') ); + + if ($hideTime === false) { + $csv_content[] = get_lang('ScormTime'); + } } $result_disabled_ext_all = true; @@ -465,21 +473,26 @@ class Tracking if ($type == 'classic') { $action = ''; } - + $timeRow = ' | '.$time.' | '; + if ($hideTime) { + $timeRow = ''; + } $output .= '|||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
' . $extend_attempt_link . ' | ' . get_lang('Attempt') . ' ' . $attemptCount . ' | ' . learnpathItem::humanize_status($lesson_status, true, $type) . ' | ' . $view_score . ' | -' . $time . ' | + '.$timeRow.' '.$action.''.$interaction['time'].' | '; + if ($hideTime) { + $timeRow = ''; + } + $output .= '|||||||
@@ -530,7 +551,7 @@ class Tracking | '.$student_response . ' | '.$interaction['result'] . ' | '.$interaction['latency'] . ' | -'.$interaction['time'] . ' | + '.$timeRow.' '.$action.''.$time.' | '; + if ($hideTime) { + $timeRow = ''; + } + $output .= ''.$extend_link.' | ' . $title . ' | ' . learnpathitem::humanize_status($lesson_status) .' | '.$scoreItem.' | -'.$time.' | + '.$timeRow.' '.$action.' '; $output .= ''; @@ -854,7 +880,10 @@ class Tracking } else { $temp[] = ($score == 0 ? '/' : ($maxscore == 0 ? $score : $score . '/' . float_format($maxscore, 1))); } - $temp[] = $time; + + if ($hideTime === false) { + $temp[] = $time; + } $csv_content[] = $temp; } } @@ -874,6 +903,12 @@ class Tracking } else { $oddclass = 'row_even'; } + + $timeRow = ''.$interaction['time'].' | '; + if ($hideTime) { + $timeRow = ''; + } + $output .= '|
@@ -884,7 +919,7 @@ class Tracking | '.urldecode($interaction['student_response']).' | '.$interaction['result'].' | '.$interaction['latency'].' | -'.$interaction['time'].' | + '.$timeRow.' '.$action.''.$time_attemp . ' | '; + if ($hideTime) { + $timeRow = ''; + } $output .= '|||||||
@@ -986,7 +1025,8 @@ class Tracking | ' . get_lang('Attempt').' '. $n.' | ' . $my_lesson_status . ' | '.$view_score . ' | -'.$time_attemp . ' | '; + '.$timeRow; + if ($action == 'classic') { if ($origin != 'tracking') { if (!$is_allowed_to_edit && $result_disabled_ext_all) { @@ -1090,6 +1130,11 @@ class Tracking $action = ''; } + $timeTotal = ' | '.$total_time.''; + if ($hideTime) { + $timeTotal = ''; + } + $output .= ' | ||||||
@@ -1097,7 +1142,7 @@ class Tracking | '.$progress.'% | ' . $final_score.' | -' . $total_time . ' + '.$timeTotal.' '.$action.' |