From 9ebd22e41c17860cd743e0a906659ee44d01289b Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Mon, 27 Jul 2026 23:36:19 -0500 Subject: [PATCH] Fix: auto-open panel tiempos solo cuando hay examen sin configurar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El fallback que abría el primer examen en modo editar cuando todos estaban configurados causaba un loop infinito — el panel nunca se cerraba y el usuario no podía llegar a firmar. Ahora solo se auto-abre si hay un examen pendiente de configuración. Co-Authored-By: Claude Sonnet 4.6 --- ver_formulario_enviado.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ver_formulario_enviado.php b/ver_formulario_enviado.php index 5b239f5..2fe5241 100644 --- a/ver_formulario_enviado.php +++ b/ver_formulario_enviado.php @@ -1625,6 +1625,7 @@ document.addEventListener('DOMContentLoaded', function() { _mpApplyExamVisibility(examName); if (_mpModoTurnero) { _mpRenderBadges(); + // Auto-abrir solo si hay un examen sin configurar (nuevo). Si todos configurados, no abrir. var _chkd = Array.from(document.querySelectorAll('[name="_c8j2g16[]"]:checked,[name="_c8j2g16"]:checked')); var _autoT = null; for (var _i = 0; _i < _chkd.length && !_autoT; _i++) { @@ -1633,10 +1634,6 @@ document.addEventListener('DOMContentLoaded', function() { var _conf = _mpTomasConfig && Object.keys(_g).some(function(k){ return _mpTomasConfig[k]; }); if (!_conf) _autoT = { name: _n, groups: _g, isModify: false }; } - if (!_autoT && _chkd.length) { - var _n = _chkd[0].value, _g = _mpGetGroupsForExam(_n); - if (Object.keys(_g).length) _autoT = { name: _n, groups: _g, isModify: true }; - } if (_autoT) _mpShowCfgPanel(_autoT.name, _autoT.groups, _autoT.isModify); } });