Ultimas actividades
604
contenido/16.html
Normal file
@ -0,0 +1,604 @@
|
|||||||
|
<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/bg01.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.hr-style {
|
||||||
|
opacity: 1;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-custom {
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, .5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer {
|
||||||
|
background-color: #808080;
|
||||||
|
border-radius: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer:hover {
|
||||||
|
background-color: #925c8d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer.selected {
|
||||||
|
background-color: #925c8d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.completed {
|
||||||
|
filter: grayscale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.object-btn {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-medidor {
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 0 12px rgba(0, 0, 0, .5);
|
||||||
|
border-radius: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.termometro {
|
||||||
|
position: relative;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(10, 1fr);
|
||||||
|
grid-template-rows: auto;
|
||||||
|
gap: 0;
|
||||||
|
background: #E7E7E7;
|
||||||
|
background: linear-gradient(to left, #E7E7E7 0%, #C3C3C3 100%);
|
||||||
|
border-radius: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style {
|
||||||
|
border-radius: 0;
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-right: 3px solid #c3c3c3;
|
||||||
|
width: 80px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(10) {
|
||||||
|
border-top-right-radius: 40px;
|
||||||
|
border-bottom-right-radius: 40px;
|
||||||
|
border-left: 0;
|
||||||
|
border-right: 1px solid #000;
|
||||||
|
background: #76c300;
|
||||||
|
/* background: linear-gradient(to top, #76c300 0%, #386100 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:first-child {
|
||||||
|
border-top-left-radius: 40px;
|
||||||
|
border-bottom-left-radius: 40px;
|
||||||
|
background: #DF0000;
|
||||||
|
/* background: linear-gradient(to top, #DF0000 0%, #4F0700 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(2),
|
||||||
|
.med_style:nth-child(3),
|
||||||
|
.med_style:nth-child(4),
|
||||||
|
.med_style:nth-child(5),
|
||||||
|
.med_style:nth-child(6),
|
||||||
|
.med_style:nth-child(7),
|
||||||
|
.med_style:nth-child(8),
|
||||||
|
.med_style:nth-child(9) {
|
||||||
|
border-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(2) {
|
||||||
|
background: #D33F00;
|
||||||
|
/* background: linear-gradient(to top, #D33F00 0%, #c93000 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(3) {
|
||||||
|
background: #F77800;
|
||||||
|
/* background: linear-gradient(to top, #ffce00 0%, #fe6a00 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(4) {
|
||||||
|
background: #F99D00;
|
||||||
|
/* background: linear-gradient(to top, #a4f800 0%, #ffe600 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(5) {
|
||||||
|
background: #FBC100;
|
||||||
|
/* background: linear-gradient(to top, #aaff00 0%, #4e8600 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(6) {
|
||||||
|
background: #FDE600;
|
||||||
|
/* background: linear-gradient(to top, #aaff00 0%, #4e8600 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(7) {
|
||||||
|
background: #CFE700;
|
||||||
|
/* background: linear-gradient(to top, #aaff00 0%, #4e8600 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(8) {
|
||||||
|
background: #A0E700;
|
||||||
|
/* background: linear-gradient(to top, #aaff00 0%, #4e8600 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.med_style:nth-child(9) {
|
||||||
|
background: #7FCB00;
|
||||||
|
/* background: linear-gradient(to top, #aaff00 0%, #4e8600 100%); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.indicador-med {
|
||||||
|
position: absolute;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 100%;
|
||||||
|
bottom: -60px;
|
||||||
|
left: 10px;
|
||||||
|
transition: left 0.5s ease;
|
||||||
|
}
|
||||||
|
</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">Procedimientos</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-1 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-12 mb-3 text-center">
|
||||||
|
<h4 class="fw-bold text-verde-pino">Alimentación y actividad física</h4>
|
||||||
|
</div> -->
|
||||||
|
<div class="col-5 text-center intro mb-3 animate__animated animate__flipInX">
|
||||||
|
<div class="card bg-white border-0 rounded-3 p-3 pb-0 bx-shadow">
|
||||||
|
<p class="my-0">Existen dos modalidades de Diálisis Peritoneal: <b class="text-primary">la
|
||||||
|
DPA y la DPCA.</b></p>
|
||||||
|
<p class="my-0">Cada una
|
||||||
|
de ellas tiene sus propios procesos que deben seguirse correctamente para que la terapia
|
||||||
|
sea exitosa.</p>
|
||||||
|
|
||||||
|
<p class="my-0">En la siguiente actividad podrá poner a prueba sus conocimientos sobre los
|
||||||
|
<b class="text-primary">procedimientos de conexión y desconexión de la DPA.</b>
|
||||||
|
</p>
|
||||||
|
<div class="w-100 position-relative text-center">
|
||||||
|
<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 class="col-6 text-center mb-1 animate__animated animate__zoomIn">
|
||||||
|
<img src="img/16.0.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-12'>
|
||||||
|
<div class='row justify-content-center mb-5'>
|
||||||
|
<div class="col-11 text-center animate__animated animate__bounceInDown">
|
||||||
|
<div class="position-relative d-inline-block">
|
||||||
|
<h2 class="text-primary mb-1 fw-bold">Procedimientos</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-3 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 mb-3 text-center">
|
||||||
|
<h4 class="fw-bold text-verde-pino">DPA</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 px-0 mb-3">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card bg-lila-rosa border-0 rounded-0 py-2 px-3">
|
||||||
|
<div class="row justify-content-start">
|
||||||
|
<div class="col-12">
|
||||||
|
<div
|
||||||
|
class="d-flex flex-row justify-content-center align-items-center gap-3 ps-4">
|
||||||
|
<img src="img/book1.png" class="img-fluid">
|
||||||
|
<p class="mb-0"><strong>Instrucciones:</strong> Presione cada paso de la
|
||||||
|
DPA, lea con atención las oraciones que se presentan acerca de cómo
|
||||||
|
llevarlo a cabo y determine si son falsas o verdaderas para llenar
|
||||||
|
el medidor de salud del paciente.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-11">
|
||||||
|
<div
|
||||||
|
class="row justify-content-center align-items-center animate__animated animate__slideInRight">
|
||||||
|
<div id="actividad-objects" class="col-12">
|
||||||
|
<div class="row justify-content-center align-items-center">
|
||||||
|
<div class="col-12 text-center mb-5">
|
||||||
|
<div
|
||||||
|
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">
|
||||||
|
<div class="termometro p-1">
|
||||||
|
<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 id="#med6" class="med_style"></div>
|
||||||
|
<div id="#med7" class="med_style"></div>
|
||||||
|
<div id="#med8" class="med_style"></div>
|
||||||
|
<div id="#med9" class="med_style"></div>
|
||||||
|
<div id="indicador"
|
||||||
|
class="indicador-med d-flex flex-row justify-content-center align-items-center">
|
||||||
|
<img src="img/16.2.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<img src="img/16.3.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="d-flex flex-row justify-content-center align-items-center gap-3">
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="0">
|
||||||
|
<img src="img/16.4.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="1">
|
||||||
|
<img src="img/16.5.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="2">
|
||||||
|
<img src="img/16.6.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="3">
|
||||||
|
<img src="img/16.7.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="4">
|
||||||
|
<img src="img/16.8.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="d-flex flex-row justify-content-center align-items-center gap-3">
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="5">
|
||||||
|
<img src="img/16.9.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="6">
|
||||||
|
<img src="img/16.10.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="7">
|
||||||
|
<img src="img/16.11.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="8">
|
||||||
|
<img src="img/16.12.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||||
|
data-obj="9">
|
||||||
|
<img src="img/16.13.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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">Procedimientos</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro w-75 my-0 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 mb-3 text-center">
|
||||||
|
<h4 class="fw-bold text-verde-pino">DPCA</h4>
|
||||||
|
</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>
|
||||||
|
<div class="d-none">
|
||||||
|
<div id="pops-questions">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row justify-content-center align-items-center">
|
||||||
|
<div id="txt-question" class="col-12 text-center text-verde-oscuro fw-bold mb-3"></div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div id="txt-answers" class="d-flex flex-row justify-content-center align-items-center gap-3"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
"use strict";
|
||||||
|
$('.wrap-course-content').addClass('fake');
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.intro').removeClass('animate__flipInX');
|
||||||
|
}, 600);
|
||||||
|
|
||||||
|
let questions;
|
||||||
|
let currentQuestionIndex = 0;
|
||||||
|
let currentQuestion;
|
||||||
|
let correctQuestions = 0;
|
||||||
|
let currentObjectBtn;
|
||||||
|
let isCorrectAnswer = false;
|
||||||
|
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();
|
||||||
|
$('.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cargar preguntas al inicio
|
||||||
|
readExcelFile(urlExcelFile, function (data) {
|
||||||
|
const hojaDatos = data["Diapositiva 35"];
|
||||||
|
questions = procesarPreguntas(hojaDatos);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.object-btn').click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
if ($(this).hasClass('disabled')) return;
|
||||||
|
CourseNav.soundClick();
|
||||||
|
currentObjectBtn = $(this);
|
||||||
|
const objId = $(this).data('obj');
|
||||||
|
if (questions && questions.length > 0) {
|
||||||
|
showRandomQuestion(objId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function showRandomQuestion(objId) {
|
||||||
|
// Seleccionar pregunta según el ID del objeto
|
||||||
|
if (objId !== undefined && objId < questions.length) {
|
||||||
|
currentQuestion = questions[objId];
|
||||||
|
} else {
|
||||||
|
// Fallback: seleccionar pregunta en orden secuencial
|
||||||
|
currentQuestion = questions[currentQuestionIndex];
|
||||||
|
currentQuestionIndex = (currentQuestionIndex + 1) % questions.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
const html = $("#pops-questions").html();
|
||||||
|
Swal.fire({
|
||||||
|
html: html,
|
||||||
|
target: document.getElementById('wrap-course-content'),
|
||||||
|
customClass: {
|
||||||
|
popup: 'pop_html_style border border-3 border-primary rounded-4',
|
||||||
|
confirmButton: 'btn text-white bg-primary amor fw-semibold animate__animated animate__pulse animate__infinite'
|
||||||
|
},
|
||||||
|
confirmButtonText: "Cerrar",
|
||||||
|
showConfirmButton: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
allowEscapeKey: false,
|
||||||
|
focusConfirm: false,
|
||||||
|
backdrop: "rgba(65, 60, 60, .95)",
|
||||||
|
width: "45em",
|
||||||
|
didOpen: () => {
|
||||||
|
displayQuestion();
|
||||||
|
if (currentObjectBtn) {
|
||||||
|
currentObjectBtn.addClass('completed disabled');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
didClose: () => {
|
||||||
|
CourseNav.audioController.stopAudio();
|
||||||
|
if (currentObjectBtn) {
|
||||||
|
// currentObjectBtn.addClass('completed disabled');
|
||||||
|
checkAllCompleted();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayQuestion() {
|
||||||
|
const contentSwal = $(Swal.getHtmlContainer());
|
||||||
|
const txtPregunta = contentSwal.find('#txt-question');
|
||||||
|
const txtAnswers = contentSwal.find('#txt-answers');
|
||||||
|
|
||||||
|
txtPregunta.html(currentQuestion.pregunta);
|
||||||
|
|
||||||
|
// Aleatorizar respuestas
|
||||||
|
const shuffledOpciones = shuffleArray([...currentQuestion.opciones]);
|
||||||
|
|
||||||
|
let answersHtml = '';
|
||||||
|
shuffledOpciones.forEach((opcion, index) => {
|
||||||
|
// Determinar el icono según el texto
|
||||||
|
let icono = '';
|
||||||
|
if (opcion.text.toLowerCase().includes('falso')) {
|
||||||
|
icono = '<i class="fa-solid fa-times text-danger me-2"></i>';
|
||||||
|
} else if (opcion.text.toLowerCase().includes('verdadero')) {
|
||||||
|
icono = '<i class="fa-solid fa-check text-success me-2"></i>';
|
||||||
|
}
|
||||||
|
|
||||||
|
answersHtml += `<div class="btn-answer text-white p-2 px-3" data-correct="${opcion.correct}">${icono}${opcion.text}</div>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
txtAnswers.html(answersHtml);
|
||||||
|
|
||||||
|
// Event listener para respuestas
|
||||||
|
contentSwal.find('.btn-answer').click(function () {
|
||||||
|
isCorrectAnswer = $(this).data('correct');
|
||||||
|
$(this).addClass('selected');
|
||||||
|
|
||||||
|
mostrarFeedback(isCorrectAnswer, currentQuestion);
|
||||||
|
|
||||||
|
// if (isCorrectAnswer) {
|
||||||
|
// good.play();
|
||||||
|
// correctQuestions++;
|
||||||
|
// moveIndicator();
|
||||||
|
// Swal.close();
|
||||||
|
// } else {
|
||||||
|
// bad.play();
|
||||||
|
// Swal.close();
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarFeedback(isCorrect, pregunta) {
|
||||||
|
const retroalimentacion = isCorrect ? pregunta.retroalimentacion_correcta : pregunta.retroalimentacion_incorrecta;
|
||||||
|
|
||||||
|
if (isCorrect) {
|
||||||
|
correctQuestions++;
|
||||||
|
}
|
||||||
|
|
||||||
|
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",
|
||||||
|
didOpen: () => {
|
||||||
|
moveIndicator();
|
||||||
|
},
|
||||||
|
didClose: () => {
|
||||||
|
// continuarJuego();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function moveIndicator() {
|
||||||
|
const positions = ['left: 90px', 'left: 170px', 'left: 250px', 'left: 330px', 'left: 410px', 'left: 493px', 'left: 573px', 'left: 652px', 'left: 736px'];
|
||||||
|
if (correctQuestions <= 9) {
|
||||||
|
$('#indicador').attr('style', positions[correctQuestions - 1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkAllCompleted() {
|
||||||
|
const totalButtons = $('.object-btn').length;
|
||||||
|
const completedButtons = $('.object-btn.completed').length;
|
||||||
|
|
||||||
|
if (totalButtons === completedButtons) {
|
||||||
|
setTimeout(() => {
|
||||||
|
const porcentaje = (correctQuestions / questions.length) * 100;
|
||||||
|
const aprobado = porcentaje >= 60;
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
|
CourseNav.setSlideVisited();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
} else {
|
||||||
|
$('.col-reintentar').show();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
}
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
542
contenido/17.html
Normal file
@ -0,0 +1,542 @@
|
|||||||
|
<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/bg01.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Estilos para drag and drop */
|
||||||
|
.options {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
grid-template-rows: repeat(2, 1fr);
|
||||||
|
gap: 15px;
|
||||||
|
/* padding: 20px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-option {
|
||||||
|
cursor: grab;
|
||||||
|
background-image: url('img/17.2.png');
|
||||||
|
background-size: 100% auto;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
border-radius: 15px;
|
||||||
|
border: 3px solid #dee2e6;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
user-select: none;
|
||||||
|
height: 180px;
|
||||||
|
width: 200px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
padding: 15px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
|
||||||
|
border: none;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-option:hover {
|
||||||
|
border-color: #6c9d7a;
|
||||||
|
transform: translateY(-5px) scale(1.05);
|
||||||
|
filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.2));
|
||||||
|
/* box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-option.dragging {
|
||||||
|
opacity: 0.7;
|
||||||
|
transform: rotate(8deg) scale(0.95);
|
||||||
|
cursor: grabbing;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-text {
|
||||||
|
position: absolute;
|
||||||
|
top: 44%;
|
||||||
|
left: 0%;
|
||||||
|
width: 90%;
|
||||||
|
background: transparent;
|
||||||
|
height: 40%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-drag {
|
||||||
|
min-height: 150px;
|
||||||
|
border: 3px dashed #ccc !important;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-drag.drag-over {
|
||||||
|
border-color: #6c9d7a !important;
|
||||||
|
background-color: rgba(108, 157, 122, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-drag.has-answer {
|
||||||
|
border-color: #925c8d !important;
|
||||||
|
background-color: rgba(146, 92, 141, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-option.used {
|
||||||
|
opacity: 0.3;
|
||||||
|
pointer-events: none;
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-option.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropped-option {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
background-color: #925c8d;
|
||||||
|
color: white;
|
||||||
|
padding: 10px 15px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-weight: bold;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
</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">Procedimientos</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-1 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-12 mb-3 text-center">
|
||||||
|
<h4 class="fw-bold text-verde-pino">Alimentación y actividad física</h4>
|
||||||
|
</div> -->
|
||||||
|
<div class="col-5 text-center intro mb-3 animate__animated animate__flipInX">
|
||||||
|
<div class="card bg-white border-0 rounded-3 p-3 pb-0 bx-shadow">
|
||||||
|
<p class="my-0">Para que una terapia de diálisis tenga los resultados esperados, se deben
|
||||||
|
conocer los
|
||||||
|
pasos necesarios para llevarla a cabo.</p>
|
||||||
|
|
||||||
|
<p>En esta actividad podrá demostrar cuánto conoce acerca de los <b
|
||||||
|
class="text-morado-claro">procedimientos de
|
||||||
|
conexión
|
||||||
|
y desconexión de la DPCA.</b></p>
|
||||||
|
<div class="w-100 position-relative text-center">
|
||||||
|
<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 class="col-6 text-center mb-1 animate__animated animate__zoomIn">
|
||||||
|
<img src="img/17.0.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-12'>
|
||||||
|
<div class='row justify-content-center mb-5'>
|
||||||
|
<div class="col-11 text-center animate__animated animate__bounceInDown">
|
||||||
|
<div class="position-relative d-inline-block">
|
||||||
|
<h2 class="text-primary mb-1 fw-bold">Procedimientos</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-3 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 mb-3 text-center">
|
||||||
|
<h4 class="fw-bold text-verde-pino">DPCA</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 px-0 mb-3">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card bg-verde-claro border-0 rounded-0 py-2 px-3">
|
||||||
|
<div class="row justify-content-start">
|
||||||
|
<div class="col-12">
|
||||||
|
<div
|
||||||
|
class="d-flex flex-row justify-content-center align-items-center gap-3 ps-4">
|
||||||
|
<img src="img/book3.png" class="img-fluid">
|
||||||
|
<p class="mb-0"><strong>Instrucciones:</strong> Lea con atención cada
|
||||||
|
descripción y arrástrela hacia el sobre con el nombre del paso al
|
||||||
|
que corresponde.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-11">
|
||||||
|
<div
|
||||||
|
class="row justify-content-center align-items-center animate__animated animate__slideInRight no-overflow">
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="card border-0 bg-verde-pino rounded">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-7">
|
||||||
|
<div
|
||||||
|
class="card bg-transparent border border-2 border-white custom-card p-5 container-drag">
|
||||||
|
<img src="img/17.1.png" class="img-fluid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-10 text-white mt-3">
|
||||||
|
<div class="question">Lorem ipsum dolor, sit amet consectetur
|
||||||
|
adipisicing elit. Minima aliquam placeat neque, officia est laborum
|
||||||
|
molestias voluptatibus pariatur, quaerat dolorum, et omnis mollitia.
|
||||||
|
Dolorum facere minima at quas? Quo, praesentium?</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-8">
|
||||||
|
<div class="options"></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">Procedimientos</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 mb-3 text-center">
|
||||||
|
<h4 class="fw-bold text-verde-pino">DPCA</h4>
|
||||||
|
</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');
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.intro').removeClass('animate__flipInX');
|
||||||
|
}, 600);
|
||||||
|
|
||||||
|
var preguntasActual = 0,
|
||||||
|
preguntasMax = 6,
|
||||||
|
preguntasCorrectas = 0;
|
||||||
|
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();
|
||||||
|
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
||||||
|
$('#inicio').hide();
|
||||||
|
$('#desarrollo').show();
|
||||||
|
inicializarTodasLasOpciones();
|
||||||
|
mostrarPregunta();
|
||||||
|
});
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
let questions = [];
|
||||||
|
let currentQuestion = null;
|
||||||
|
let currentQuestionIndex = 0;
|
||||||
|
let todasLasOpciones = [];
|
||||||
|
|
||||||
|
function inicializarTodasLasOpciones() {
|
||||||
|
todasLasOpciones = [];
|
||||||
|
|
||||||
|
// Recopilar todas las opciones de todas las preguntas
|
||||||
|
questions.forEach((pregunta, preguntaIndex) => {
|
||||||
|
pregunta.opciones.forEach((opcion, opcionIndex) => {
|
||||||
|
todasLasOpciones.push({
|
||||||
|
text: opcion.text,
|
||||||
|
correct: opcion.correct,
|
||||||
|
preguntaIndex: preguntaIndex,
|
||||||
|
id: `pregunta-${preguntaIndex}-opcion-${opcionIndex}`
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Barajar todas las opciones
|
||||||
|
todasLasOpciones = shuffleArray(todasLasOpciones);
|
||||||
|
|
||||||
|
// Mostrar todas las opciones
|
||||||
|
mostrarTodasLasOpciones();
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarTodasLasOpciones() {
|
||||||
|
const $options = $('.options');
|
||||||
|
$options.empty();
|
||||||
|
|
||||||
|
todasLasOpciones.forEach((opcion, index) => {
|
||||||
|
const $option = $(`
|
||||||
|
<div class="draggable-option" draggable="true"
|
||||||
|
data-correct="${opcion.correct}"
|
||||||
|
data-pregunta-index="${opcion.preguntaIndex}"
|
||||||
|
data-option-id="${opcion.id}">
|
||||||
|
<div class="option-text">${opcion.text}</div>
|
||||||
|
</div>
|
||||||
|
`);
|
||||||
|
$options.append($option);
|
||||||
|
});
|
||||||
|
|
||||||
|
setupDragAndDrop();
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarPregunta() {
|
||||||
|
if (questions.length === 0 || currentQuestionIndex >= questions.length) {
|
||||||
|
finalizarJuego();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
currentQuestion = questions[currentQuestionIndex];
|
||||||
|
|
||||||
|
// Mostrar la pregunta en el elemento .question
|
||||||
|
$('.question').text(currentQuestion.pregunta);
|
||||||
|
|
||||||
|
// Limpiar el área de drop
|
||||||
|
$('.container-drag').removeClass('has-answer').find('.dropped-option').remove();
|
||||||
|
|
||||||
|
// Rehabilitar todas las opciones para la nueva pregunta
|
||||||
|
$('.draggable-option').attr('draggable', true).css({
|
||||||
|
'opacity': '1',
|
||||||
|
'pointer-events': 'auto'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupDragAndDrop() {
|
||||||
|
const $draggables = $('.draggable-option');
|
||||||
|
const $dropZone = $('.container-drag');
|
||||||
|
|
||||||
|
// Eventos para elementos draggable
|
||||||
|
$draggables.on('dragstart', function (e) {
|
||||||
|
$(this).addClass('dragging');
|
||||||
|
e.originalEvent.dataTransfer.setData('text/plain', '');
|
||||||
|
e.originalEvent.dataTransfer.effectAllowed = 'move';
|
||||||
|
});
|
||||||
|
|
||||||
|
$draggables.on('dragend', function (e) {
|
||||||
|
$(this).removeClass('dragging');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Eventos para zona de drop
|
||||||
|
$dropZone.on('dragover', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.originalEvent.dataTransfer.dropEffect = 'move';
|
||||||
|
$(this).addClass('drag-over');
|
||||||
|
});
|
||||||
|
|
||||||
|
$dropZone.on('dragleave', function (e) {
|
||||||
|
$(this).removeClass('drag-over');
|
||||||
|
});
|
||||||
|
|
||||||
|
$dropZone.on('drop', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$(this).removeClass('drag-over');
|
||||||
|
|
||||||
|
const $draggedElement = $('.dragging');
|
||||||
|
if ($draggedElement.length > 0) {
|
||||||
|
manejarDrop($draggedElement);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function manejarDrop($draggedElement) {
|
||||||
|
const isCorrect = $draggedElement.data('correct') === true;
|
||||||
|
const preguntaIndexOpcion = $draggedElement.data('pregunta-index');
|
||||||
|
const optionText = $draggedElement.find('.option-text').text() || $draggedElement.text();
|
||||||
|
|
||||||
|
// Verificar si la opción corresponde a la pregunta actual
|
||||||
|
const esOpcionDeLaPreguntaActual = preguntaIndexOpcion === currentQuestionIndex;
|
||||||
|
const isCorrectForCurrentQuestion = isCorrect && esOpcionDeLaPreguntaActual;
|
||||||
|
|
||||||
|
// Crear elemento dropped
|
||||||
|
const $droppedOption = $(`<div class="dropped-option">${optionText}</div>`);
|
||||||
|
$('.container-drag').addClass('has-answer').find('.dropped-option').remove();
|
||||||
|
$('.container-drag').append($droppedOption);
|
||||||
|
|
||||||
|
// NO eliminar la opción, mantenerla disponible
|
||||||
|
// Restaurar el estado normal de todas las opciones
|
||||||
|
$('.draggable-option').attr('draggable', true).css({
|
||||||
|
'opacity': '1',
|
||||||
|
'pointer-events': 'auto'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reproducir sonido
|
||||||
|
CourseNav.audioController.stopAllSoundsAndPlay(isCorrectForCurrentQuestion ? good : bad);
|
||||||
|
|
||||||
|
// Actualizar contadores
|
||||||
|
if (isCorrectForCurrentQuestion) {
|
||||||
|
preguntasCorrectas++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mostrar feedback después de un delay
|
||||||
|
setTimeout(() => {
|
||||||
|
mostrarFeedback(isCorrectForCurrentQuestion, currentQuestion);
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarFeedback(isCorrect, pregunta) {
|
||||||
|
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: () => {
|
||||||
|
continuarJuego();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function continuarJuego() {
|
||||||
|
currentQuestionIndex++;
|
||||||
|
|
||||||
|
if (currentQuestionIndex >= questions.length) {
|
||||||
|
setTimeout(() => {
|
||||||
|
finalizarJuego();
|
||||||
|
}, 700);
|
||||||
|
} else {
|
||||||
|
preguntasActual++;
|
||||||
|
mostrarPregunta();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function visualFeedBack(isCorrect) {
|
||||||
|
// Cambiar la imagen de la alarma correspondiente
|
||||||
|
const $alarms = $('.alarms .alarm-img');
|
||||||
|
if ($alarms.length > preguntasActual) {
|
||||||
|
$alarms.eq(preguntasActual).attr('src', isCorrect ? 'img/alarm_c.png' : 'img/alarm_i.png');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function finalizarJuego() {
|
||||||
|
const porcentaje = (preguntasCorrectas / questions.length) * 100;
|
||||||
|
const aprobado = porcentaje >= 60;
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
|
CourseNav.setSlideVisited();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
} else {
|
||||||
|
$('.col-reintentar').show();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
readExcelFile(urlExcelFile, function (data) {
|
||||||
|
const hojaDatos = data["Diapositiva 37"];
|
||||||
|
questions = procesarPreguntas(hojaDatos);
|
||||||
|
preguntasMax = questions.length;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
440
contenido/18.html
Normal file
@ -0,0 +1,440 @@
|
|||||||
|
<style>
|
||||||
|
.fake {
|
||||||
|
background-image: url(img/bg02.jpg);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: cover;
|
||||||
|
background-attachment: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fake1 {
|
||||||
|
background-image: url(img/bg01.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alarm-img {
|
||||||
|
width: 90px;
|
||||||
|
margin: 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.border-style {
|
||||||
|
border-width: 4px;
|
||||||
|
border-style: solid;
|
||||||
|
border-image: linear-gradient(0deg, #E31D73, #72256B) 1;
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-overflow {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer {
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 0 2px rgba(0, 0, 0, .5);
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.letter {
|
||||||
|
background-color: #925c8d;
|
||||||
|
border-radius: 10px;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer.selected {
|
||||||
|
background-color: #C0D2CD;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer.selected .letter {
|
||||||
|
background-color: #6c9d7a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer:hover {
|
||||||
|
background-color: #C0D2CD;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer:hover .letter {
|
||||||
|
background-color: #6c9d7a;
|
||||||
|
}
|
||||||
|
</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">Alarmas</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-1 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-12 mb-3 text-center">
|
||||||
|
<h4 class="fw-bold text-verde-pino">Alimentación y actividad física</h4>
|
||||||
|
</div> -->
|
||||||
|
<div class="col-5 text-center intro mb-3 animate__animated animate__flipInX">
|
||||||
|
<div class="card bg-white border-0 rounded-3 p-3 pb-0 bx-shadow">
|
||||||
|
<p>En caso de incidencia, el equipo lanzará alarmas.</p>
|
||||||
|
|
||||||
|
<p>Es importante conocerlas para llevar a cabo los procedimientos correctos y resolver el
|
||||||
|
problema. </p>
|
||||||
|
<div class="w-100 position-relative text-center">
|
||||||
|
<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 class="col-6 text-center mb-1 animate__animated animate__zoomIn">
|
||||||
|
<img src="img/18.0.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-12'>
|
||||||
|
<div class='row justify-content-center mb-5'>
|
||||||
|
<div class="col-11 text-center animate__animated animate__bounceInDown">
|
||||||
|
<div class="position-relative d-inline-block">
|
||||||
|
<h2 class="text-primary mb-1 fw-bold">Alarmas</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-3 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-12 mb-3 text-center">
|
||||||
|
<h4 class="fw-bold text-verde-pino">Alimentación y actividad física</h4>
|
||||||
|
</div> -->
|
||||||
|
<div class="col-12 px-0 mb-3">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-8">
|
||||||
|
<div class="card bg-verde-claro border-0 bx-shadow py-2 px-3"
|
||||||
|
style="border-radius: 25px;">
|
||||||
|
<div class="row justify-content-start">
|
||||||
|
<div class="col-12">
|
||||||
|
<div
|
||||||
|
class="d-flex flex-row justify-content-center align-items-center gap-3 ps-4">
|
||||||
|
<img src="img/book3.png" class="img-fluid">
|
||||||
|
<p class="mb-0"><strong>Instrucciones:</strong> Seleccione una alarma.
|
||||||
|
Lea detenidamente la pregunta que se mostrará y elija la respuesta
|
||||||
|
que considere correcta. Su objetivo es apagar todas las alarmas.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-11">
|
||||||
|
<div
|
||||||
|
class="row justify-content-center align-items-center animate__animated animate__slideInRight">
|
||||||
|
<div class="col-10">
|
||||||
|
<div class="alarms alarms d-flex justify-content-center"></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-8">
|
||||||
|
<div class="card mt-4 border-style">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="container-question"></div>
|
||||||
|
</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">Alarmas</h2>
|
||||||
|
<hr class="border border-2 border-verde-oscuro hr-style my-0 opacity-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-12 mb-3 text-center">
|
||||||
|
<h4 class="fw-bold text-verde-pino">Alimentación y actividad física</h4>
|
||||||
|
</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');
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.intro').removeClass('animate__flipInX');
|
||||||
|
}, 600);
|
||||||
|
|
||||||
|
var preguntasActual = 0,
|
||||||
|
preguntasMax = 6,
|
||||||
|
preguntasCorrectas = 0;
|
||||||
|
const bad = CourseNav.createSound("audio/feedback-incorrect.mpeg");
|
||||||
|
const good = CourseNav.createSound("audio/feedback-correct.mpeg");
|
||||||
|
|
||||||
|
// Agregar imágenes de alarmas al iniciar la actividad
|
||||||
|
function inicializarAlarmas() {
|
||||||
|
const $alarms = $('.alarms');
|
||||||
|
$alarms.empty();
|
||||||
|
for (let i = 0; i < preguntasMax; i++) {
|
||||||
|
$alarms.append(`<img src="img/alarm_n.png" class="alarm-img" data-idx="${i}">`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.btn-comenzar').click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
CourseNav.soundClick();
|
||||||
|
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
||||||
|
$('#inicio').hide();
|
||||||
|
$('#desarrollo').show();
|
||||||
|
inicializarAlarmas();
|
||||||
|
mostrarPregunta();
|
||||||
|
});
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
let questions = [];
|
||||||
|
|
||||||
|
function mostrarPregunta() {
|
||||||
|
if (questions.length === 0) return;
|
||||||
|
|
||||||
|
const QuestionPop = false;
|
||||||
|
const preguntaAleatoria = questions[Math.floor(Math.random() * questions.length)];
|
||||||
|
const opcionesBarajadas = shuffleArray([...preguntaAleatoria.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>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (QuestionPop) {
|
||||||
|
Swal.fire({
|
||||||
|
target: document.getElementById('wrap-course-content'),
|
||||||
|
html: `
|
||||||
|
<div class="text-center mb-3">
|
||||||
|
<h4 class="fw-bold text-verde-oscuro">${preguntaAleatoria.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;
|
||||||
|
// const puntos = $(this).data('puntos');
|
||||||
|
|
||||||
|
$('.btn-answer').off('click').css('pointer-events', 'none');
|
||||||
|
|
||||||
|
if (isCorrect) {
|
||||||
|
$(this).addClass('bg-success text-white');
|
||||||
|
// totalPuntos += puntos;
|
||||||
|
visualFeedBack(true);
|
||||||
|
} else {
|
||||||
|
visualFeedBack(false);
|
||||||
|
$(this).addClass('bg-danger text-white');
|
||||||
|
//$('.btn-answer[data-correct="true"]').addClass('bg-success text-white');
|
||||||
|
}
|
||||||
|
|
||||||
|
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
Swal.close();
|
||||||
|
mostrarFeedback(isCorrect, preguntaAleatoria);
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$('.container-question').html(`
|
||||||
|
<div class="text-center mb-3">
|
||||||
|
<h4 class="fw-bold text-primary">${preguntaAleatoria.pregunta}</h4>
|
||||||
|
</div>
|
||||||
|
<div class="content-answers">
|
||||||
|
${opcionesHTML}
|
||||||
|
</div>
|
||||||
|
`);
|
||||||
|
$('.btn-answer').click(function () {
|
||||||
|
const isCorrect = $(this).data('correct') === true;
|
||||||
|
// const puntos = $(this).data('puntos');
|
||||||
|
|
||||||
|
$('.btn-answer').off('click').css('pointer-events', 'none');
|
||||||
|
|
||||||
|
if (isCorrect) {
|
||||||
|
$(this).addClass('bg-success text-white');
|
||||||
|
// totalPuntos += puntos;
|
||||||
|
visualFeedBack(true);
|
||||||
|
} else {
|
||||||
|
visualFeedBack(false);
|
||||||
|
$(this).addClass('bg-danger text-white');
|
||||||
|
//$('.btn-answer[data-correct="true"]').addClass('bg-success text-white');
|
||||||
|
}
|
||||||
|
|
||||||
|
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
// Swal.close();
|
||||||
|
mostrarFeedback(isCorrect, preguntaAleatoria);
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function mostrarFeedback(isCorrect, pregunta) {
|
||||||
|
const retroalimentacion = isCorrect ? pregunta.retroalimentacion_correcta : pregunta.retroalimentacion_incorrecta;
|
||||||
|
|
||||||
|
if (isCorrect) {
|
||||||
|
preguntasCorrectas++;
|
||||||
|
}
|
||||||
|
|
||||||
|
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: () => {
|
||||||
|
continuarJuego();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function continuarJuego() {
|
||||||
|
preguntasActual++;
|
||||||
|
|
||||||
|
if (preguntasActual >= preguntasMax) {
|
||||||
|
setTimeout(() => {
|
||||||
|
finalizarJuego();
|
||||||
|
}, 700);
|
||||||
|
} else {
|
||||||
|
mostrarPregunta();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function visualFeedBack(isCorrect) {
|
||||||
|
// Cambiar la imagen de la alarma correspondiente
|
||||||
|
const $alarms = $('.alarms .alarm-img');
|
||||||
|
if ($alarms.length > preguntasActual) {
|
||||||
|
$alarms.eq(preguntasActual).attr('src', isCorrect ? 'img/alarm_c.png' : 'img/alarm_i.png');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function finalizarJuego() {
|
||||||
|
const porcentaje = (preguntasCorrectas / preguntasMax) * 100;
|
||||||
|
const aprobado = porcentaje >= 60;
|
||||||
|
|
||||||
|
if (aprobado) {
|
||||||
|
CourseNav.setSlideVisited();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
} else {
|
||||||
|
$('.col-reintentar').show();
|
||||||
|
$('#desarrollo').hide();
|
||||||
|
$('#cierre').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
readExcelFile(urlExcelFile, function (data) {
|
||||||
|
const hojaDatos = data["Diapositiva 39"];
|
||||||
|
questions = shuffleArray(procesarPreguntas(hojaDatos));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
53
contenido/19.html
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<style>
|
||||||
|
.fake {
|
||||||
|
background: url(img/bg19.jpg);
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div 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-12 px-0'>
|
||||||
|
<div class='row'>
|
||||||
|
<div class="col-11 px-0">
|
||||||
|
<div class="d-inline-block position-relative">
|
||||||
|
<img src="img/19.0.png" class="img-fluid">
|
||||||
|
<div class="position-absolute h-100 top-0 start-0" style="width: 65%;">
|
||||||
|
<div class="row justify-content-center align-items-center h-100">
|
||||||
|
<div class="col-7">
|
||||||
|
<div
|
||||||
|
class="position-relative d-inline-block animate__animated animate__bounceInDown">
|
||||||
|
<h1 class="text-white fw-bold">¡Felicidades!<strong
|
||||||
|
class="text-secondary">>>></strong></h1>
|
||||||
|
</div>
|
||||||
|
<div class="animate__animated animate__bounceInDown">
|
||||||
|
<hr class="border border-1 border-verde-claro w-100 mx-auto my-0 mb-3">
|
||||||
|
</div>
|
||||||
|
<h3 class="text-gris animate__animated animate__lightSpeedInLeft">Ha completado
|
||||||
|
la <b class="text-white">Guía de entrenamiento para el paciente en Diálisis
|
||||||
|
Peritoneal.</b>
|
||||||
|
</h3><br>
|
||||||
|
<h4 class="text-white animate__animated animate__lightSpeedInLeft">Con estos
|
||||||
|
conocimientos, se encuentra listo para llevar a cabo su terapia de
|
||||||
|
diálisis con seguridad y confianza.</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
'use strict';
|
||||||
|
$('#wrap-course-content').addClass('fake');
|
||||||
|
CourseNav.setSlideVisited();
|
||||||
|
CourseNav.setLessonStatus('completed');
|
||||||
|
CourseNav.save();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
BIN
img/16.0.png
Normal file
|
After Width: | Height: | Size: 131 KiB |
BIN
img/16.1.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
img/16.10.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
img/16.11.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
img/16.12.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
img/16.13.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
img/16.2.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
img/16.3.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
img/16.4.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
img/16.5.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
img/16.6.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
img/16.7.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
img/16.8.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
img/16.9.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
img/17.0.png
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
img/17.1.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
img/17.2.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
img/18.0.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
img/19.0.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
img/alarm_c.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
img/alarm_i.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
img/alarm_n.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
img/bg19.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |