update
@ -175,7 +175,7 @@
|
|||||||
$('#desarrollo').show();
|
$('#desarrollo').show();
|
||||||
});
|
});
|
||||||
|
|
||||||
const imgDrop = ['img/08.0.png', 'img/08.0.png', 'img/08.0.png', 'img/08.0.png'];
|
const imgDrop = ['img/08.1.png', 'img/08.3.png', 'img/08.2.png', 'img/08.4.png'];
|
||||||
let questions;
|
let questions;
|
||||||
let correctQuestions = 0;
|
let correctQuestions = 0;
|
||||||
let maxQuestions = 4;
|
let maxQuestions = 4;
|
||||||
@ -334,9 +334,18 @@
|
|||||||
width: "35em",
|
width: "35em",
|
||||||
didClose: () => {
|
didClose: () => {
|
||||||
if ($('.drag-item:visible').length === 0) {
|
if ($('.drag-item:visible').length === 0) {
|
||||||
|
const percentage = (correctCount / totalItems) * 100;
|
||||||
|
const passed = percentage >= 80;
|
||||||
|
CourseNav.setSlideVisited();
|
||||||
|
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
||||||
|
if (passed) {
|
||||||
$('#desarrollo').hide();
|
$('#desarrollo').hide();
|
||||||
$('#cierre').show();
|
$('#cierre').show();
|
||||||
CourseNav.setSlideVisited();
|
} else {
|
||||||
|
$('.col-reintentar').show();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -121,6 +121,10 @@
|
|||||||
85% { transform: translateY(6px) scale(0.99);}
|
85% { transform: translateY(6px) scale(0.99);}
|
||||||
100% { transform: translateY(-7px) scale(1.03);}
|
100% { transform: translateY(-7px) scale(1.03);}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-reintentar {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
||||||
<div class='container h-100'>
|
<div class='container h-100'>
|
||||||
|
|||||||
@ -42,6 +42,10 @@
|
|||||||
.btn-answer:hover {
|
.btn-answer:hover {
|
||||||
background-color: #72256b;
|
background-color: #72256b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-reintentar {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
||||||
<div class='container h-100'>
|
<div class='container h-100'>
|
||||||
@ -304,8 +308,9 @@
|
|||||||
const percentage = (correctQuestions / questions.length) * 100;
|
const percentage = (correctQuestions / questions.length) * 100;
|
||||||
const passed = percentage >= 80;
|
const passed = percentage >= 80;
|
||||||
|
|
||||||
if (passed) {
|
|
||||||
CourseNav.setSlideVisited();
|
CourseNav.setSlideVisited();
|
||||||
|
|
||||||
|
if (passed) {
|
||||||
$('#desarrollo').hide();
|
$('#desarrollo').hide();
|
||||||
$('#cierre').show();
|
$('#cierre').show();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -64,6 +64,10 @@
|
|||||||
.piece-puzzle {
|
.piece-puzzle {
|
||||||
transition: all 0.5s ease;
|
transition: all 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-reintentar {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
||||||
<div class='container h-100'>
|
<div class='container h-100'>
|
||||||
@ -338,8 +342,9 @@
|
|||||||
const percentage = (correctQuestions / questions.length) * 100;
|
const percentage = (correctQuestions / questions.length) * 100;
|
||||||
const passed = percentage >= 80;
|
const passed = percentage >= 80;
|
||||||
|
|
||||||
if (passed) {
|
|
||||||
CourseNav.setSlideVisited();
|
CourseNav.setSlideVisited();
|
||||||
|
|
||||||
|
if (passed) {
|
||||||
$('#desarrollo').hide();
|
$('#desarrollo').hide();
|
||||||
$('#cierre').show();
|
$('#cierre').show();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -15,6 +15,14 @@
|
|||||||
background-attachment: fixed;
|
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 {
|
.btn-comenzar {
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
@ -104,6 +112,10 @@
|
|||||||
.btn-answer:hover .letter {
|
.btn-answer:hover .letter {
|
||||||
background-color: #925c8d;
|
background-color: #925c8d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-reintentar {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
||||||
<div class='container h-100'>
|
<div class='container h-100'>
|
||||||
@ -482,8 +494,11 @@
|
|||||||
const porcentaje = (totalPuntos / (7 * 700)) * 100;
|
const porcentaje = (totalPuntos / (7 * 700)) * 100;
|
||||||
const aprobado = porcentaje >= 60;
|
const aprobado = porcentaje >= 60;
|
||||||
|
|
||||||
if (aprobado) {
|
$('.wrap-course-content').addClass('fake2').removeClass('fake1');
|
||||||
|
|
||||||
CourseNav.setSlideVisited();
|
CourseNav.setSlideVisited();
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
$('#desarrollo').hide();
|
$('#desarrollo').hide();
|
||||||
$('#cierre').show();
|
$('#cierre').show();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
404
contenido/13.html
Normal file
@ -0,0 +1,404 @@
|
|||||||
|
<style>
|
||||||
|
.fake {
|
||||||
|
background-image: url(img/bg00.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-contador {
|
||||||
|
border-radius: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grip-jeopardy {
|
||||||
|
position: relative;
|
||||||
|
width: 80%;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
grid-template-rows: repeat(2, 1fr);
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-question-pop {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-question-pop.completed {
|
||||||
|
filter: grayscale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer {
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 0 2px rgba(0,0,0,.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.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>
|
||||||
|
<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'>
|
||||||
|
<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">Manejo de medicamentos y terapia dialítica</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-1 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-5 text-center mb-3 animate__animated animate__flipInX">
|
||||||
|
<div class="card bg-white border-0 rounded-3 px-0 pt-2 pb-0 bx-shadow">
|
||||||
|
<div class="position-relative w-100 px-3">
|
||||||
|
<p>Como se ha visto, la enfermedad crónica de los riñones causa signos y síntomas que en parte, son controlados mediante
|
||||||
|
la DP, sin embargo, es necesario el apoyo de medicamentos que solo su médico puede y debe prescribir.</p>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="position-relative w-100 bg-lila-rosa text-primary px-3 py-2 mb-3 animate__animated animate__flipInX animate__delay-1s">
|
||||||
|
<p class="mb-0 fw-bold text-center">Siga las recomendaciones del personal de salud.</p>
|
||||||
|
</div>
|
||||||
|
<div class="w-100 position-relative text-center animate__animated animate__zoomIn animate__delay-2s">
|
||||||
|
<div
|
||||||
|
class="btn-comenzar bg-verde-oscuro d-inline-block px-3 py-2 text-center animate__animated animate__pulse animate__infinite">
|
||||||
|
<h5 class="text-white fw-bold mb-0">COMENZAR ACTIVIDAD</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-center mb-1 animate__animated animate__zoomIn">
|
||||||
|
<img src="img/13.5.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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-11'>
|
||||||
|
<div class='row justify-content-center'>
|
||||||
|
<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">Manejo de medicamentos y terapia dialítica</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-2 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-10 mb-3">
|
||||||
|
<div class="card bg-verde-claro border-0 rounded-4 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">
|
||||||
|
<img src="img/book3.png" class="img-fluid">
|
||||||
|
<p class="mb-0"><strong>Instrucciones:</strong> Haga clic en cada tarjeta para revelar la pregunta acerca del manejo de medicamentos que apoyan la DP.
|
||||||
|
Por cada acierto sumará puntos, el objetivo es llegar a 1000.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-12 mb-3 text-center">
|
||||||
|
<div class="content-contador bg-primary d-inline-flex flex-row justify-content-center align-items-center gap-2 px-3 py-2 bx-shadow">
|
||||||
|
<img src="img/13.4.png" class="img-fluid me-2">
|
||||||
|
<h4 class="text-white fw-bold mb-0">Puntos:</h4>
|
||||||
|
<h4 id="puntos" class="text-white fw-bold mb-0">000</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="grip-jeopardy">
|
||||||
|
<div class="btn-question-pop animate__animated animate__pulse animate__infinite" data-puntos="100">
|
||||||
|
<img src="img/13.0.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="btn-question-pop animate__animated animate__pulse animate__infinite" data-puntos="200">
|
||||||
|
<img src="img/13.2.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="btn-question-pop animate__animated animate__pulse animate__infinite" data-puntos="50">
|
||||||
|
<img src="img/13.1.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="btn-question-pop animate__animated animate__pulse animate__infinite" data-puntos="100">
|
||||||
|
<img src="img/13.0.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="btn-question-pop animate__animated animate__pulse animate__infinite" data-puntos="50">
|
||||||
|
<img src="img/13.1.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="btn-question-pop animate__animated animate__pulse animate__infinite" data-puntos="100">
|
||||||
|
<img src="img/13.0.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="btn-question-pop animate__animated animate__pulse animate__infinite" data-puntos="200">
|
||||||
|
<img src="img/13.2.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="btn-question-pop animate__animated animate__pulse animate__infinite" data-puntos="200">
|
||||||
|
<img src="img/13.2.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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'>
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-12 text-center mb-3">
|
||||||
|
<img src="img/cierre_actividad.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 mb-3 text-center">
|
||||||
|
<div class="position-relative d-inline-block">
|
||||||
|
<h2 class="text-primary mb-1 fw-bold">Manejo de medicamentos y terapia dialítica</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-center mb-3">
|
||||||
|
<h4 class="text-secondary fw-bold">Ha concluido la actividad.</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-center col-reintentar animate__animated animate__zoomIn" style="display: none;">
|
||||||
|
<div
|
||||||
|
class="btn-reintentar rounded-3 bg-primary d-inline-block px-3 py-2 text-center animate__animated animate__pulse animate__infinite"
|
||||||
|
onclick="CourseNav.reload()">
|
||||||
|
<h5 class="text-white fw-bold mb-0">Reintentar</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
"use strict";
|
||||||
|
$('.wrap-course-content').addClass('fake');
|
||||||
|
|
||||||
|
let questions;
|
||||||
|
let currentQuestionIndex = 0;
|
||||||
|
let currentQuestion;
|
||||||
|
let correctQuestions = 0;
|
||||||
|
let maxQuestions = -1;
|
||||||
|
const bad = CourseNav.createSound('audio/feedback-incorrect.mpeg');
|
||||||
|
const good = CourseNav.createSound('audio/feedback-correct.mpeg');
|
||||||
|
|
||||||
|
$('.btn-comenzar').click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
CourseNav.soundClick();
|
||||||
|
$('#inicio').hide();
|
||||||
|
$('#desarrollo').show();
|
||||||
|
});
|
||||||
|
|
||||||
|
const urlExcelFile = 'Actividades_Manual_Vantive.xlsx';
|
||||||
|
|
||||||
|
function readExcelFile(url, callback) {
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('GET', url, true);
|
||||||
|
xhr.responseType = 'arraybuffer';
|
||||||
|
xhr.onload = function (e) {
|
||||||
|
var arrayBuffer = xhr.response;
|
||||||
|
var data = new Uint8Array(arrayBuffer);
|
||||||
|
var workbook = XLSX.read(data, { type: "array" });
|
||||||
|
var result = {};
|
||||||
|
workbook.SheetNames.forEach(sheetName => {
|
||||||
|
var sheet = workbook.Sheets[sheetName];
|
||||||
|
result[sheetName] = XLSX.utils.sheet_to_json(sheet);
|
||||||
|
});
|
||||||
|
callback(result);
|
||||||
|
};
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
function procesarPreguntas(data) {
|
||||||
|
const preguntas = data.map(fila => {
|
||||||
|
const opciones = [];
|
||||||
|
Object.keys(fila).forEach(key => {
|
||||||
|
if (key.startsWith('opcion')) {
|
||||||
|
opciones.push({
|
||||||
|
text: fila[key].trim(),
|
||||||
|
correct: key === 'opcion_c'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
pregunta: fila.pregunta.trim(),
|
||||||
|
opciones: opciones,
|
||||||
|
retroalimentacion_correcta: fila.retroalimentacion_correcta ? fila.retroalimentacion_correcta.trim() : '',
|
||||||
|
retroalimentacion_incorrecta: fila.retroalimentacion_incorrecta ? fila.retroalimentacion_incorrecta.trim() : ''
|
||||||
|
};
|
||||||
|
});
|
||||||
|
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, puntosEnJuego) {
|
||||||
|
if (questionIndex >= questions.length) return;
|
||||||
|
|
||||||
|
const pregunta = questions[questionIndex];
|
||||||
|
const opcionesBarajadas = shuffleArray([...pregunta.opciones]);
|
||||||
|
|
||||||
|
let opcionesHTML = '';
|
||||||
|
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}" data-puntos="${puntosEnJuego}">
|
||||||
|
<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({
|
||||||
|
target: document.getElementById('wrap-course-content'),
|
||||||
|
html: `
|
||||||
|
<div class="text-center mb-3">
|
||||||
|
<h4 class="fw-bold text-verde-oscuro">${pregunta.pregunta}</h4>
|
||||||
|
<p class="text-muted">Puntos en juego: <strong>${puntosEnJuego}</strong></p>
|
||||||
|
</div>
|
||||||
|
<div class="content-answers">
|
||||||
|
${opcionesHTML}
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
showConfirmButton: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
customClass: {
|
||||||
|
popup: 'swal-wide bg-white border-0 rounded-3 shadow'
|
||||||
|
},
|
||||||
|
backdrop: "rgba(65, 60, 60, .95)",
|
||||||
|
width: "50em",
|
||||||
|
didOpen: () => {
|
||||||
|
|
||||||
|
|
||||||
|
$('.btn-answer').click(function() {
|
||||||
|
const isCorrect = $(this).data('correct') === true;
|
||||||
|
const puntos = $(this).data('puntos');
|
||||||
|
$('.btn-answer').off('click hover').css('pointer-events', 'none');
|
||||||
|
|
||||||
|
if (isCorrect) {
|
||||||
|
correctQuestions++;
|
||||||
|
const puntosActuales = parseInt($('#puntos').text()) + puntos;
|
||||||
|
$('#puntos').text(puntosActuales.toString().padStart(3, '0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
Swal.close();
|
||||||
|
mostrarFeedback(isCorrect, pregunta, questionIndex);
|
||||||
|
}, 200);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarFeedback(isCorrect, pregunta, questionIndex) {
|
||||||
|
const retroalimentacion = isCorrect ? pregunta.retroalimentacion_correcta : pregunta.retroalimentacion_incorrecta;
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
target: document.getElementById('wrap-course-content'),
|
||||||
|
imageUrl: isCorrect ? 'img/good.png' : 'img/bad.png',
|
||||||
|
text: retroalimentacion || '',
|
||||||
|
showConfirmButton: true,
|
||||||
|
customClass: {
|
||||||
|
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'
|
||||||
|
},
|
||||||
|
confirmButtonText: "Continuar",
|
||||||
|
backdrop: "rgba(65, 60, 60, .95)",
|
||||||
|
width: "35em",
|
||||||
|
didClose: () => {
|
||||||
|
$('.btn-question-pop').eq(questionIndex).addClass('completed');
|
||||||
|
currentQuestionIndex++;
|
||||||
|
|
||||||
|
if (currentQuestionIndex >= questions.length) {
|
||||||
|
setTimeout(() => {
|
||||||
|
finalizarJuego();
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function finalizarJuego() {
|
||||||
|
const puntosFinal = parseInt($('#puntos').text());
|
||||||
|
const aprobado = puntosFinal >= 1000;
|
||||||
|
|
||||||
|
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
|
CourseNav.setSlideVisited();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
} else {
|
||||||
|
CourseNav.setSlideVisited();
|
||||||
|
$('.col-reintentar').show();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.btn-question-pop').click(function() {
|
||||||
|
const index = $(this).index();
|
||||||
|
const puntosEnJuego = parseInt($(this).data('puntos'));
|
||||||
|
if (!$(this).hasClass('completed') && !$(this).hasClass('disabled')) {
|
||||||
|
$(this).removeClass('animate__pulse animate__infinite').addClass('disabled');
|
||||||
|
CourseNav.soundClick();
|
||||||
|
mostrarPregunta(index, puntosEnJuego);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
readExcelFile(urlExcelFile, function (data) {
|
||||||
|
const hojaDatos = data["Diapositiva 26"];
|
||||||
|
questions = shuffleArray(procesarPreguntas(hojaDatos));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
459
contenido/14.html
Normal file
@ -0,0 +1,459 @@
|
|||||||
|
<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 {
|
||||||
|
background: #D9C5D7;
|
||||||
|
background: linear-gradient(to bottom, #D9C5D7 0%, #EDE3EC 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.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 {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-paquete.completed {
|
||||||
|
opacity: 1!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#camion-transporte {
|
||||||
|
transition: transform 1s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer {
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 0 2px rgba(0,0,0,.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.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>
|
||||||
|
<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'>
|
||||||
|
<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>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-1 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-center mb-1 animate__animated animate__zoomIn mb-3">
|
||||||
|
<img src="img/14.0.png" class="img-fluid">
|
||||||
|
</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">
|
||||||
|
<p>Gracias a que la diálisis peritoneal es una terapia <strong class="text-lila-claro">portable y autoadministrada</strong> permite mayores
|
||||||
|
posibilidades de actividad laboral, vida escolar y posibilidad de viajar.</p>
|
||||||
|
</div>
|
||||||
|
<div class="w-100 position-relative text-center animate__animated animate__zoomIn animate__delay-1s">
|
||||||
|
<div
|
||||||
|
class="btn-comenzar bg-primary d-inline-block px-3 py-2 text-center animate__animated animate__pulse animate__infinite">
|
||||||
|
<h5 class="text-white fw-bold mb-0">COMENZAR ACTIVIDAD</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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'>
|
||||||
|
<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>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-2 opacity-100">
|
||||||
|
</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">
|
||||||
|
<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>
|
||||||
|
</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">
|
||||||
|
<div class="d-inline-flex position-relative camino-entrega flex-column justify-content-center align-items-center gap-2">
|
||||||
|
<div id="camion-transporte" class="paqueteria position-absolute">
|
||||||
|
<img src="img/14.2.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="recorrido ms-auto">
|
||||||
|
<div id="paquete0" class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite">
|
||||||
|
<div class="position-absolute check-question w-100">
|
||||||
|
<img src="img/14.5.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<img src="img/14.3.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div id="paquete1" class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite disabled">
|
||||||
|
<div class="position-absolute check-question w-100">
|
||||||
|
<img src="img/14.6.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<img src="img/14.3.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div id="paquete2" class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite disabled">
|
||||||
|
<div class="position-absolute check-question w-100">
|
||||||
|
<img src="img/14.7.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<img src="img/14.3.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div id="paquete3" class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite disabled">
|
||||||
|
<div class="position-absolute check-question w-100">
|
||||||
|
<img src="img/14.8.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<img src="img/14.3.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div id="paquete4" class="btn-paquete text-center position-relative animate__animated animate__pulse animate__infinite disabled">
|
||||||
|
<div class="position-absolute check-question w-100">
|
||||||
|
<img src="img/14.9.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<img src="img/14.3.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div id="fin" class="text-center position-relative">
|
||||||
|
<img src="img/14.4.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="carretera">
|
||||||
|
<img src="img/14.1.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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'>
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-12 text-center mb-3">
|
||||||
|
<img src="img/cierre_actividad.png" class="img-fluid">
|
||||||
|
</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>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-center mb-3">
|
||||||
|
<h4 class="text-secondary fw-bold">Ha concluido la actividad.</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-center col-reintentar animate__animated animate__zoomIn" style="display: none;">
|
||||||
|
<div
|
||||||
|
class="btn-reintentar rounded-3 bg-primary d-inline-block px-3 py-2 text-center animate__animated animate__pulse animate__infinite"
|
||||||
|
onclick="CourseNav.reload()">
|
||||||
|
<h5 class="text-white fw-bold mb-0">Reintentar</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
"use strict";
|
||||||
|
$('.wrap-course-content').addClass('fake');
|
||||||
|
|
||||||
|
let questions;
|
||||||
|
let currentQuestionIndex = 0;
|
||||||
|
let currentQuestion;
|
||||||
|
let correctQuestions = 0;
|
||||||
|
let maxQuestions = -1;
|
||||||
|
const bad = CourseNav.createSound('audio/feedback-incorrect.mpeg');
|
||||||
|
const good = CourseNav.createSound('audio/feedback-correct.mpeg');
|
||||||
|
|
||||||
|
$('.btn-comenzar').click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
CourseNav.soundClick();
|
||||||
|
$('#inicio').hide();
|
||||||
|
$('#desarrollo').show();
|
||||||
|
});
|
||||||
|
|
||||||
|
const urlExcelFile = 'Actividades_Manual_Vantive.xlsx';
|
||||||
|
|
||||||
|
function readExcelFile(url, callback) {
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('GET', url, true);
|
||||||
|
xhr.responseType = 'arraybuffer';
|
||||||
|
xhr.onload = function (e) {
|
||||||
|
var arrayBuffer = xhr.response;
|
||||||
|
var data = new Uint8Array(arrayBuffer);
|
||||||
|
var workbook = XLSX.read(data, { type: "array" });
|
||||||
|
var result = {};
|
||||||
|
workbook.SheetNames.forEach(sheetName => {
|
||||||
|
var sheet = workbook.Sheets[sheetName];
|
||||||
|
result[sheetName] = XLSX.utils.sheet_to_json(sheet);
|
||||||
|
});
|
||||||
|
callback(result);
|
||||||
|
};
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
function procesarPreguntas(data) {
|
||||||
|
const preguntas = data.map(fila => {
|
||||||
|
const opciones = [];
|
||||||
|
Object.keys(fila).forEach(key => {
|
||||||
|
if (key.startsWith('opcion')) {
|
||||||
|
opciones.push({
|
||||||
|
text: fila[key].trim(),
|
||||||
|
correct: key === 'opcion_c'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
pregunta: fila.pregunta.trim(),
|
||||||
|
opciones: opciones,
|
||||||
|
retroalimentacion_correcta: fila.retroalimentacion_correcta ? fila.retroalimentacion_correcta.trim() : '',
|
||||||
|
retroalimentacion_incorrecta: fila.retroalimentacion_incorrecta ? fila.retroalimentacion_incorrecta.trim() : ''
|
||||||
|
};
|
||||||
|
});
|
||||||
|
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]);
|
||||||
|
|
||||||
|
let opcionesHTML = '';
|
||||||
|
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({
|
||||||
|
target: document.getElementById('wrap-course-content'),
|
||||||
|
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: {
|
||||||
|
popup: 'swal-wide bg-white border-0 rounded-3 shadow'
|
||||||
|
},
|
||||||
|
backdrop: "rgba(65, 60, 60, .95)",
|
||||||
|
width: "50em",
|
||||||
|
didOpen: () => {
|
||||||
|
$('.btn-answer').click(function() {
|
||||||
|
const isCorrect = $(this).data('correct') === true;
|
||||||
|
$('.btn-answer').off('click').css('pointer-events', 'none');
|
||||||
|
|
||||||
|
if (isCorrect) {
|
||||||
|
correctQuestions++;
|
||||||
|
}
|
||||||
|
|
||||||
|
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
Swal.close();
|
||||||
|
mostrarFeedback(isCorrect, pregunta, questionIndex);
|
||||||
|
}, 250);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarFeedback(isCorrect, pregunta, questionIndex) {
|
||||||
|
const retroalimentacion = isCorrect ? pregunta.retroalimentacion_correcta : pregunta.retroalimentacion_incorrecta;
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
target: document.getElementById('wrap-course-content'),
|
||||||
|
imageUrl: isCorrect ? 'img/good.png' : 'img/bad.png',
|
||||||
|
text: retroalimentacion || '',
|
||||||
|
showConfirmButton: true,
|
||||||
|
customClass: {
|
||||||
|
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'
|
||||||
|
},
|
||||||
|
confirmButtonText: "Continuar",
|
||||||
|
backdrop: "rgba(65, 60, 60, .95)",
|
||||||
|
width: "35em",
|
||||||
|
didClose: () => {
|
||||||
|
const currentPaquete = $(`#paquete${questionIndex}`);
|
||||||
|
currentPaquete.removeClass('animate__pulse animate__infinite').addClass('completed');
|
||||||
|
|
||||||
|
// Cambiar imagen del check
|
||||||
|
const checkImg = currentPaquete.find('.check-question img');
|
||||||
|
checkImg.attr('src', isCorrect ? 'img/14.11.png' : 'img/14.10.png');
|
||||||
|
|
||||||
|
if (isCorrect) {
|
||||||
|
// Mover camión
|
||||||
|
const camion = $('#camion-transporte');
|
||||||
|
const paqueteWidth = currentPaquete.outerWidth() + 15; // incluye gap
|
||||||
|
const currentTransform = camion.css('transform');
|
||||||
|
const currentX = currentTransform === 'none' ? 0 : parseFloat(currentTransform.split(',')[4]) || 0;
|
||||||
|
const newX = currentX + paqueteWidth;
|
||||||
|
camion.css('transform', `translateX(${newX}px)`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Habilitar siguiente paquete
|
||||||
|
if (questionIndex < questions.length - 1) {
|
||||||
|
$(`#paquete${questionIndex + 1}`).removeClass('disabled');
|
||||||
|
}
|
||||||
|
|
||||||
|
currentQuestionIndex++;
|
||||||
|
|
||||||
|
if (currentQuestionIndex >= questions.length) {
|
||||||
|
// Si respondió todas correctamente, mover al destino final
|
||||||
|
if (correctQuestions === questions.length) {
|
||||||
|
setTimeout(() => {
|
||||||
|
const camion = $('#camion-transporte');
|
||||||
|
const currentTransform = camion.css('transform');
|
||||||
|
const currentX = currentTransform === 'none' ? 0 : parseFloat(currentTransform.split(',')[4]) || 0;
|
||||||
|
const paqueteWidth = currentPaquete.outerWidth() + 25;
|
||||||
|
const newX = currentX + paqueteWidth;
|
||||||
|
camion.css('transform', `translateX(${newX}px)`);
|
||||||
|
console.log('Moviendo camión al fin:', newX);
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
const delay = correctQuestions === questions.length ? 3000 : 1500;
|
||||||
|
setTimeout(() => {
|
||||||
|
finalizarJuego();
|
||||||
|
}, delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function finalizarJuego() {
|
||||||
|
const aprobado = correctQuestions >= Math.ceil(questions.length * 0.75);
|
||||||
|
|
||||||
|
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
||||||
|
|
||||||
|
CourseNav.setSlideVisited();
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
} else {
|
||||||
|
$('.col-reintentar').show();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.btn-paquete').click(function() {
|
||||||
|
const paqueteId = $(this).attr('id');
|
||||||
|
const index = parseInt(paqueteId.replace('paquete', ''));
|
||||||
|
|
||||||
|
if (!$(this).hasClass('disabled') && !$(this).hasClass('completed') && index < questions.length) {
|
||||||
|
$(this).removeClass('animate__pulse animate__infinite').addClass('disabled');
|
||||||
|
CourseNav.soundClick();
|
||||||
|
mostrarPregunta(index);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
readExcelFile(urlExcelFile, function (data) {
|
||||||
|
const hojaDatos = data["Diapositiva 29"];
|
||||||
|
const preguntasProcesadas = shuffleArray(procesarPreguntas(hojaDatos));
|
||||||
|
questions = preguntasProcesadas;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
457
contenido/15.html
Normal file
@ -0,0 +1,457 @@
|
|||||||
|
<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;
|
||||||
|
box-shadow: 0 0 15px rgba(0,0,0,.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style.bien {
|
||||||
|
background: #8EBA1F;
|
||||||
|
background: linear-gradient(to right, #8EBA1F 0%, #105742 100%);
|
||||||
|
border: 4px solid #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style.mal {
|
||||||
|
background: #925c8d;
|
||||||
|
border: 4px solid #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer {
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 0 2px rgba(0,0,0,.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.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>
|
||||||
|
<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'>
|
||||||
|
<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>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-3 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row justify-content-center align-items-center">
|
||||||
|
<div class="col-6 text-center animate__animated animate__zoomIn">
|
||||||
|
<img src="img/15.0.png" class="img-fluid">
|
||||||
|
</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">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<div class="position-relative w-100 text-center animate__animated animate__zoomIn animate__delay-1s">
|
||||||
|
<div
|
||||||
|
class="btn-comenzar bg-primary d-inline-block px-3 py-2 text-center animate__animated animate__pulse animate__infinite">
|
||||||
|
<h5 class="text-white fw-bold mb-0">COMENZAR ACTIVIDAD</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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'>
|
||||||
|
<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>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-2 opacity-100">
|
||||||
|
</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">
|
||||||
|
<img src="img/book1.png" class="img-fluid">
|
||||||
|
<p class="mb-0"><strong>Instrucciones:</strong> De clic en cada una de las salas y conteste la pregunta sobre cómo atender la incidencia para ganar los puntos.</p>
|
||||||
|
</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
|
||||||
|
class="content-medidor bg-white rounded-5 p-3 d-inline-flex flex-row justify-content-center align-items-center gap-3">
|
||||||
|
<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">
|
||||||
|
<img src="img/15.1.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
|
||||||
|
<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">
|
||||||
|
<img src="img/15.2.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
|
||||||
|
<h4 class="fw-bold text-center text-primary">Sala: Peritonitis</h4>
|
||||||
|
</div>
|
||||||
|
<div class="object-btn text-center d-inline-block" data-obj="2">
|
||||||
|
<img src="img/15.3.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
|
||||||
|
<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">
|
||||||
|
<img src="img/15.4.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
|
||||||
|
<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">
|
||||||
|
<img src="img/15.5.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
|
||||||
|
<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">
|
||||||
|
<img src="img/15.6.png" class="img-fluid mb-2 animate__animated animate__pulse animate__infinite"><br>
|
||||||
|
<h4 class="fw-bold text-center text-primary">Sala: Fractura del catéter</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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'>
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-12 text-center mb-3">
|
||||||
|
<img src="img/cierre_actividad.png" class="img-fluid">
|
||||||
|
</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>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-center mb-3">
|
||||||
|
<h4 class="text-secondary fw-bold">Ha concluido la actividad.</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 text-center col-reintentar animate__animated animate__zoomIn" style="display: none;">
|
||||||
|
<div
|
||||||
|
class="btn-reintentar rounded-3 bg-primary d-inline-block px-3 py-2 text-center animate__animated animate__pulse animate__infinite"
|
||||||
|
onclick="CourseNav.reload()">
|
||||||
|
<h5 class="text-white fw-bold mb-0">Reintentar</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
"use strict";
|
||||||
|
$('.wrap-course-content').addClass('fake');
|
||||||
|
|
||||||
|
let questions;
|
||||||
|
let currentQuestionIndex = 0;
|
||||||
|
let currentQuestion;
|
||||||
|
let correctQuestions = 0;
|
||||||
|
let maxQuestions = -1;
|
||||||
|
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) {
|
||||||
|
e.preventDefault();
|
||||||
|
CourseNav.soundClick();
|
||||||
|
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
||||||
|
$('#inicio').hide();
|
||||||
|
$('#desarrollo').show();
|
||||||
|
});
|
||||||
|
|
||||||
|
const urlExcelFile = 'Actividades_Manual_Vantive.xlsx';
|
||||||
|
|
||||||
|
function readExcelFile(url, callback) {
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('GET', url, true);
|
||||||
|
xhr.responseType = 'arraybuffer';
|
||||||
|
xhr.onload = function (e) {
|
||||||
|
var arrayBuffer = xhr.response;
|
||||||
|
var data = new Uint8Array(arrayBuffer);
|
||||||
|
var workbook = XLSX.read(data, { type: "array" });
|
||||||
|
var result = {};
|
||||||
|
workbook.SheetNames.forEach(sheetName => {
|
||||||
|
var sheet = workbook.Sheets[sheetName];
|
||||||
|
result[sheetName] = XLSX.utils.sheet_to_json(sheet);
|
||||||
|
});
|
||||||
|
callback(result);
|
||||||
|
};
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
function procesarPreguntas(data) {
|
||||||
|
const preguntas = data.map(fila => {
|
||||||
|
const opciones = [];
|
||||||
|
Object.keys(fila).forEach(key => {
|
||||||
|
if (key.startsWith('opcion')) {
|
||||||
|
opciones.push({
|
||||||
|
text: fila[key].trim(),
|
||||||
|
correct: key === 'opcion_c'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
pregunta: fila.pregunta.trim(),
|
||||||
|
opciones: opciones,
|
||||||
|
retroalimentacion_correcta: fila.retroalimentacion_correcta ? fila.retroalimentacion_correcta.trim() : '',
|
||||||
|
retroalimentacion_incorrecta: fila.retroalimentacion_incorrecta ? fila.retroalimentacion_incorrecta.trim() : ''
|
||||||
|
};
|
||||||
|
});
|
||||||
|
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]);
|
||||||
|
|
||||||
|
let opcionesHTML = '';
|
||||||
|
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 ps-3">${opcion.text}</div>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
target: document.getElementById('wrap-course-content'),
|
||||||
|
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>
|
||||||
|
<div class="col-12 px-4">
|
||||||
|
<div id="txt-answers" class="d-flex flex-column justify-content-center gap-3 text-start">${opcionesHTML}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
showConfirmButton: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
customClass: {
|
||||||
|
popup: 'pop_html_style padd_perso border border-3 border-verde-pasto rounded-4'
|
||||||
|
},
|
||||||
|
backdrop: "rgba(65, 60, 60, .95)",
|
||||||
|
width: "50em",
|
||||||
|
didOpen: () => {
|
||||||
|
$('.btn-answer').click(function() {
|
||||||
|
const isCorrect = $(this).data('correct') === true;
|
||||||
|
$('.btn-answer').off('click hover').css('pointer-events', 'none');
|
||||||
|
|
||||||
|
if (isCorrect) {
|
||||||
|
correctQuestions++;
|
||||||
|
$(`.med_style:eq(${questionIndex})`).addClass('bien');
|
||||||
|
} else {
|
||||||
|
$(`.med_style:eq(${questionIndex})`).addClass('mal');
|
||||||
|
}
|
||||||
|
|
||||||
|
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
Swal.close();
|
||||||
|
mostrarFeedback(isCorrect, pregunta, questionIndex);
|
||||||
|
}, 250);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarFeedback(isCorrect, pregunta, questionIndex) {
|
||||||
|
const retroalimentacion = isCorrect ? pregunta.retroalimentacion_correcta : pregunta.retroalimentacion_incorrecta;
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
target: document.getElementById('wrap-course-content'),
|
||||||
|
imageUrl: isCorrect ? 'img/good.png' : 'img/bad.png',
|
||||||
|
text: retroalimentacion || '',
|
||||||
|
showConfirmButton: true,
|
||||||
|
customClass: {
|
||||||
|
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'
|
||||||
|
},
|
||||||
|
confirmButtonText: "Continuar",
|
||||||
|
backdrop: "rgba(65, 60, 60, .95)",
|
||||||
|
width: "35em",
|
||||||
|
didClose: () => {
|
||||||
|
const currentBtn = $(`.object-btn[data-obj="${questionIndex}"]`);
|
||||||
|
currentBtn.addClass(isCorrect ? 'completed good' : 'completed bad');
|
||||||
|
currentQuestionIndex++;
|
||||||
|
|
||||||
|
if (currentQuestionIndex >= questions.length) {
|
||||||
|
setTimeout(() => {
|
||||||
|
finalizarJuego();
|
||||||
|
}, 700);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function finalizarJuego() {
|
||||||
|
const percentage = (correctQuestions / questions.length) * 100;
|
||||||
|
const aprobado = percentage >= 80;
|
||||||
|
|
||||||
|
$('.wrap-course-content').addClass('fake2').removeClass('fake1');
|
||||||
|
|
||||||
|
CourseNav.setSlideVisited();
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
} else {
|
||||||
|
$('.col-reintentar').show();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.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');
|
||||||
|
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>
|
||||||
@ -15,6 +15,14 @@
|
|||||||
background-attachment: fixed;
|
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 {
|
.btn-comenzar {
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
@ -67,7 +75,7 @@
|
|||||||
.termometro {
|
.termometro {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(10, 1fr);
|
grid-template-columns: repeat(11, 1fr);
|
||||||
grid-template-rows: auto;
|
grid-template-rows: auto;
|
||||||
gap: 0;
|
gap: 0;
|
||||||
background: #E7E7E7;
|
background: #E7E7E7;
|
||||||
@ -83,7 +91,7 @@
|
|||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.med_style:nth-child(10) {
|
.med_style:nth-child(11) {
|
||||||
border-top-right-radius: 40px;
|
border-top-right-radius: 40px;
|
||||||
border-bottom-right-radius: 40px;
|
border-bottom-right-radius: 40px;
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
@ -106,7 +114,8 @@
|
|||||||
.med_style:nth-child(6),
|
.med_style:nth-child(6),
|
||||||
.med_style:nth-child(7),
|
.med_style:nth-child(7),
|
||||||
.med_style:nth-child(8),
|
.med_style:nth-child(8),
|
||||||
.med_style:nth-child(9) {
|
.med_style:nth-child(9),
|
||||||
|
.med_style:nth-child(10) {
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,6 +159,11 @@
|
|||||||
/* background: linear-gradient(to top, #aaff00 0%, #4e8600 100%); */
|
/* background: linear-gradient(to top, #aaff00 0%, #4e8600 100%); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(10) {
|
||||||
|
background: #7FCB00;
|
||||||
|
/* background: linear-gradient(to top, #aaff00 0%, #4e8600 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
.indicador-med {
|
.indicador-med {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
@ -159,6 +173,10 @@
|
|||||||
left: 10px;
|
left: 10px;
|
||||||
transition: left 0.5s ease;
|
transition: left 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-reintentar {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
||||||
<div class='container h-100'>
|
<div class='container h-100'>
|
||||||
@ -246,16 +264,17 @@
|
|||||||
class="content-medidor p-2 d-inline-flex flex-row justify-content-center align-items-center gap-3">
|
class="content-medidor p-2 d-inline-flex flex-row justify-content-center align-items-center gap-3">
|
||||||
<img src="img/16.1.png" class="img-fluid">
|
<img src="img/16.1.png" class="img-fluid">
|
||||||
<div class="termometro p-1">
|
<div class="termometro p-1">
|
||||||
<div id="#med0" class="med_style"></div>
|
<div id="med0" class="med_style"></div>
|
||||||
<div id="#med1" class="med_style"></div>
|
<div id="med1" class="med_style"></div>
|
||||||
<div id="#med2" class="med_style"></div>
|
<div id="med2" class="med_style"></div>
|
||||||
<div id="#med3" class="med_style"></div>
|
<div id="med3" class="med_style"></div>
|
||||||
<div id="#med4" class="med_style"></div>
|
<div id="med4" class="med_style"></div>
|
||||||
<div id="#med5" class="med_style"></div>
|
<div id="med5" class="med_style"></div>
|
||||||
<div id="#med6" class="med_style"></div>
|
<div id="med6" class="med_style"></div>
|
||||||
<div id="#med7" class="med_style"></div>
|
<div id="med7" class="med_style"></div>
|
||||||
<div id="#med8" class="med_style"></div>
|
<div id="med8" class="med_style"></div>
|
||||||
<div id="#med9" class="med_style"></div>
|
<div id="med9" class="med_style"></div>
|
||||||
|
<div id="med10" class="med_style"></div>
|
||||||
<div id="indicador"
|
<div id="indicador"
|
||||||
class="indicador-med d-flex flex-row justify-content-center align-items-center">
|
class="indicador-med d-flex flex-row justify-content-center align-items-center">
|
||||||
<img src="img/16.2.png" class="img-fluid">
|
<img src="img/16.2.png" class="img-fluid">
|
||||||
@ -491,10 +510,6 @@
|
|||||||
},
|
},
|
||||||
didClose: () => {
|
didClose: () => {
|
||||||
CourseNav.audioController.stopAudio();
|
CourseNav.audioController.stopAudio();
|
||||||
if (currentObjectBtn) {
|
|
||||||
// currentObjectBtn.addClass('completed disabled');
|
|
||||||
checkAllCompleted();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -550,6 +565,8 @@
|
|||||||
correctQuestions++;
|
correctQuestions++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
target: document.getElementById('wrap-course-content'),
|
target: document.getElementById('wrap-course-content'),
|
||||||
imageUrl: isCorrect ? 'img/good.png' : 'img/bad.png',
|
imageUrl: isCorrect ? 'img/good.png' : 'img/bad.png',
|
||||||
@ -564,18 +581,22 @@
|
|||||||
width: "35em",
|
width: "35em",
|
||||||
didOpen: () => {
|
didOpen: () => {
|
||||||
moveIndicator();
|
moveIndicator();
|
||||||
|
if (currentObjectBtn) {
|
||||||
|
currentObjectBtn.addClass(isCorrect ? 'good' : 'bad');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
didClose: () => {
|
didClose: () => {
|
||||||
// continuarJuego();
|
checkAllCompleted();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function moveIndicator() {
|
function moveIndicator() {
|
||||||
const positions = ['left: 90px', 'left: 170px', 'left: 250px', 'left: 330px', 'left: 410px', 'left: 493px', 'left: 573px', 'left: 652px', 'left: 736px'];
|
const positions = ['left: 90px', 'left: 170px', 'left: 250px', 'left: 330px', 'left: 410px', 'left: 493px', 'left: 573px', 'left: 652px', 'left: 736px', 'left: 816px'];
|
||||||
if (correctQuestions <= 9) {
|
if (correctQuestions > 0 && correctQuestions <= 10) {
|
||||||
$('#indicador').attr('style', positions[correctQuestions - 1]);
|
const position = Math.min(correctQuestions - 1, 9);
|
||||||
|
$('#indicador').attr('style', positions[position]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -588,8 +609,11 @@
|
|||||||
const porcentaje = (correctQuestions / questions.length) * 100;
|
const porcentaje = (correctQuestions / questions.length) * 100;
|
||||||
const aprobado = porcentaje >= 60;
|
const aprobado = porcentaje >= 60;
|
||||||
|
|
||||||
if (aprobado) {
|
$('.wrap-course-content').addClass('fake2').removeClass('fake1');
|
||||||
|
|
||||||
CourseNav.setSlideVisited();
|
CourseNav.setSlideVisited();
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
$('#desarrollo').hide();
|
$('#desarrollo').hide();
|
||||||
$('#cierre').show();
|
$('#cierre').show();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<style>
|
<style>
|
||||||
.fake {
|
.fake {
|
||||||
background-image: url(img/bg01.jpg);
|
background-image: url(img/bg04.jpg);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fake1 {
|
.fake1 {
|
||||||
background-image: url(img/bg01.jpg);
|
background-image: url(img/bg03.jpg);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
@ -123,6 +123,10 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-reintentar {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
||||||
<div class='container h-100'>
|
<div class='container h-100'>
|
||||||
@ -281,7 +285,6 @@
|
|||||||
$('.btn-comenzar').click(function (e) {
|
$('.btn-comenzar').click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
CourseNav.soundClick();
|
CourseNav.soundClick();
|
||||||
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
|
||||||
$('#inicio').hide();
|
$('#inicio').hide();
|
||||||
$('#desarrollo').show();
|
$('#desarrollo').show();
|
||||||
inicializarTodasLasOpciones();
|
inicializarTodasLasOpciones();
|
||||||
@ -473,7 +476,7 @@
|
|||||||
// Mostrar feedback después de un delay
|
// Mostrar feedback después de un delay
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
mostrarFeedback(isCorrectForCurrentQuestion, currentQuestion);
|
mostrarFeedback(isCorrectForCurrentQuestion, currentQuestion);
|
||||||
}, 1000);
|
}, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
function mostrarFeedback(isCorrect, pregunta) {
|
function mostrarFeedback(isCorrect, pregunta) {
|
||||||
@ -503,7 +506,7 @@
|
|||||||
if (currentQuestionIndex >= questions.length) {
|
if (currentQuestionIndex >= questions.length) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
finalizarJuego();
|
finalizarJuego();
|
||||||
}, 700);
|
}, 500);
|
||||||
} else {
|
} else {
|
||||||
preguntasActual++;
|
preguntasActual++;
|
||||||
mostrarPregunta();
|
mostrarPregunta();
|
||||||
@ -522,8 +525,11 @@
|
|||||||
const porcentaje = (preguntasCorrectas / questions.length) * 100;
|
const porcentaje = (preguntasCorrectas / questions.length) * 100;
|
||||||
const aprobado = porcentaje >= 60;
|
const aprobado = porcentaje >= 60;
|
||||||
|
|
||||||
if (aprobado) {
|
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
||||||
|
|
||||||
CourseNav.setSlideVisited();
|
CourseNav.setSlideVisited();
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
$('#desarrollo').hide();
|
$('#desarrollo').hide();
|
||||||
$('#cierre').show();
|
$('#cierre').show();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -15,6 +15,14 @@
|
|||||||
background-attachment: fixed;
|
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 {
|
.btn-comenzar {
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
@ -68,6 +76,9 @@
|
|||||||
.btn-answer:hover .letter {
|
.btn-answer:hover .letter {
|
||||||
background-color: #6c9d7a;
|
background-color: #6c9d7a;
|
||||||
}
|
}
|
||||||
|
.btn-reintentar {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
<div id="inicio" class='page-sco py-2 py-md-0 h-100'>
|
||||||
<div class='container h-100'>
|
<div class='container h-100'>
|
||||||
@ -402,7 +413,7 @@
|
|||||||
if (preguntasActual >= preguntasMax) {
|
if (preguntasActual >= preguntasMax) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
finalizarJuego();
|
finalizarJuego();
|
||||||
}, 700);
|
}, 400);
|
||||||
} else {
|
} else {
|
||||||
mostrarPregunta();
|
mostrarPregunta();
|
||||||
}
|
}
|
||||||
@ -420,8 +431,11 @@
|
|||||||
const porcentaje = (preguntasCorrectas / preguntasMax) * 100;
|
const porcentaje = (preguntasCorrectas / preguntasMax) * 100;
|
||||||
const aprobado = porcentaje >= 60;
|
const aprobado = porcentaje >= 60;
|
||||||
|
|
||||||
if (aprobado) {
|
$('.wrap-course-content').addClass('fake2').removeClass('fake1');
|
||||||
|
|
||||||
CourseNav.setSlideVisited();
|
CourseNav.setSlideVisited();
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
$('#desarrollo').hide();
|
$('#desarrollo').hide();
|
||||||
$('#cierre').show();
|
$('#cierre').show();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
BIN
img/08.1.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
img/08.2.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
img/08.3.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
img/08.4.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
img/13.0.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
img/13.1.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
img/13.2.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
img/13.3.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
img/13.4.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
img/13.5.png
Normal file
|
After Width: | Height: | Size: 133 KiB |
BIN
img/14.0.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
img/14.1.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
img/14.10.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
img/14.11.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
img/14.2.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
img/14.3.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
img/14.4.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
img/14.5.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
img/14.6.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
img/14.7.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
img/14.8.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
img/14.9.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
img/15.0.png
Normal file
|
After Width: | Height: | Size: 176 KiB |
BIN
img/15.1.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
img/15.2.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
img/15.3.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
img/15.4.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
img/15.5.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
img/15.6.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
img/15.7.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
img/15.8.png
Normal file
|
After Width: | Height: | Size: 10 KiB |