Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 50... Línea 50...
50
        }
50
        }
Línea 51... Línea 51...
51
 
51
 
52
        const slotId = e.target.dataset.slotId;
52
        const slotId = e.target.dataset.slotId;
Línea 53... Línea 53...
53
        const newVersion = parseInt(e.target.value);
53
        const newVersion = parseInt(e.target.value);
54
 
54
 
55
        setQuestionVersion(slotId, newVersion)
55
        setQuestionVersion(slotId, newVersion === 0 ? null : newVersion)
56
            .then(() => {
56
            .then(() => {
57
                location.reload();
57
                location.reload();
58
                return;
58
                return;
59
            })
59
            })
60
            .catch(Notification.exception);
60
            .catch(Notification.exception);
Línea 61... Línea -...
61
    });
-
 
62
};
-
 
63
 
-
 
64
/** @property {Boolean} eventsRegistered If the event has been registered or not */
61
    });
65
let eventsRegistered = false;
62
};
66
 
63
 
67
/**
64
/**
68
 * Entrypoint of the js.
-
 
69
 */
-
 
70
export const init = () => {
-
 
71
    if (eventsRegistered) {
-
 
72
        return;
65
 * Entrypoint of the js.
73
    }
66
 */