Code Duplication    Length = 9-10 lines in 2 locations

main/inc/lib/tracking.lib.php 2 locations

@@ 6908-6916 (lines=9) @@
6905
    		$title_line= get_lang('LoginsTitleMonthColumn').';'.get_lang('LoginsTitleCountColumn')."\n";
6906
    		$line='';
6907
    		$total = 0;
6908
    		if (is_array($results)) {
6909
    			for($j = 0 ; $j < count($results) ; $j++) {
6910
    				$line .= $results[$j][0].';'.$results[$j][1]."\n";
6911
    				$total = $total + $results[$j][1];
6912
    			}
6913
    			$line .= get_lang('Total').";".$total."\n";
6914
    		} else {
6915
    			$line= get_lang('NoResult')."</center></td>";
6916
    		}
6917
    	} else {
6918
    		$new_view = substr_replace($view,'1',0,1);
6919
    	}
@@ 6960-6969 (lines=10) @@
6957
    		$results = StatsUtils::getManyResultsXCol($sql, 4);
6958
    		$title_line = get_lang('ExercicesTitleExerciceColumn').";".get_lang('Date').';'.get_lang('ExercicesTitleScoreColumn')."\n";
6959
6960
    		if (is_array($results)) {
6961
    			for($i = 0; $i < sizeof($results); $i++)
6962
    			{
6963
    				$display_date = api_convert_and_format_date($results[$i][3], null, date_default_timezone_get());
6964
    				$line .= $results[$i][0].";".$display_date.";".$results[$i][1]." / ".$results[$i][2]."\n";
6965
    			}
6966
    		} else {
6967
                // istvan begin
6968
    			$NoTestRes = 1;
6969
    		}
6970
6971
    		// The Result of Tests
6972
    		if (is_array($hpresults)) {