Ultimas actividades
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user