|  | @@ -49,11 +49,6 @@ function deleteFolderAndFiles($dir) {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function pegarLogsDoAluno ($curso, $aluno, $exercicio) {
 | 
	
		
			
				|  |  | -<<<<<<< HEAD
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -=======
 | 
	
		
			
				|  |  | -	echo $curso . ' ' . $aluno  . ' ' . $exercicio . ' ';
 | 
	
		
			
				|  |  | ->>>>>>> master
 | 
	
		
			
				|  |  |  	$zip = new ZipArchive;
 | 
	
		
			
				|  |  |  	$dir    = 'cursos/' . $curso;
 | 
	
		
			
				|  |  |    	$files1 = scandir($dir);
 | 
	
	
		
			
				|  | @@ -110,7 +105,6 @@ function pegarLogsDoAluno ($curso, $aluno, $exercicio) {
 | 
	
		
			
				|  |  |    	return $arquivo;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -<<<<<<< HEAD
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function pegarArquivoMaisRecente ($curso, $aluno, $exercicio) {
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -143,45 +137,6 @@ function pegarArquivoMaisRecente ($curso, $aluno, $exercicio) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	return $registro_mais_atual[1];
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  | -=======
 | 
	
		
			
				|  |  | -function pegarLogsDoAlunoComoString ($arquivo) {
 | 
	
		
			
				|  |  | -	$handle = fopen("temp/" . $arquivo, "r");
 | 
	
		
			
				|  |  | -	$inicio = false;
 | 
	
		
			
				|  |  | -	$string_final = "";
 | 
	
		
			
				|  |  | -	if ($handle) {
 | 
	
		
			
				|  |  | -	    while (($line = fgets($handle)) !== false) {
 | 
	
		
			
				|  |  | -			// Linhas comentadas, pq o formato dos logs foi alterado!
 | 
	
		
			
				|  |  | -			// if (strpos($line, "::logs::") !== false) {
 | 
	
		
			
				|  |  | -  			// 	$inicio = true;
 | 
	
		
			
				|  |  | -  			// 	continue;
 | 
	
		
			
				|  |  | -  			// }
 | 
	
		
			
				|  |  | -  			// if ($inicio) {
 | 
	
		
			
				|  |  | -  			// 	$ex = explode(",", $line);
 | 
	
		
			
				|  |  | -  			// 	if (count($ex) > 3) {
 | 
	
		
			
				|  |  | -  			// 		$string_final .= $ex[1] . "," . $ex[2] . ",1,0\\n";
 | 
	
		
			
				|  |  | -  			// 	}
 | 
	
		
			
				|  |  | -			  // }
 | 
	
		
			
				|  |  | -			if (strpos($line, "::logs::") !== false) {
 | 
	
		
			
				|  |  | -				$string_final = explode("::logs::", $line)[1];
 | 
	
		
			
				|  |  | -				break;
 | 
	
		
			
				|  |  | -			}
 | 
	
		
			
				|  |  | -	    }
 | 
	
		
			
				|  |  | -	    fclose($handle);
 | 
	
		
			
				|  |  | -	} else {
 | 
	
		
			
				|  |  | -	    echo "ERRO AO LER O ARQUIVO";
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	$logs_array = explode("[", $string_final);
 | 
	
		
			
				|  |  | -	$string_final = "";
 | 
	
		
			
				|  |  | -	foreach ($logs_array as $item) {
 | 
	
		
			
				|  |  | -		$mins = explode(",", $item);
 | 
	
		
			
				|  |  | -		if ($mins[0] && is_numeric($mins[0])) {
 | 
	
		
			
				|  |  | -			$string_final .= $mins[0] . "," . $mins[1] . ",1,0\\n";
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	return $string_final;
 | 
	
		
			
				|  |  | ->>>>>>> master
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function pegarLogsDoAlunoComoString ($curso, $aluno, $exercicio) {
 | 
	
	
		
			
				|  | @@ -251,7 +206,6 @@ function abrirArquivoCSV ($curso, $delete_temp = true) {
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  	fclose($file);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -<<<<<<< HEAD
 | 
	
		
			
				|  |  |  	if ($delete_temp)
 | 
	
		
			
				|  |  |  		deleteFolderAndFiles($temp_folder);
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -275,36 +229,6 @@ function listarAlunos ($curso) {
 | 
	
		
			
				|  |  |  	asort($nomes);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	return $nomes;
 | 
	
		
			
				|  |  | -=======
 | 
	
		
			
				|  |  | -	  	$exp = explode("-", $files1[$i]);
 | 
	
		
			
				|  |  | -	  	$fi = "";
 | 
	
		
			
				|  |  | -	  	for ($j = 0; $j < count($exp) - 1; $j++) {
 | 
	
		
			
				|  |  | -	  		$fi .= $exp[$j];
 | 
	
		
			
				|  |  | -	  		if ($j < (count($exp) - 3)) {
 | 
	
		
			
				|  |  | -	  			$fi .= "-";
 | 
	
		
			
				|  |  | -	  		}
 | 
	
		
			
				|  |  | -		  }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	  	$ja_existe = false;
 | 
	
		
			
				|  |  | -	  	for ($j = 0; $j < count($exercicios); $j++) {
 | 
	
		
			
				|  |  | -	  		if ($exercicios[$j][0] == $fi) {
 | 
	
		
			
				|  |  | -	  			$ja_existe = true;
 | 
	
		
			
				|  |  | -	  			break;
 | 
	
		
			
				|  |  | -	  		}
 | 
	
		
			
				|  |  | -		  }		  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	  	if (!$ja_existe) {
 | 
	
		
			
				|  |  | -			$temp = explode("202", $files1[$i])[0];
 | 
	
		
			
				|  |  | -			$ft = [$fi, $temp];
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	  		array_push($exercicios, $ft);
 | 
	
		
			
				|  |  | -	  	}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	  	unlink($dir . '/' . $files1[$i]);
 | 
	
		
			
				|  |  | -	  }
 | 
	
		
			
				|  |  | -	  
 | 
	
		
			
				|  |  | -  	return $exercicios;
 | 
	
		
			
				|  |  | ->>>>>>> master
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function listarExercicios ($curso) {
 |