Browse Source

Registro bueno

Alejandro Rosales 1 year ago
parent
commit
b996f67bb5
3 changed files with 8 additions and 8 deletions
  1. 5 5
      action/rutas_salón_horario.php
  2. 1 1
      include/bd_pdo_rest.php
  3. 2 2
      reposiciones_autorizar.php

+ 5 - 5
action/rutas_salón_horario.php

@@ -68,7 +68,7 @@ try {
                     'horarios' => $db->query(
                         "SELECT " . implode(', ', $columns) . <<<SQL
                             FROM horario_view
-                            NATURAL JOIN periodo
+                            inner JOIN periodo using(periodo_id)
                             JOIN bloque_horario ON (bloque_horario.hora_inicio, bloque_horario.hora_fin) OVERLAPS (horario_view.horario_hora, horario_view.horario_hora + horario_view.duracion)
                             NATURAL JOIN salon_view_mat
                             NATURAL JOIN horario_profesor
@@ -88,11 +88,11 @@ try {
                         ]
                     ),
                     // 'query' => $db->getLastQuery(),
-                    'reposiciones' => /* $db->query(
+                    'reposiciones' => $db->query(
                         'SELECT ' . implode(', ', $columns) . <<<SQL
                             , reposicion_hora + horario_view.duracion as reposicion_fin, registro_fecha_ideal
                             FROM horario_view
-                                NATURAL JOIN periodo
+                                inner JOIN periodo using(periodo_id)
                                 NATURAL JOIN registro
                                 NATURAL JOIN reposicion
                                 JOIN bloque_horario ON (bloque_horario.hora_inicio, bloque_horario.hora_fin) OVERLAPS (reposicion_hora, reposicion_hora + horario_view.duracion)
@@ -110,7 +110,7 @@ try {
                             'bloque_horario_id' => $_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;
-}
+}

+ 1 - 1
include/bd_pdo_rest.php

@@ -1,5 +1,5 @@
 <?php
-require_once "/usr/share/nginx/html/paad/vendor/autoload.php";
+require_once "{$_SERVER['DOCUMENT_ROOT']}/vendor/autoload.php";
 $dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
 $dotenv->load();
 use \SeinopSys\PostgresDb;

+ 2 - 2
reposiciones_autorizar.php

@@ -197,9 +197,9 @@ if($user->periodo_id!= ""){
                 <button type="button" class="btn btn-outline-danger" onclick="window.location.href = window.location.href"><span class="ing-borrar ing-fw"></span> Limpiar</button>
             </div>
 
-            <p class="text-right">
+            <!--<p class="text-right">
                 <button class="btn btn-secondary" id="exportar"><span class="ing-descargar"></span>Descargar xls</button>
-            </p>
+            </p>-->
         </form>