2025-10-06 19:38:34 -06:00
|
|
|
<style>
|
|
|
|
|
.fake {
|
|
|
|
|
background-image: url(img/bg04.jpg);
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-position: center;
|
|
|
|
|
background-size: cover;
|
|
|
|
|
background-attachment: fixed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fake1 {
|
|
|
|
|
background-image: url(img/bg03.jpg);
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-position: center;
|
|
|
|
|
background-size: cover;
|
|
|
|
|
background-attachment: fixed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-comenzar {
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bg-rosa-mixto {
|
2026-02-11 13:38:15 -06:00
|
|
|
background: #d9c5d7;
|
|
|
|
|
background: linear-gradient(to bottom, #d9c5d7 0%, #ede3ec 100%);
|
2025-10-06 19:38:34 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.paqueteria {
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
z-index: 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.recorrido {
|
|
|
|
|
position: relative;
|
|
|
|
|
display: grid;
|
|
|
|
|
width: 100%;
|
|
|
|
|
grid-template-columns: repeat(6, 1fr);
|
|
|
|
|
grid-template-rows: auto;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: end;
|
|
|
|
|
gap: 15px;
|
|
|
|
|
width: 85%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.check-question {
|
|
|
|
|
top: -40px;
|
|
|
|
|
left: 0;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-paquete {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-paquete.disabled {
|
2026-02-11 13:38:15 -06:00
|
|
|
opacity: 0.5;
|
2025-10-06 19:38:34 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-paquete.completed {
|
2026-02-11 13:38:15 -06:00
|
|
|
opacity: 1 !important;
|
2025-10-06 19:38:34 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#camion-transporte {
|
|
|
|
|
transition: transform 1s ease-in-out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-answer {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border-radius: 10px;
|
2026-02-11 13:38:15 -06:00
|
|
|
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
|
2025-10-06 19:38:34 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.letter {
|
|
|
|
|
background-color: #6c9d7a;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-answer.selected {
|
|
|
|
|
background-color: #d9c5d7;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-answer.selected .letter {
|
|
|
|
|
background-color: #925c8d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-answer:hover {
|
|
|
|
|
background-color: #d9c5d7;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-answer:hover .letter {
|
|
|
|
|
background-color: #925c8d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-reintentar {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
2026-02-11 13:38:15 -06:00
|
|
|
<div id="inicio" class="page-sco py-2 py-md-0 h-100">
|
|
|
|
|
<div class="container h-100">
|
|
|
|
|
<div class="row justify-content-center align-items-center h-100">
|
|
|
|
|
<div class="col-11">
|
|
|
|
|
<div class="row justify-content-center align-items-center">
|
2025-10-06 19:38:34 -06:00
|
|
|
<div class="col-12 text-center animate__animated animate__bounceInDown">
|
|
|
|
|
<div class="position-relative d-inline-block">
|
|
|
|
|
<h2 class="text-primary mb-1 fw-bold">Entrega domiciliaria</h2>
|
2026-02-11 13:38:15 -06:00
|
|
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-1 opacity-100" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6 text-center mb-1 animate__animated animate__zoomIn mb-3">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.0.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
<div class="col-7 text-center animate__animated animate__flipInX">
|
|
|
|
|
<div class="card bg-transparent border-0 rounded-3 p-0 shadow-none">
|
|
|
|
|
<div class="position-relative w-100">
|
2026-02-11 13:38:15 -06:00
|
|
|
<p>
|
|
|
|
|
Gracias a que la diálisis peritoneal es una terapia
|
|
|
|
|
<strong class="text-lila-claro">portable,</strong> le permite mayores
|
|
|
|
|
posibilidades de actividad laboral, vida escolar y posibilidad de viajar.
|
|
|
|
|
</p>
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<div
|
|
|
|
|
class="w-100 position-relative text-center animate__animated animate__zoomIn animate__delay-1s"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<div
|
2026-02-11 13:38:15 -06:00
|
|
|
class="btn-comenzar bg-primary d-inline-block px-3 py-2 text-center animate__animated animate__pulse animate__infinite"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<h5 class="text-white fw-bold mb-0">COMENZAR ACTIVIDAD</h5>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<div id="desarrollo" class="page-sco py-2 py-md-0 h-100" style="display: none; overflow: hidden">
|
|
|
|
|
<div class="container h-100">
|
|
|
|
|
<div class="row justify-content-center align-items-center h-100">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="row justify-content-center">
|
2025-10-06 19:38:34 -06:00
|
|
|
<div class="col-10 text-center animate__animated animate__bounceInDown">
|
|
|
|
|
<div class="position-relative d-inline-block">
|
|
|
|
|
<h2 class="text-primary mb-1 fw-bold">Entrega domiciliaria</h2>
|
2026-02-11 13:38:15 -06:00
|
|
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-2 opacity-100" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12 px-0">
|
|
|
|
|
<div class="card bg-rosa-lavanda border-0 rounded-0 bx-shadow py-2 px-3">
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="col-10">
|
|
|
|
|
<div class="d-flex flex-row justify-content-center align-items-center gap-3">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/book0.png" class="img-fluid" />
|
|
|
|
|
<p class="mb-0">
|
|
|
|
|
<strong>Instrucciones:</strong> Haga clic en cada caja y responda
|
|
|
|
|
correctamente para recolectarla y completar la entrega domiciliaria.
|
|
|
|
|
</p>
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12 px-0 bg-rosa-mixto pt-5">
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="col-10 text-center">
|
2026-02-11 13:38:15 -06:00
|
|
|
<div
|
|
|
|
|
class="d-inline-flex position-relative camino-entrega flex-column justify-content-center align-items-center gap-2"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<div id="camion-transporte" class="paqueteria position-absolute">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.2.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
<div class="recorrido ms-auto">
|
2026-02-11 13:38:15 -06:00
|
|
|
<div
|
|
|
|
|
id="paquete0"
|
|
|
|
|
class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<div class="position-absolute check-question w-100">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.5.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.3.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<div
|
|
|
|
|
id="paquete1"
|
|
|
|
|
class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite disabled"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<div class="position-absolute check-question w-100">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.6.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.3.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<div
|
|
|
|
|
id="paquete2"
|
|
|
|
|
class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite disabled"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<div class="position-absolute check-question w-100">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.7.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.3.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<div
|
|
|
|
|
id="paquete3"
|
|
|
|
|
class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite disabled"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<div class="position-absolute check-question w-100">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.8.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.3.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<div
|
|
|
|
|
id="paquete4"
|
|
|
|
|
class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite disabled"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<div class="position-absolute check-question w-100">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.9.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.3.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
<div id="fin" class="text-center position-relative">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.4.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="carretera">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/14.1.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<div id="cierre" class="page-sco py-2 py-md-0 h-100" style="display: none">
|
|
|
|
|
<div class="container h-100">
|
|
|
|
|
<div class="row justify-content-center align-items-center h-100">
|
|
|
|
|
<div class="col-12">
|
2025-10-06 19:38:34 -06:00
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="col-12 text-center mb-3">
|
2026-02-11 13:38:15 -06:00
|
|
|
<img src="img/cierre_actividad.png" class="img-fluid" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
<div class="col-12 mb-3 text-center">
|
|
|
|
|
<div class="position-relative d-inline-block">
|
|
|
|
|
<h2 class="text-primary mb-1 fw-bold">Entrega domiciliaria</h2>
|
2026-02-11 13:38:15 -06:00
|
|
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 opacity-100" />
|
2025-10-06 19:38:34 -06:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12 text-center mb-3">
|
|
|
|
|
<h4 class="text-secondary fw-bold">Ha concluido la actividad.</h4>
|
|
|
|
|
</div>
|
2026-02-11 13:38:15 -06:00
|
|
|
<div
|
|
|
|
|
class="col-12 text-center col-reintentar animate__animated animate__zoomIn"
|
|
|
|
|
style="display: none"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<div
|
|
|
|
|
class="btn-reintentar rounded-3 bg-primary d-inline-block px-3 py-2 text-center animate__animated animate__pulse animate__infinite"
|
2026-02-11 13:38:15 -06:00
|
|
|
onclick="CourseNav.reload()"
|
|
|
|
|
>
|
2025-10-06 19:38:34 -06:00
|
|
|
<h5 class="text-white fw-bold mb-0">Reintentar</h5>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
$(function () {
|
|
|
|
|
"use strict";
|
2026-02-11 13:38:15 -06:00
|
|
|
$(".wrap-course-content").addClass("fake");
|
2025-10-06 19:38:34 -06:00
|
|
|
|
|
|
|
|
let questions;
|
|
|
|
|
let currentQuestionIndex = 0;
|
|
|
|
|
let currentQuestion;
|
|
|
|
|
let correctQuestions = 0;
|
|
|
|
|
let maxQuestions = -1;
|
2026-02-11 13:38:15 -06:00
|
|
|
const bad = CourseNav.createSound("audio/feedback-incorrect.mpeg");
|
|
|
|
|
const good = CourseNav.createSound("audio/feedback-correct.mpeg");
|
2025-10-06 19:38:34 -06:00
|
|
|
|
2026-02-11 13:38:15 -06:00
|
|
|
$(".btn-comenzar").click(function (e) {
|
2025-10-06 19:38:34 -06:00
|
|
|
e.preventDefault();
|
|
|
|
|
CourseNav.soundClick();
|
2026-02-11 13:38:15 -06:00
|
|
|
$("#inicio").hide();
|
|
|
|
|
$("#desarrollo").show();
|
2025-10-06 19:38:34 -06:00
|
|
|
});
|
|
|
|
|
|
2026-02-11 13:38:15 -06:00
|
|
|
const urlExcelFile = "Actividades_Manual_Vantive.xlsx";
|
2025-10-06 19:38:34 -06:00
|
|
|
|
|
|
|
|
function readExcelFile(url, callback) {
|
|
|
|
|
var xhr = new XMLHttpRequest();
|
2026-02-11 13:38:15 -06:00
|
|
|
xhr.open("GET", url, true);
|
|
|
|
|
xhr.responseType = "arraybuffer";
|
2025-10-06 19:38:34 -06:00
|
|
|
xhr.onload = function (e) {
|
|
|
|
|
var arrayBuffer = xhr.response;
|
|
|
|
|
var data = new Uint8Array(arrayBuffer);
|
|
|
|
|
var workbook = XLSX.read(data, { type: "array" });
|
|
|
|
|
var result = {};
|
2026-02-11 13:38:15 -06:00
|
|
|
workbook.SheetNames.forEach((sheetName) => {
|
2025-10-06 19:38:34 -06:00
|
|
|
var sheet = workbook.Sheets[sheetName];
|
|
|
|
|
result[sheetName] = XLSX.utils.sheet_to_json(sheet);
|
|
|
|
|
});
|
|
|
|
|
callback(result);
|
|
|
|
|
};
|
|
|
|
|
xhr.send();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function procesarPreguntas(data) {
|
2026-02-11 13:38:15 -06:00
|
|
|
const preguntas = data.map((fila) => {
|
2025-10-06 19:38:34 -06:00
|
|
|
const opciones = [];
|
2026-02-11 13:38:15 -06:00
|
|
|
Object.keys(fila).forEach((key) => {
|
|
|
|
|
if (key.startsWith("opcion")) {
|
2025-10-06 19:38:34 -06:00
|
|
|
opciones.push({
|
|
|
|
|
text: fila[key].trim(),
|
2026-02-11 13:38:15 -06:00
|
|
|
correct: key === "opcion_c",
|
2025-10-06 19:38:34 -06:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return {
|
|
|
|
|
pregunta: fila.pregunta.trim(),
|
|
|
|
|
opciones: opciones,
|
2026-02-11 13:38:15 -06:00
|
|
|
retroalimentacion_correcta: fila.retroalimentacion_correcta
|
|
|
|
|
? fila.retroalimentacion_correcta.trim()
|
|
|
|
|
: "",
|
|
|
|
|
retroalimentacion_incorrecta: fila.retroalimentacion_incorrecta
|
|
|
|
|
? fila.retroalimentacion_incorrecta.trim()
|
|
|
|
|
: "",
|
2025-10-06 19:38:34 -06:00
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
return preguntas;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function shuffleArray(array) {
|
|
|
|
|
for (let i = array.length - 1; i > 0; i--) {
|
|
|
|
|
const j = Math.floor(Math.random() * (i + 1));
|
|
|
|
|
[array[i], array[j]] = [array[j], array[i]];
|
|
|
|
|
}
|
|
|
|
|
return array;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function mostrarPregunta(questionIndex) {
|
|
|
|
|
if (questionIndex >= questions.length) return;
|
|
|
|
|
|
|
|
|
|
const pregunta = questions[questionIndex];
|
|
|
|
|
const opcionesBarajadas = shuffleArray([...pregunta.opciones]);
|
|
|
|
|
|
2026-02-11 13:38:15 -06:00
|
|
|
let opcionesHTML = "";
|
2025-10-06 19:38:34 -06:00
|
|
|
opcionesBarajadas.forEach((opcion, index) => {
|
|
|
|
|
opcionesHTML += `<div class="position-relative d-flex flex-row align-items-center gap-0 mb-2 btn-answer" data-correct="${opcion.correct}">
|
|
|
|
|
<div class="d-flex flex-row justify-content-center align-items-center letter text-white text-center p-3">${String.fromCharCode(97 + index)}</div>
|
|
|
|
|
<div class="txt-answer text-start ps-3">${opcion.text}</div>
|
|
|
|
|
</div>`;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Swal.fire({
|
2026-02-11 13:38:15 -06:00
|
|
|
target: document.getElementById("wrap-course-content"),
|
2025-10-06 19:38:34 -06:00
|
|
|
html: `
|
|
|
|
|
<div class="text-center mb-3">
|
|
|
|
|
<h4 class="fw-bold text-verde-oscuro">${pregunta.pregunta}</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-answers">
|
|
|
|
|
${opcionesHTML}
|
|
|
|
|
</div>
|
|
|
|
|
`,
|
|
|
|
|
showConfirmButton: false,
|
|
|
|
|
allowOutsideClick: false,
|
|
|
|
|
customClass: {
|
2026-02-11 13:38:15 -06:00
|
|
|
popup: "swal-wide bg-white border-0 rounded-3 shadow",
|
2025-10-06 19:38:34 -06:00
|
|
|
},
|
|
|
|
|
backdrop: "rgba(65, 60, 60, .95)",
|
|
|
|
|
width: "50em",
|
|
|
|
|
didOpen: () => {
|
2026-02-11 13:38:15 -06:00
|
|
|
$(".btn-answer").click(function () {
|
|
|
|
|
const isCorrect = $(this).data("correct") === true;
|
|
|
|
|
$(".btn-answer").off("click").css("pointer-events", "none");
|
2025-10-06 19:38:34 -06:00
|
|
|
|
|
|
|
|
if (isCorrect) {
|
|
|
|
|
correctQuestions++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
Swal.close();
|
|
|
|
|
mostrarFeedback(isCorrect, pregunta, questionIndex);
|
|
|
|
|
}, 250);
|
|
|
|
|
});
|
2026-02-11 13:38:15 -06:00
|
|
|
},
|
2025-10-06 19:38:34 -06:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function mostrarFeedback(isCorrect, pregunta, questionIndex) {
|
2026-02-11 13:38:15 -06:00
|
|
|
const retroalimentacion = isCorrect
|
|
|
|
|
? pregunta.retroalimentacion_correcta
|
|
|
|
|
: pregunta.retroalimentacion_incorrecta;
|
2025-10-06 19:38:34 -06:00
|
|
|
|
|
|
|
|
Swal.fire({
|
2026-02-11 13:38:15 -06:00
|
|
|
target: document.getElementById("wrap-course-content"),
|
|
|
|
|
imageUrl: isCorrect ? "img/good.png" : "img/bad.png",
|
|
|
|
|
text: retroalimentacion || "",
|
2025-10-06 19:38:34 -06:00
|
|
|
showConfirmButton: true,
|
|
|
|
|
customClass: {
|
2026-02-11 13:38:15 -06:00
|
|
|
popup: "pop_retros bg-transparent border-0 rounded-0 shadow-none",
|
|
|
|
|
confirmButton:
|
|
|
|
|
"btn text-primary bg-lila-rosa amor fw-semibold animate__animated animate__pulse animate__infinite",
|
2025-10-06 19:38:34 -06:00
|
|
|
},
|
|
|
|
|
confirmButtonText: "Continuar",
|
|
|
|
|
backdrop: "rgba(65, 60, 60, .95)",
|
|
|
|
|
width: "35em",
|
|
|
|
|
didClose: () => {
|
|
|
|
|
const currentPaquete = $(`#paquete${questionIndex}`);
|
2026-02-11 13:38:15 -06:00
|
|
|
currentPaquete.removeClass("animate__pulse animate__infinite").addClass("completed");
|
2025-10-06 19:38:34 -06:00
|
|
|
|
|
|
|
|
// Cambiar imagen del check
|
2026-02-11 13:38:15 -06:00
|
|
|
const checkImg = currentPaquete.find(".check-question img");
|
|
|
|
|
checkImg.attr("src", isCorrect ? "img/14.11.png" : "img/14.10.png");
|
2025-10-06 19:38:34 -06:00
|
|
|
|
|
|
|
|
if (isCorrect) {
|
|
|
|
|
// Mover camión
|
2026-02-11 13:38:15 -06:00
|
|
|
const camion = $("#camion-transporte");
|
2025-10-06 19:38:34 -06:00
|
|
|
const paqueteWidth = currentPaquete.outerWidth() + 15; // incluye gap
|
2026-02-11 13:38:15 -06:00
|
|
|
const currentTransform = camion.css("transform");
|
|
|
|
|
const currentX =
|
|
|
|
|
currentTransform === "none" ? 0 : parseFloat(currentTransform.split(",")[4]) || 0;
|
2025-10-06 19:38:34 -06:00
|
|
|
const newX = currentX + paqueteWidth;
|
2026-02-11 13:38:15 -06:00
|
|
|
camion.css("transform", `translateX(${newX}px)`);
|
2025-10-06 19:38:34 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Habilitar siguiente paquete
|
|
|
|
|
if (questionIndex < questions.length - 1) {
|
2026-02-11 13:38:15 -06:00
|
|
|
$(`#paquete${questionIndex + 1}`).removeClass("disabled");
|
2025-10-06 19:38:34 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
currentQuestionIndex++;
|
|
|
|
|
|
|
|
|
|
if (currentQuestionIndex >= questions.length) {
|
|
|
|
|
// Si respondió todas correctamente, mover al destino final
|
|
|
|
|
if (correctQuestions === questions.length) {
|
|
|
|
|
setTimeout(() => {
|
2026-02-11 13:38:15 -06:00
|
|
|
const camion = $("#camion-transporte");
|
|
|
|
|
const currentTransform = camion.css("transform");
|
|
|
|
|
const currentX =
|
|
|
|
|
currentTransform === "none" ? 0 : parseFloat(currentTransform.split(",")[4]) || 0;
|
2025-10-06 19:38:34 -06:00
|
|
|
const paqueteWidth = currentPaquete.outerWidth() + 25;
|
|
|
|
|
const newX = currentX + paqueteWidth;
|
2026-02-11 13:38:15 -06:00
|
|
|
camion.css("transform", `translateX(${newX}px)`);
|
|
|
|
|
console.log("Moviendo camión al fin:", newX);
|
2025-10-06 19:38:34 -06:00
|
|
|
}, 1000);
|
|
|
|
|
}
|
|
|
|
|
const delay = correctQuestions === questions.length ? 3000 : 1500;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
finalizarJuego();
|
|
|
|
|
}, delay);
|
|
|
|
|
}
|
2026-02-11 13:38:15 -06:00
|
|
|
},
|
2025-10-06 19:38:34 -06:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function finalizarJuego() {
|
|
|
|
|
const aprobado = correctQuestions >= Math.ceil(questions.length * 0.75);
|
|
|
|
|
|
2026-02-11 13:38:15 -06:00
|
|
|
$(".wrap-course-content").addClass("fake1").removeClass("fake");
|
2025-10-06 19:38:34 -06:00
|
|
|
|
|
|
|
|
CourseNav.setSlideVisited();
|
|
|
|
|
|
|
|
|
|
if (aprobado) {
|
2026-02-11 13:38:15 -06:00
|
|
|
$("#desarrollo").hide();
|
|
|
|
|
$("#cierre").show();
|
2025-10-06 19:38:34 -06:00
|
|
|
} else {
|
2026-02-11 13:38:15 -06:00
|
|
|
$(".col-reintentar").show();
|
|
|
|
|
$("#desarrollo").hide();
|
|
|
|
|
$("#cierre").show();
|
2025-10-06 19:38:34 -06:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-11 13:38:15 -06:00
|
|
|
$(".btn-paquete").click(function () {
|
|
|
|
|
const paqueteId = $(this).attr("id");
|
|
|
|
|
const index = parseInt(paqueteId.replace("paquete", ""));
|
2025-10-06 19:38:34 -06:00
|
|
|
|
2026-02-11 13:38:15 -06:00
|
|
|
if (
|
|
|
|
|
!$(this).hasClass("disabled") &&
|
|
|
|
|
!$(this).hasClass("completed") &&
|
|
|
|
|
index < questions.length
|
|
|
|
|
) {
|
|
|
|
|
$(this).removeClass("animate__pulse animate__infinite").addClass("disabled");
|
2025-10-06 19:38:34 -06:00
|
|
|
CourseNav.soundClick();
|
|
|
|
|
mostrarPregunta(index);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
readExcelFile(urlExcelFile, function (data) {
|
|
|
|
|
const hojaDatos = data["Diapositiva 29"];
|
|
|
|
|
const preguntasProcesadas = shuffleArray(procesarPreguntas(hojaDatos));
|
|
|
|
|
questions = preguntasProcesadas;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|