update
This commit is contained in:
+143
-99
@@ -50,7 +50,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 {
|
||||
@@ -80,53 +80,61 @@
|
||||
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 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">
|
||||
<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 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 que se apoye de medicamentos que solo su médico
|
||||
puede y debe prescribir. </p>
|
||||
<p>
|
||||
Como 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 que se apoye
|
||||
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>
|
||||
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="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">
|
||||
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-4 text-center mb-1 animate__animated animate__zoomIn">
|
||||
<img src="img/13.5.png" class="img-fluid">
|
||||
<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 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">
|
||||
<hr class="border border-2 border-verde-oscuro hr-style my-0 mb-2 opacity-100" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-10 mb-3">
|
||||
@@ -134,10 +142,12 @@
|
||||
<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>
|
||||
<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.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,37 +157,62 @@
|
||||
<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">
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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>
|
||||
@@ -188,27 +223,31 @@
|
||||
</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">Manejo de medicamentos y terapia dialítica</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>
|
||||
@@ -220,35 +259,35 @@
|
||||
<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 bad = CourseNav.createSound("audio/feedback-incorrect.mpeg");
|
||||
const good = CourseNav.createSound("audio/feedback-correct.mpeg");
|
||||
|
||||
$('.btn-comenzar').click(function (e) {
|
||||
$(".btn-comenzar").click(function (e) {
|
||||
e.preventDefault();
|
||||
CourseNav.soundClick();
|
||||
$('#inicio').hide();
|
||||
$('#desarrollo').show();
|
||||
$("#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);
|
||||
});
|
||||
@@ -258,21 +297,25 @@
|
||||
}
|
||||
|
||||
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: 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;
|
||||
@@ -292,7 +335,7 @@
|
||||
const pregunta = questions[questionIndex];
|
||||
const opcionesBarajadas = shuffleArray([...pregunta.opciones]);
|
||||
|
||||
let opcionesHTML = '';
|
||||
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>
|
||||
@@ -301,7 +344,7 @@
|
||||
});
|
||||
|
||||
Swal.fire({
|
||||
target: document.getElementById('wrap-course-content'),
|
||||
target: document.getElementById("wrap-course-content"),
|
||||
html: `
|
||||
<div class="text-center mb-3">
|
||||
<h4 class="fw-bold text-verde-oscuro">${pregunta.pregunta}</h4>
|
||||
@@ -314,22 +357,20 @@
|
||||
showConfirmButton: false,
|
||||
allowOutsideClick: false,
|
||||
customClass: {
|
||||
popup: 'swal-wide bg-white border-0 rounded-3 shadow'
|
||||
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');
|
||||
$(".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'));
|
||||
const puntosActuales = parseInt($("#puntos").text()) + puntos;
|
||||
$("#puntos").text(puntosActuales.toString().padStart(3, "0"));
|
||||
}
|
||||
|
||||
CourseNav.audioController.stopAllSoundsAndPlay(isCorrect ? good : bad);
|
||||
@@ -339,27 +380,30 @@
|
||||
mostrarFeedback(isCorrect, pregunta, questionIndex);
|
||||
}, 200);
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function mostrarFeedback(isCorrect, pregunta, questionIndex) {
|
||||
const retroalimentacion = isCorrect ? pregunta.retroalimentacion_correcta : pregunta.retroalimentacion_incorrecta;
|
||||
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 || '',
|
||||
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'
|
||||
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');
|
||||
$(".btn-question-pop").eq(questionIndex).addClass("completed");
|
||||
currentQuestionIndex++;
|
||||
|
||||
if (currentQuestionIndex >= questions.length) {
|
||||
@@ -367,33 +411,33 @@
|
||||
finalizarJuego();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function finalizarJuego() {
|
||||
const puntosFinal = parseInt($('#puntos').text());
|
||||
const puntosFinal = parseInt($("#puntos").text());
|
||||
const aprobado = puntosFinal >= 1000;
|
||||
|
||||
$('.wrap-course-content').addClass('fake1').removeClass('fake');
|
||||
$(".wrap-course-content").addClass("fake1").removeClass("fake");
|
||||
|
||||
if (aprobado) {
|
||||
CourseNav.setSlideVisited();
|
||||
$('#desarrollo').hide();
|
||||
$('#cierre').show();
|
||||
$("#desarrollo").hide();
|
||||
$("#cierre").show();
|
||||
} else {
|
||||
CourseNav.setSlideVisited();
|
||||
$('.col-reintentar').show();
|
||||
$('#desarrollo').hide();
|
||||
$('#cierre').show();
|
||||
$(".col-reintentar").show();
|
||||
$("#desarrollo").hide();
|
||||
$("#cierre").show();
|
||||
}
|
||||
}
|
||||
|
||||
$('.btn-question-pop').click(function () {
|
||||
$(".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');
|
||||
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);
|
||||
}
|
||||
@@ -404,4 +448,4 @@
|
||||
questions = shuffleArray(procesarPreguntas(hojaDatos));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user