Files

496 lines
18 KiB
HTML
Raw Permalink Normal View History

2025-10-06 19:38:34 -06:00
<style>
.fake {
background-image: url(img/bg01.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
background-attachment: fixed;
}
.fake1 {
background-image: url(img/bg02.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
background-attachment: fixed;
}
.fake2 {
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-custom {
background-color: #f0f4f2;
}
.pop_html_style.padd_perso .swal2-html-container {
padding: 0;
}
.object-btn {
cursor: pointer;
position: relative;
width: 19%;
}
.med_style {
position: relative;
width: 35px;
height: 35px;
background: #4d4d4d;
border: 4px solid #808080;
2026-07-01 15:28:02 -06:00
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
2025-10-06 19:38:34 -06:00
}
.med_style.bien {
2026-07-01 15:28:02 -06:00
background: #8eba1f;
background: linear-gradient(to right, #8eba1f 0%, #105742 100%);
2025-10-06 19:38:34 -06:00
border: 4px solid #ffffff;
}
.med_style.mal {
background: #925c8d;
border: 4px solid #ffffff;
}
.btn-answer {
cursor: pointer;
border-radius: 10px;
2026-07-01 15:28:02 -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;
}
.object-btn.completed img {
filter: grayscale(1);
}
.object-btn.completed.good::before {
content: url(img/15.7.png);
position: absolute;
top: 75px;
left: 0;
right: 0;
margin: 0 auto;
z-index: 1;
}
.object-btn.completed.bad::before {
content: url(img/15.8.png);
position: absolute;
top: 75px;
left: 0;
right: 0;
margin: 0 auto;
z-index: 1;
}
.btn-reintentar {
cursor: pointer;
}
</style>
2026-07-01 15:28:02 -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">
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">Actuación ante incidencias</h2>
2026-07-01 15:28:02 -06:00
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-3 opacity-100" />
2025-10-06 19:38:34 -06:00
</div>
</div>
<div class="col-12">
<div class="row justify-content-center align-items-center">
2025-10-22 09:12:21 -06:00
<div class="col-4 text-center animate__animated animate__zoomIn">
2026-07-01 15:28:02 -06:00
<img src="img/15.0.png" class="img-fluid" />
2025-10-06 19:38:34 -06:00
</div>
<div class="col-5">
<div class="card bg-white border-0 rounded-3 p-0 bx-shadow">
<div class="p-3 pb-0 position-relative mb-3 w-100 animate__animated animate__flipInX text-center">
2026-07-01 15:28:02 -06:00
<p class="mb-0">
Ante las situaciones que se presentan a continuación, es indispensable que
<strong class="text-verde-ceniza">guarde la calma y actúe oportunamente </strong>para recibir la
atención adecuada.
</p>
2025-10-06 19:38:34 -06:00
</div>
<div class="position-relative w-100 text-center animate__animated animate__zoomIn animate__delay-1s">
<div
2026-07-01 15:28:02 -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>
</div>
</div>
2026-07-01 15:28:02 -06:00
<div id="desarrollo" 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">
<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">Actuación ante incidencias</h2>
2026-07-01 15:28:02 -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 mb-3">
<div class="card bg-custom 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-07-01 15:28:02 -06:00
<img src="img/book1.png" class="img-fluid" />
<p class="mb-0">
<strong>Instrucciones:</strong> Dé clic en cada una de las salas y conteste la pregunta sobre cómo
atender la incidencia para ganar los puntos.
</p>
2025-10-06 19:38:34 -06:00
</div>
</div>
</div>
</div>
</div>
<div id="actividad-objects" class="col-12">
<div class="row justify-content-center align-items-center">
<div class="col-12 text-center mb-3">
<div
2026-07-01 15:28:02 -06:00
class="content-medidor bg-white rounded-5 p-3 d-inline-flex flex-row justify-content-center align-items-center gap-3"
>
2025-10-06 19:38:34 -06:00
<h4 class="mb-0 fw-bold text-verde-pino">Puntos:</h4>
<div class="grids-med d-flex flex-row justify-content-center align-items-center gap-3">
<div id="#med0" class="med_style"></div>
<div id="#med1" class="med_style"></div>
<div id="#med2" class="med_style"></div>
<div id="#med3" class="med_style"></div>
<div id="#med4" class="med_style"></div>
<div id="#med5" class="med_style"></div>
</div>
</div>
</div>
<div class="col-11">
<div class="d-flex flex-row justify-content-center gap-2">
<div class="object-btn text-center d-inline-block" data-obj="0">
2026-07-01 15:28:02 -06:00
<img
src="img/15.1.png"
class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"
/><br />
2025-10-06 19:38:34 -06:00
<h4 class="fw-bold text-center text-primary">Sala: Infección del sitio de salida</h4>
</div>
<div class="object-btn text-center d-inline-block" data-obj="1">
2026-07-01 15:28:02 -06:00
<img
src="img/15.2.png"
class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"
/><br />
2025-10-06 19:38:34 -06:00
<h4 class="fw-bold text-center text-primary">Sala: Peritonitis</h4>
</div>
<div class="object-btn text-center d-inline-block" data-obj="2">
2026-07-01 15:28:02 -06:00
<img
src="img/15.3.png"
class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"
/><br />
2025-10-06 19:38:34 -06:00
<h4 class="fw-bold text-center text-primary">Sala: Crisis hipertensiva</h4>
</div>
<div class="object-btn text-center d-inline-block" data-obj="3">
2026-07-01 15:28:02 -06:00
<img
src="img/15.4.png"
class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"
/><br />
2025-10-06 19:38:34 -06:00
<h4 class="fw-bold text-center text-primary">Sala: Evento cardiovascular</h4>
</div>
<div class="object-btn text-center d-inline-block" data-obj="4">
2026-07-01 15:28:02 -06:00
<img
src="img/15.5.png"
class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"
/><br />
2025-10-06 19:38:34 -06:00
<h4 class="fw-bold text-center text-primary">Sala: Desconexión accidental</h4>
</div>
<div class="object-btn text-center d-inline-block" data-obj="5">
2026-07-01 15:28:02 -06:00
<img
src="img/15.6.png"
class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"
/><br />
2025-10-06 19:38:34 -06:00
<h4 class="fw-bold text-center text-primary">Sala: Fractura del catéter</h4>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
2026-07-01 15:28:02 -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-07-01 15:28:02 -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">Actuación ante incidencias</h2>
2026-07-01 15:28:02 -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-07-01 15:28:02 -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-07-01 15:28:02 -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-07-01 15:28:02 -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-07-01 15:28:02 -06:00
const bad = CourseNav.createSound("audio/feedback-incorrect.mpeg");
const good = CourseNav.createSound("audio/feedback-correct.mpeg");
const imganesPop = [
'<img src="img/15.1.png" class="img-fluid">',
'<img src="img/15.2.png" class="img-fluid">',
'<img src="img/15.3.png" class="img-fluid">',
'<img src="img/15.4.png" class="img-fluid">',
'<img src="img/15.5.png" class="img-fluid">',
'<img src="img/15.6.png" class="img-fluid">',
];
$(".btn-comenzar").click(function (e) {
2025-10-06 19:38:34 -06:00
e.preventDefault();
CourseNav.soundClick();
2026-07-01 15:28:02 -06:00
$(".wrap-course-content").addClass("fake1").removeClass("fake");
$("#inicio").hide();
$("#desarrollo").show();
2025-10-06 19:38:34 -06:00
});
2026-07-01 15:28:02 -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-07-01 15:28:02 -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-07-01 15:28:02 -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-07-01 15:28:02 -06:00
const preguntas = data.map((fila) => {
2025-10-06 19:38:34 -06:00
const opciones = [];
2026-07-01 15:28:02 -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-07-01 15:28:02 -06:00
correct: key === "opcion_c",
2025-10-06 19:38:34 -06:00
});
}
});
return {
pregunta: fila.pregunta.trim(),
opciones: shuffleArray(opciones),
2026-07-01 15:28:02 -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];
2026-07-01 15:28:02 -06:00
let opcionesHTML = "";
pregunta.opciones.forEach((opcion, index) => {
2025-10-06 19:38:34 -06:00
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 ps-3">${opcion.text}</div>
</div>`;
});
Swal.fire({
2026-07-01 15:28:02 -06:00
target: document.getElementById("wrap-course-content"),
2025-10-06 19:38:34 -06:00
html: `
<div id="pops-questions">
<div class="container-fluid px-0" style="overflow: hidden;border-top-left-radius: 12px;border-top-right-radius: 12px;">
<div class="row justify-content-center align-items-center">
<div class="col-12 text-center mb-3 img-pregunta bg-secondary">${imganesPop[questionIndex]}</div>
<div id="txt-question" class="col-12 text-center text-verde-oscuro fw-bold mb-3 px-4">${pregunta.pregunta}</div>
2026-07-01 15:28:02 -06:00
<div class="col-12 px-4 mb-3">
2025-10-06 19:38:34 -06:00
<div id="txt-answers" class="d-flex flex-column justify-content-center gap-3 text-start">${opcionesHTML}</div>
</div>
2026-07-01 15:28:02 -06:00
<div class="col-12 text-center">
<p class="small mb-0">"Estos son casos hipotéticos basados en las referencias bibliográficas."</p>
</div>
2025-10-06 19:38:34 -06:00
</div>
</div>
</div>
`,
showConfirmButton: false,
allowOutsideClick: false,
customClass: {
2026-07-01 15:28:02 -06:00
popup: "pop_html_style padd_perso border border-3 border-verde-pasto rounded-4",
2025-10-06 19:38:34 -06:00
},
backdrop: "rgba(65, 60, 60, .95)",
width: "50em",
didOpen: () => {
function handleAnswer() {
2026-07-01 15:28:02 -06:00
const isCorrect = $(this).data("correct") === true;
$(".btn-answer").off("click").css("pointer-events", "none");
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
2025-10-06 19:38:34 -06:00
if (isCorrect) {
correctQuestions++;
2026-07-01 15:28:02 -06:00
$(`.med_style:eq(${questionIndex})`).addClass("bien");
setTimeout(() => {
Swal.close();
mostrarFeedback(pregunta, questionIndex);
}, 250);
2025-10-06 19:38:34 -06:00
} else {
setTimeout(() => {
2026-07-01 15:28:02 -06:00
$(".btn-answer").css("pointer-events", "").on("click", handleAnswer);
}, 600);
2025-10-06 19:38:34 -06:00
}
}
2026-07-01 15:28:02 -06:00
$(".btn-answer").on("click", handleAnswer);
},
2025-10-06 19:38:34 -06:00
});
}
function mostrarFeedback(pregunta, questionIndex) {
2025-10-06 19:38:34 -06:00
Swal.fire({
2026-07-01 15:28:02 -06:00
target: document.getElementById("wrap-course-content"),
imageUrl: "img/good.png",
text: pregunta.retroalimentacion_correcta || "",
2025-10-06 19:38:34 -06:00
showConfirmButton: true,
customClass: {
2026-07-01 15:28:02 -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 currentBtn = $(`.object-btn[data-obj="${questionIndex}"]`);
2026-07-01 15:28:02 -06:00
currentBtn.addClass("completed good");
2025-10-06 19:38:34 -06:00
currentQuestionIndex++;
if (currentQuestionIndex >= questions.length) {
setTimeout(() => {
finalizarJuego();
}, 700);
}
2026-07-01 15:28:02 -06:00
},
2025-10-06 19:38:34 -06:00
});
}
function finalizarJuego() {
const percentage = (correctQuestions / questions.length) * 100;
const aprobado = percentage >= 80;
2026-07-01 15:28:02 -06:00
$(".wrap-course-content").addClass("fake2").removeClass("fake1");
2025-10-06 19:38:34 -06:00
CourseNav.setSlideVisited();
if (aprobado) {
2026-07-01 15:28:02 -06:00
$("#desarrollo").hide();
$("#cierre").show();
2025-10-06 19:38:34 -06:00
} else {
2026-07-01 15:28:02 -06:00
$(".col-reintentar").show();
$("#desarrollo").hide();
$("#cierre").show();
2025-10-06 19:38:34 -06:00
}
}
2026-07-01 15:28:02 -06:00
$(".object-btn").click(function () {
const index = parseInt($(this).data("obj"));
if (!$(this).hasClass("completed") && !$(this).hasClass("disabled")) {
$(this).find("img").removeClass("animate__pulse animate__infinite");
$(this).addClass("disabled");
2025-10-06 19:38:34 -06:00
CourseNav.soundClick();
mostrarPregunta(index);
}
});
readExcelFile(urlExcelFile, function (data) {
const hojaDatos = data["Diapositiva 32"];
const preguntasProcesadas = procesarPreguntas(hojaDatos);
questions = maxQuestions === -1 ? preguntasProcesadas : preguntasProcesadas.slice(0, maxQuestions);
});
});
</script>