From 5792338d29bc27d470825534a7581e7f65d7c110 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 21 Jan 2025 11:39:07 -0600 Subject: [PATCH] =?UTF-8?q?Sal=C3=B3n=20array?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- export/supervisor_excel.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/export/supervisor_excel.php b/export/supervisor_excel.php index b44c5bd..0424092 100644 --- a/export/supervisor_excel.php +++ b/export/supervisor_excel.php @@ -16,8 +16,8 @@ $user = unserialize($_SESSION['user']); $json = file_get_contents('php://input'); $params = json_decode($json, true); -$profesor_clave = isset($params['profesor']) - ? preg_replace('/[^\d]/', '', $params['profesor']) +$profesor_clave = isset($params['profesor']) + ? preg_replace('/[^\d]/', '', $params['profesor']) : null; $data = $db->query( @@ -32,7 +32,10 @@ $data = $db->query( auditoria->>'horario_grupo' as horario_grupo, auditoria->>'horario_hora_completa' as horario_hora_completa, auditoria->>'salon' as salon, - auditoria->>'salon_array' as salon_array, + ( + SELECT string_agg(value, '/' ORDER BY value) + FROM jsonb_array_elements_text(auditoria->'salon_array') AS value + ) as salon_array, auditoria->>'asistencia' as asistencia, auditoria->>'registro_fecha' as registro_fecha, auditoria->>'usuario_nombre' as usuario_nombre,