Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 7069-7077 (lines=9) @@
7066
    		$title_line= get_lang('LoginsTitleMonthColumn').';'.get_lang('LoginsTitleCountColumn')."\n";
7067
    		$line='';
7068
    		$total = 0;
7069
    		if (is_array($results)) {
7070
    			for($j = 0 ; $j < count($results) ; $j++) {
7071
    				$line .= $results[$j][0].';'.$results[$j][1]."\n";
7072
    				$total = $total + $results[$j][1];
7073
    			}
7074
    			$line .= get_lang('Total').";".$total."\n";
7075
    		} else {
7076
    			$line= get_lang('NoResult')."</center></td>";
7077
    		}
7078
    	} else {
7079
    		$new_view = substr_replace($view,'1',0,1);
7080
    	}
@@ 7121-7130 (lines=10) @@
7118
    		$results = StatsUtils::getManyResultsXCol($sql, 4);
7119
    		$title_line = get_lang('ExercicesTitleExerciceColumn').";".get_lang('Date').';'.get_lang('ExercicesTitleScoreColumn')."\n";
7120
7121
    		if (is_array($results)) {
7122
    			for($i = 0; $i < sizeof($results); $i++)
7123
    			{
7124
    				$display_date = api_convert_and_format_date($results[$i][3], null, date_default_timezone_get());
7125
    				$line .= $results[$i][0].";".$display_date.";".$results[$i][1]." / ".$results[$i][2]."\n";
7126
    			}
7127
    		} else {
7128
                // istvan begin
7129
    			$NoTestRes = 1;
7130
    		}
7131
7132
    		// The Result of Tests
7133
    		if (is_array($hpresults)) {