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('Actions') . ''; } + + $timeHeader = ''.get_lang('ScormTime').''; + if ($hideTime) { + $timeHeader = ''; + } $output .= '
'; $output .= ' @@ -205,9 +212,7 @@ class Tracking - + '.$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 = ''; + if ($hideTime) { + $timeRow = ''; + } $output .= ' - + '.$timeRow.' '.$action.' '; $attemptCount++; if (!empty($export_csv)) { $temp = array(); $temp[] = $title = Security::remove_XSS($title); - $temp[] = Security::remove_XSS(learnpathItem::humanize_status($lesson_status, false, $type)); + $temp[] = Security::remove_XSS( + learnpathItem::humanize_status($lesson_status, false, $type) + ); if ($row['item_type'] == 'quiz') { if (!$is_allowed_to_edit && $result_disabled_ext_all) { @@ -490,7 +503,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; } } @@ -520,6 +536,11 @@ class Tracking $student_response = implode(',', $content_student_response); } + $timeRow = ''; + if ($hideTime) { + $timeRow = ''; + } + $output .= ' @@ -530,7 +551,7 @@ class Tracking - + '.$timeRow.' '.$action.' '; $counter++; @@ -829,12 +850,17 @@ class Tracking $scoreItem .= $score == 0 ? '/' : ($maxscore == 0 ? $score : $score . '/' . $maxscore); } + $timeRow = ''; + if ($hideTime) { + $timeRow = ''; + } + $output .= ' - + '.$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 = ''; + if ($hideTime) { + $timeRow = ''; + } + $output .= ' @@ -884,7 +919,7 @@ class Tracking - + '.$timeRow.' '.$action.' '; $counter++; @@ -979,6 +1014,10 @@ class Tracking } elseif ($my_lesson_status == 'incomplete') { $my_lesson_status = learnpathitem::humanize_status('incomplete'); } + $timeRow = ''; + if ($hideTime) { + $timeRow = ''; + } $output .= ' @@ -986,7 +1025,8 @@ class Tracking - '; + '.$timeRow; + if ($action == 'classic') { if ($origin != 'tracking') { if (!$is_allowed_to_edit && $result_disabled_ext_all) { @@ -1090,6 +1130,11 @@ class Tracking $action = ''; } + $timeTotal = ' - '; @@ -1118,9 +1163,13 @@ class Tracking $temp = array( get_lang('AccomplishedStepsTotal'), '', - $final_score, - $total_time + $final_score ); + + if ($hideTime === false) { + $temp[] = $total_time; + } + $csv_content[] = $temp; ob_end_clean(); Export::arrayToCsv($csv_content, 'reporting_learning_path_details'); diff --git a/main/install/configuration.dist.php b/main/install/configuration.dist.php index 03033f4a9c..3148ab0f47 100755 --- a/main/install/configuration.dist.php +++ b/main/install/configuration.dist.php @@ -306,3 +306,5 @@ $_configuration['system_stable'] = NEW_VERSION_STABLE; // $_configuration['hide_course_notification'] = true; // Show less session information in course list //$_configuration['show_simple_session_info'] = true; +// Hide LP time in reports. +// $_configuration['hide_lp_time'] = false;
' . get_lang('ScormScore') . ' - ' . get_lang('ScormTime') . ' -
'.$time.'
' . $extend_attempt_link . ' ' . get_lang('Attempt') . ' ' . $attemptCount . ' ' . learnpathItem::humanize_status($lesson_status, true, $type) . ' ' . $view_score . '' . $time . '
'.$interaction['time'].'
'.$student_response . ' '.$interaction['result'] . ' '.$interaction['latency'] . ''.$interaction['time'] . '
'.$time.''.$extend_link.' ' . $title . ' ' . learnpathitem::humanize_status($lesson_status) .' '.$scoreItem.''.$time.'
'.$interaction['time'].'
'.urldecode($interaction['student_response']).' '.$interaction['result'].' '.$interaction['latency'].''.$interaction['time'].'
'.$time_attemp . '
' . get_lang('Attempt').' '. $n.' ' . $my_lesson_status . ' '.$view_score . ''.$time_attemp . ''.$total_time.''; + if ($hideTime) { + $timeTotal = ''; + } + $output .= '
@@ -1097,7 +1142,7 @@ class Tracking '.$progress.'% ' . $final_score.'' . $total_time . ' + '.$timeTotal.' '.$action.'