update
This commit is contained in:
+123
-83
@@ -50,12 +50,12 @@
|
||||
height: 35px;
|
||||
background: #4d4d4d;
|
||||
border: 4px solid #808080;
|
||||
box-shadow: 0 0 15px rgba(0,0,0,.5);
|
||||
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.med_style.bien {
|
||||
background: #8EBA1F;
|
||||
background: linear-gradient(to right, #8EBA1F 0%, #105742 100%);
|
||||
background: #8eba1f;
|
||||
background: linear-gradient(to right, #8eba1f 0%, #105742 100%);
|
||||
border: 4px solid #ffffff;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
.btn-answer {
|
||||
cursor: pointer;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 0 2px rgba(0,0,0,.5);
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.letter {
|
||||
@@ -121,31 +121,35 @@
|
||||
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 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">
|
||||
<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-4 text-center animate__animated animate__zoomIn">
|
||||
<img src="img/15.0.png" class="img-fluid">
|
||||
<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>
|
||||
<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">
|
||||
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>
|
||||
@@ -158,15 +162,15 @@
|
||||
</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 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">
|
||||
<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">
|
||||
@@ -174,8 +178,11 @@
|
||||
<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> Dé clic en cada una de las salas y conteste la pregunta sobre cómo atender la incidencia para ganar los puntos.</p>
|
||||
<img src="img/book1.png" class="img-fluid" />
|
||||
<p class="mb-0">
|
||||
<strong>Instrucciones:</strong> Dé clic en cada una de las salas y conteste la pregunta sobre cómo
|
||||
atender la incidencia para ganar los puntos.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,7 +192,8 @@
|
||||
<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">
|
||||
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>
|
||||
@@ -200,27 +208,45 @@
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
@@ -232,27 +258,28 @@
|
||||
</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 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">
|
||||
<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">
|
||||
<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="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()">
|
||||
onclick="CourseNav.reload()"
|
||||
>
|
||||
<h5 class="text-white fw-bold mb-0">Reintentar</h5>
|
||||
</div>
|
||||
</div>
|
||||
@@ -264,37 +291,44 @@
|
||||
<script>
|
||||
$(function () {
|
||||
"use strict";
|
||||
$('.wrap-course-content').addClass('fake');
|
||||
$(".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">'];
|
||||
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) {
|
||||
$(".btn-comenzar").click(function (e) {
|
||||
e.preventDefault();
|
||||
CourseNav.soundClick();
|
||||
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
||||
$('#inicio').hide();
|
||||
$('#desarrollo').show();
|
||||
$(".wrap-course-content").addClass("fake1").removeClass("fake");
|
||||
$("#inicio").hide();
|
||||
$("#desarrollo").show();
|
||||
});
|
||||
|
||||
const urlExcelFile = 'Actividades_Manual_Vantive.xlsx';
|
||||
const urlExcelFile = "Actividades_Manual_Vantive.xlsx";
|
||||
|
||||
function readExcelFile(url, callback) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url, true);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
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 => {
|
||||
workbook.SheetNames.forEach((sheetName) => {
|
||||
var sheet = workbook.Sheets[sheetName];
|
||||
result[sheetName] = XLSX.utils.sheet_to_json(sheet);
|
||||
});
|
||||
@@ -304,21 +338,23 @@
|
||||
}
|
||||
|
||||
function procesarPreguntas(data) {
|
||||
const preguntas = data.map(fila => {
|
||||
const preguntas = data.map((fila) => {
|
||||
const opciones = [];
|
||||
Object.keys(fila).forEach(key => {
|
||||
if (key.startsWith('opcion')) {
|
||||
Object.keys(fila).forEach((key) => {
|
||||
if (key.startsWith("opcion")) {
|
||||
opciones.push({
|
||||
text: fila[key].trim(),
|
||||
correct: key === 'opcion_c'
|
||||
correct: key === "opcion_c",
|
||||
});
|
||||
}
|
||||
});
|
||||
return {
|
||||
pregunta: fila.pregunta.trim(),
|
||||
opciones: shuffleArray(opciones),
|
||||
retroalimentacion_correcta: fila.retroalimentacion_correcta ? fila.retroalimentacion_correcta.trim() : '',
|
||||
retroalimentacion_incorrecta: fila.retroalimentacion_incorrecta ? fila.retroalimentacion_incorrecta.trim() : ''
|
||||
retroalimentacion_correcta: fila.retroalimentacion_correcta ? fila.retroalimentacion_correcta.trim() : "",
|
||||
retroalimentacion_incorrecta: fila.retroalimentacion_incorrecta
|
||||
? fila.retroalimentacion_incorrecta.trim()
|
||||
: "",
|
||||
};
|
||||
});
|
||||
return preguntas;
|
||||
@@ -336,7 +372,7 @@
|
||||
if (questionIndex >= questions.length) return;
|
||||
|
||||
const pregunta = questions[questionIndex];
|
||||
let opcionesHTML = '';
|
||||
let opcionesHTML = "";
|
||||
pregunta.opciones.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>
|
||||
@@ -345,16 +381,19 @@
|
||||
});
|
||||
|
||||
Swal.fire({
|
||||
target: document.getElementById('wrap-course-content'),
|
||||
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 class="col-12 px-4 mb-3">
|
||||
<div id="txt-answers" class="d-flex flex-column justify-content-center gap-3 text-start">${opcionesHTML}</div>
|
||||
</div>
|
||||
<div class="col-12 text-center">
|
||||
<p class="small mb-0">"Estos son casos hipotéticos basados en las referencias bibliográficas."</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -362,51 +401,52 @@
|
||||
showConfirmButton: false,
|
||||
allowOutsideClick: false,
|
||||
customClass: {
|
||||
popup: 'pop_html_style padd_perso border border-3 border-verde-pasto rounded-4'
|
||||
popup: "pop_html_style padd_perso border border-3 border-verde-pasto rounded-4",
|
||||
},
|
||||
backdrop: "rgba(65, 60, 60, .95)",
|
||||
width: "50em",
|
||||
didOpen: () => {
|
||||
function handleAnswer() {
|
||||
const isCorrect = $(this).data('correct') === true;
|
||||
$('.btn-answer').off('click').css('pointer-events', 'none');
|
||||
const isCorrect = $(this).data("correct") === true;
|
||||
$(".btn-answer").off("click").css("pointer-events", "none");
|
||||
|
||||
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
|
||||
|
||||
if (isCorrect) {
|
||||
correctQuestions++;
|
||||
$(`.med_style:eq(${questionIndex})`).addClass('bien');
|
||||
$(`.med_style:eq(${questionIndex})`).addClass("bien");
|
||||
setTimeout(() => {
|
||||
Swal.close();
|
||||
mostrarFeedback(pregunta, questionIndex);
|
||||
}, 250);
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
$('.btn-answer').css('pointer-events', '').on('click', handleAnswer);
|
||||
$(".btn-answer").css("pointer-events", "").on("click", handleAnswer);
|
||||
}, 600);
|
||||
}
|
||||
}
|
||||
$('.btn-answer').on('click', handleAnswer);
|
||||
}
|
||||
$(".btn-answer").on("click", handleAnswer);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function mostrarFeedback(pregunta, questionIndex) {
|
||||
Swal.fire({
|
||||
target: document.getElementById('wrap-course-content'),
|
||||
imageUrl: 'img/good.png',
|
||||
text: pregunta.retroalimentacion_correcta || '',
|
||||
target: document.getElementById("wrap-course-content"),
|
||||
imageUrl: "img/good.png",
|
||||
text: pregunta.retroalimentacion_correcta || "",
|
||||
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'
|
||||
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('completed good');
|
||||
currentBtn.addClass("completed good");
|
||||
currentQuestionIndex++;
|
||||
|
||||
if (currentQuestionIndex >= questions.length) {
|
||||
@@ -414,7 +454,7 @@
|
||||
finalizarJuego();
|
||||
}, 700);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -422,25 +462,25 @@
|
||||
const percentage = (correctQuestions / questions.length) * 100;
|
||||
const aprobado = percentage >= 80;
|
||||
|
||||
$('.wrap-course-content').addClass('fake2').removeClass('fake1');
|
||||
$(".wrap-course-content").addClass("fake2").removeClass("fake1");
|
||||
|
||||
CourseNav.setSlideVisited();
|
||||
|
||||
if (aprobado) {
|
||||
$('#desarrollo').hide();
|
||||
$('#cierre').show();
|
||||
$("#desarrollo").hide();
|
||||
$("#cierre").show();
|
||||
} else {
|
||||
$('.col-reintentar').show();
|
||||
$('#desarrollo').hide();
|
||||
$('#cierre').show();
|
||||
$(".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');
|
||||
$(".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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user