Fix: auto-open panel tiempos solo cuando hay examen sin configurar
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
abbd5bde16
commit
9ebd22e41c
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user