Saltar al contenido principal
LCWTA
  • Inicio
  • Request Training Credit
  • Training Records
  • Training Records
  • Course Search
  • Más
Spanish
English Spanish
Iniciar sesión (ingresar)
LCWTA
Inicio Request Training Credit Training Records Training Records Course Search

Verificar certificados

Requerido
Usted no ha iniciado sesión. (Iniciar sesión (ingresar))
Resumen de conservación de datos
Obtener la App Mobile
// get query string from url (optional) or window var queryString = url ? url.split('?')[1] : window.location.search.slice(1); // we'll store the parameters here var obj = {}; // if query string exists if (queryString) { // stuff after # is not part of query string, so get rid of it queryString = queryString.split('#')[0]; // split our query string into its component parts var arr = queryString.split('&'); for (var i = 0; i < arr.length; i++) { // separate the keys and the values var a = arr[i].split('='); // set parameter name and value (use 'true' if empty) var paramName = a[0]; var paramValue = typeof (a[1]) === 'undefined' ? true : a[1]; // if the paramName ends with square brackets, e.g. colors[] or colors[2] if (paramName.match(/\[(\d+)?\]$/)) { // create key if it doesn't exist var key = paramName.replace(/\[(\d+)?\]/, ''); if (!obj[key]) obj[key] = []; // if it's an indexed array e.g. colors[2] if (paramName.match(/\[\d+\]$/)) { // get the index value and add the entry at the appropriate position var index = /\[(\d+)\]/.exec(paramName)[1]; obj[key][index] = paramValue; } else { // otherwise add the value to the end of the array obj[key].push(paramValue); } } else { // we're dealing with a string if (!obj[paramName]) { // if it doesn't exist, create property obj[paramName] = paramValue; } else if (obj[paramName] && typeof obj[paramName] === 'string'){ // if property does exist and it's a string, convert it to an array obj[paramName] = [obj[paramName]]; obj[paramName].push(paramValue); } else { // otherwise add the property obj[paramName].push(paramValue); } } } } return obj; } //CREATE THE STUDENT NAME AND ID CONTAINERS IN THE TRANSCRIPT HEADER $('

').insertAfter('.fnamelbl'); //$(' Time remaining
${formatTime(duration)}
${startMessage}
Timer running
`; // ====================================== // POSITION BELOW ANSWER LABEL // ====================================== if (label.parentElement) { label.parentElement.classList.add( "lcwta-timer-label-column" ); } label.insertAdjacentElement("afterend", timer); const clock = timer.querySelector(".timer-clock"); const fill = timer.querySelector(".timer-fill"); const status = timer.querySelector(".timer-status"); const collapsedStatus = timer.querySelector( ".timer-collapsed" ); const details = timer.querySelector(".timer-details"); const toggle = timer.querySelector(".timer-toggle"); let collapsed = false; function applyCollapse() { details.hidden = collapsed; collapsedStatus.hidden = !collapsed; toggle.textContent = collapsed ? "+" : "−"; toggle.setAttribute( "aria-expanded", String(!collapsed) ); toggle.setAttribute( "aria-label", collapsed ? "Expand timer" : "Collapse timer" ); toggle.title = collapsed ? "Show countdown" : "Hide countdown"; } toggle.addEventListener("click", function () { collapsed = !collapsed; applyCollapse(); }); applyCollapse(); const deadline = Date.now() + duration * 1000; let warned = false; let interval; function updateTimer() { if (!timer.isConnected) { clearInterval(interval); return; } const remaining = Math.max( 0, deadline - Date.now() ); const seconds = Math.ceil(remaining / 1000); clock.textContent = formatTime(seconds); fill.style.width = (remaining / (duration * 1000) * 100) + "%"; // Time complete. if (seconds === 0) { clearInterval(interval); timer.classList.remove("is-warning"); timer.classList.add("is-finished"); status.textContent = "Time's up! Please submit your answer."; collapsedStatus.textContent = "Time's up!"; } // Final 30 seconds. else if (seconds <= 30 && !warned) { warned = true; timer.classList.add("is-warning"); status.textContent = "30 seconds or less remaining."; } } interval = setInterval(updateTimer, 250); updateTimer(); return true; } function start() { if (initializeTimer()) return; const observer = new MutationObserver(function () { if (initializeTimer()) { observer.disconnect(); } }); observer.observe(document.body, { childList: true, subtree: true }); setTimeout(function () { observer.disconnect(); }, 60000); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", start); } else { start(); } })();
Impulsado por Moodle Workplace™