Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 7039-7047 (lines=9) @@
7036
    		$title_line= get_lang('LoginsTitleMonthColumn').';'.get_lang('LoginsTitleCountColumn')."\n";
7037
    		$line='';
7038
    		$total = 0;
7039
    		if (is_array($results)) {
7040
    			for($j = 0 ; $j < count($results) ; $j++) {
7041
    				$line .= $results[$j][0].';'.$results[$j][1]."\n";
7042
    				$total = $total + $results[$j][1];
7043
    			}
7044
    			$line .= get_lang('Total').";".$total."\n";
7045
    		} else {
7046
    			$line= get_lang('NoResult')."</center></td>";
7047
    		}
7048
    	} else {
7049
    		$new_view = substr_replace($view,'1',0,1);
7050
    	}
@@ 7091-7100 (lines=10) @@
7088
    		$results = StatsUtils::getManyResultsXCol($sql, 4);
7089
    		$title_line = get_lang('ExercicesTitleExerciceColumn').";".get_lang('Date').';'.get_lang('ExercicesTitleScoreColumn')."\n";
7090
7091
    		if (is_array($results)) {
7092
    			for($i = 0; $i < sizeof($results); $i++)
7093
    			{
7094
    				$display_date = api_convert_and_format_date($results[$i][3], null, date_default_timezone_get());
7095
    				$line .= $results[$i][0].";".$display_date.";".$results[$i][1]." / ".$results[$i][2]."\n";
7096
    			}
7097
    		} else {
7098
                // istvan begin
7099
    			$NoTestRes = 1;
7100
    		}
7101
7102
    		// The Result of Tests
7103
    		if (is_array($hpresults)) {