From 402e58b6deae46d79a40138683d8a52ced75486d Mon Sep 17 00:00:00 2001 From: Cloud User Date: Wed, 6 Mar 2024 18:21:38 -0600 Subject: [PATCH 1/5] =?UTF-8?q?Rutas=20sal=C3=B3n=20sin=20reposiciones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action/rutas_salón_horario.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action/rutas_salón_horario.php b/action/rutas_salón_horario.php index ce34c45..ee45d52 100644 --- a/action/rutas_salón_horario.php +++ b/action/rutas_salón_horario.php @@ -88,7 +88,7 @@ try { ] ), // 'query' => $db->getLastQuery(), - 'reposiciones' => $db->query( + 'reposiciones' => /* $db->query( 'SELECT ' . implode(', ', $columns) . << $_GET['bloque_horario_id'], 'id_espacio_sgu' => $ruta['id_espacio_sgu'], ] - ), + ) */, ], $ruta, ), @@ -143,4 +143,4 @@ try { 'error' => $th->getMessage(), ], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); exit; -} \ No newline at end of file +} From 829ed46b09560f24fd025fc5773389cde170e418 Mon Sep 17 00:00:00 2001 From: Cloud User Date: Wed, 6 Mar 2024 18:22:55 -0600 Subject: [PATCH 2/5] Cambios sin reposiciones --- action/rutas_salón_horario.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action/rutas_salón_horario.php b/action/rutas_salón_horario.php index ee45d52..6bd2c37 100644 --- a/action/rutas_salón_horario.php +++ b/action/rutas_salón_horario.php @@ -110,7 +110,7 @@ try { 'bloque_horario_id' => $_GET['bloque_horario_id'], 'id_espacio_sgu' => $ruta['id_espacio_sgu'], ] - ) */, + ) */ [], ], $ruta, ), From b996f67bb5ed80aa8878407b20fa40a652fde5bf Mon Sep 17 00:00:00 2001 From: Alejandro Rosales Date: Thu, 7 Mar 2024 12:09:39 -0600 Subject: [PATCH 3/5] Registro bueno --- action/rutas_salón_horario.php | 10 +++++----- include/bd_pdo_rest.php | 2 +- reposiciones_autorizar.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/action/rutas_salón_horario.php b/action/rutas_salón_horario.php index 6bd2c37..20422ce 100644 --- a/action/rutas_salón_horario.php +++ b/action/rutas_salón_horario.php @@ -68,7 +68,7 @@ try { 'horarios' => $db->query( "SELECT " . implode(', ', $columns) . << $db->getLastQuery(), - 'reposiciones' => /* $db->query( + 'reposiciones' => $db->query( 'SELECT ' . implode(', ', $columns) . << $_GET['bloque_horario_id'], 'id_espacio_sgu' => $ruta['id_espacio_sgu'], ] - ) */ [], + ), ], $ruta, ), @@ -143,4 +143,4 @@ try { 'error' => $th->getMessage(), ], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); exit; -} +} \ No newline at end of file diff --git a/include/bd_pdo_rest.php b/include/bd_pdo_rest.php index 9956764..aade333 100644 --- a/include/bd_pdo_rest.php +++ b/include/bd_pdo_rest.php @@ -1,5 +1,5 @@ load(); use \SeinopSys\PostgresDb; diff --git a/reposiciones_autorizar.php b/reposiciones_autorizar.php index 38ff5c5..d8b762c 100644 --- a/reposiciones_autorizar.php +++ b/reposiciones_autorizar.php @@ -197,9 +197,9 @@ if($user->periodo_id!= ""){ -

+ From f55775d9bece918fbd57103ea0dad0de5dbfa4ff Mon Sep 17 00:00:00 2001 From: PAAD Date: Fri, 8 Mar 2024 14:11:41 -0600 Subject: [PATCH 4/5] =?UTF-8?q?Correcci=C3=B3n=20supervisores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/bd_pdo_rest.php | 3 ++- supervisor.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/bd_pdo_rest.php b/include/bd_pdo_rest.php index aade333..d7082a9 100644 --- a/include/bd_pdo_rest.php +++ b/include/bd_pdo_rest.php @@ -1,5 +1,6 @@ load(); use \SeinopSys\PostgresDb; diff --git a/supervisor.php b/supervisor.php index 54b3013..97dd0fe 100644 --- a/supervisor.php +++ b/supervisor.php @@ -204,7 +204,7 @@

Reposición el {{ clase.reposicion_fecha }} a las - {{ clase.reposicion_hora.slice(0, 5) }} h en el salón {{ clase.reposicion_salon + {{ clase.reposicion_hora?.slice(0, 5) }} h en el salón {{ clase.reposicion_salon }}
@@ -815,4 +815,4 @@ - \ No newline at end of file + From 7071fa1fd8844cfb49453af94f7e860f81a9347c Mon Sep 17 00:00:00 2001 From: PAAD Date: Tue, 12 Mar 2024 12:25:48 -0600 Subject: [PATCH 5/5] Cambio de hashes de horarios --- rest/horarios.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/rest/horarios.php b/rest/horarios.php index 2ef619c..f2fe335 100644 --- a/rest/horarios.php +++ b/rest/horarios.php @@ -19,6 +19,14 @@ require_once $ruta_superior."/include/bd_pdo_rest.php"; require_once __DIR__."/token.php"; require_once __DIR__."/LogCambios.php"; +function quitaAcentos($cadena) { + // Normalizar la cadena para descomponer caracteres acentuados en sus formas base y acentos + $cadenaNormalizada = Normalizer::normalize($cadena, Normalizer::FORM_D); + // Utilizar una expresión regular para eliminar los caracteres diacríticos + $cadenaSinAcentos = preg_replace('/\p{M}/u', '', $cadenaNormalizada); + return $cadenaSinAcentos; +} + //--------------ACTUALIZA HORARIOS-------------------------- if(!empty($_GET["fecha"])){ $hoy = $_GET["fecha"]; @@ -271,7 +279,11 @@ try{ //------------------ // Encontrar los "hash" que están en $sgu pero no están en $bd - $hashes_no_en_sgu = array_diff($hashes_bd, $hashes_sgu); + //$hashes_no_en_sgu = array_udiff($hashes_bd, $hashes_sgu, 'strcasecmp'); + $hashes_no_en_sgu = array_udiff($hashes_bd, $hashes_sgu, function($a, $b){ + return strcasecmp(quitaAcentos($a), quitaAcentos($b)); + }); + if($debug) echo "hashes_no_en_sgu ".count($hashes_no_en_sgu)."
"; if(count($hashes_no_en_sgu)>0){ @@ -305,7 +317,10 @@ try{ } // Encontrar los "hash" que están en $sgu pero no están en $bd - $hashes_no_en_bd = array_diff($hashes_sgu, $hashes_bd); + //$hashes_no_en_bd = array_udiff($hashes_sgu, $hashes_bd, 'strcasecmp'); + $hashes_no_en_bd = array_udiff($hashes_sgu, $hashes_bd, function($a, $b){ + return strcasecmp(quitaAcentos($a), quitaAcentos($b)); + }); //echo "hashes_no_en_bd ".count($hashes_no_en_bd)."
"; @@ -427,4 +442,4 @@ try{ } -?> \ No newline at end of file +?>