Code Duplication    Length = 9-10 lines in 2 locations

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

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