From 3b73423292f30a1ef1e01156fc10f17771d63095 Mon Sep 17 00:00:00 2001 From: AlexLara Date: Fri, 27 Sep 2024 12:45:41 -0600 Subject: [PATCH] =?UTF-8?q?Correcci=C3=B3n=20de=20correos=20y=20solicitude?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/manda_correo.php | 4 ++-- rest/horarios.php | 12 +++++++++--- solicitudes_autorizar.php | 14 ++++++++------ 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/class/manda_correo.php b/class/manda_correo.php index 9e6478e..c4e33b5 100644 --- a/class/manda_correo.php +++ b/class/manda_correo.php @@ -46,7 +46,7 @@ class MandaCorreos{ if($tipo & self::JEFE){ $correosJefe_rs = $db->querySingle("SELECT DISTINCT jefe.usuario_correo FROM usuario jefe - where :id_fac = ANY(jefe.facultad_id_array) AND rol_id = 11 + where :id_fac = facultad_id AND rol_id = 11 and jefe.usuario_correo is not null and jefe.usuario_correo != ''", [':id_fac' => $facultad] ); foreach($correosJefe_rs as $correo){ @@ -59,7 +59,7 @@ class MandaCorreos{ $correosProf_rs = $db->querySingle("SELECT DISTINCT prof.usuario_correo FROM horario_profesor hs inner join usuario prof on prof.usuario_id =hs.usuario_id - where :id_fac = ANY(hs.facultad_id_array) and prof.usuario_id = :id_prof + where :id_fac = hs.facultad_id and prof.usuario_id = :id_prof and prof.usuario_correo is not null and prof.usuario_correo != ''", [':id_prof'=>$prof_id, ':id_fac' => $facultad] ); foreach($correosProf_rs as $correo){ diff --git a/rest/horarios.php b/rest/horarios.php index 6679565..a3d7235 100644 --- a/rest/horarios.php +++ b/rest/horarios.php @@ -182,7 +182,7 @@ try{ //claves de carreras en el periodo $arreglo_claves = array_map(function ($item) { - return $item['clave_carrera']; + return intval($item['clave_carrera']); }, $carreras_rs); //print_r($selectedData); exit(); @@ -191,6 +191,9 @@ try{ //Recorre SGU y genera hash foreach( $selectedData as $row ){ + //if ($debug) + // echo trim($row["HoraInicio"]."|".($row["NombreMateria"])."|".(trim($row["ClaveProfesor"])==""?"000000":trim($row["ClaveProfesor"]))."|".$row["IdEspacio"]."|".$per["periodo_id"]."|".$row["Carrera"])."[{$row["ClaveCarrera"]}]|{$row["EsMateriaPorReposicion"]}*"; + if(!$row["EsMateriaPorReposicion"]){ $carrera = $row["ClaveCarrera"]; if(is_null($carrera) || empty($carrera)) @@ -245,12 +248,15 @@ try{ //$areacomun = array(); foreach($sguHash as $sgu){ - if(in_array($sgu["data"]["ClaveCarrera"] , $arreglo_claves) /*&& !in_array($sgu["data"]["ClaveMateria"], $areacomun)*/){ + //print_r($sgu["data"]); + //echo $sgu["data"]["NombreMateria"]. "[".intval($sgu["data"]["ClaveCarrera"])."] =".in_array( intval($sgu["data"]["ClaveCarrera"]) , $arreglo_claves)."     "; + if(in_array( intval($sgu["data"]["ClaveCarrera"]) , $arreglo_claves) /*&& !in_array($sgu["data"]["ClaveMateria"], $areacomun)*/){ $horarios_sgu[] = $sgu; } } + //echo "


"; - //print_r($horarios_sgu);exit(); + //print_r($horarios_sgu["hash"]); unset($sguHash); $elementos_sgu_total = array_merge($elementos_sgu_total, $horarios_sgu); diff --git a/solicitudes_autorizar.php b/solicitudes_autorizar.php index dceddeb..3361c95 100644 --- a/solicitudes_autorizar.php +++ b/solicitudes_autorizar.php @@ -92,11 +92,11 @@ function duracionMinutos($fechahora_i, $fechahora_f){ $query = ""; - if($user->rol["rol_id"] == 9){//es coordinador + if($user->rol["rol_id"] == 7){//es coordinador + $query .= "NULL, "; + }else{//supervisor $query .= ":facultad, "; $repoParams[":facultad"] = $user->facultad["facultad_id"]; - }else{//supervisor - $query .= "NULL, "; } if(isset($_POST["prof"]) ){ $query .= ":prof,"; @@ -159,13 +159,13 @@ function duracionMinutos($fechahora_i, $fechahora_f){ include("import/html_header.php"); html_header("Reposiciones de clase", "Sistema de gestión de checador"); ?> - " ?> + " ?>
- periodo_id!= ""){ ?> + periodo_id!= ""){ */ ?>
@@ -546,7 +546,9 @@ function duracionMinutos($fechahora_i, $fechahora_f){

Una vez realizada la acción no se puede deshacer.

+ acceso == "w"){ ?> +

@@ -600,7 +602,7 @@ function duracionMinutos($fechahora_i, $fechahora_f){