actualizacion de imagenes e actividades
This commit is contained in:
+100
-67
@@ -12,7 +12,7 @@
|
||||
}
|
||||
|
||||
.bg-custom {
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, .5);
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.btn-answer {
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
.content-medidor {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 12px rgba(0, 0, 0, .5);
|
||||
box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
|
||||
border-radius: 40px;
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
grid-template-rows: auto;
|
||||
gap: 0;
|
||||
background: #E7E7E7;
|
||||
background: linear-gradient(to left, #E7E7E7 0%, #C3C3C3 100%);
|
||||
background: #e7e7e7;
|
||||
background: linear-gradient(to left, #e7e7e7 0%, #c3c3c3 100%);
|
||||
border-radius: 40px;
|
||||
}
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
.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%);
|
||||
background: #df0000;
|
||||
background: linear-gradient(to top, #df0000 0%, #4f0700 100%);
|
||||
}
|
||||
|
||||
.med_style:nth-child(2),
|
||||
@@ -118,30 +118,36 @@
|
||||
left: 10px;
|
||||
transition: left 0.5s ease;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class='page-sco py-2 py-md-4 h-100'>
|
||||
<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="page-sco py-2 py-md-4 h-100">
|
||||
<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 mb-2">
|
||||
<h2 class="text-center fw-bold text-primary">Tipos de diálisis peritoneal</h2>
|
||||
<hr class="border border-3 border-verde-oscuro hr-style mx-auto my-0">
|
||||
<hr class="border border-3 border-verde-oscuro hr-style mx-auto my-0" />
|
||||
</div>
|
||||
<div class="col-12 px-0 mb-3">
|
||||
<div class="card bg-white border-0 my-2 rounded-0 bg-custom p-3 text-center">
|
||||
<div class="d-flex justify-content-center align-items-center flex-row">
|
||||
<img src="img/3.1.png" class="img-fluid mx-3">
|
||||
<p class="mb-0"><strong>Instrucciones:</strong> Presiona cada ícono, lee con atención las oraciones que se presentan acerca de los tipos de diálisis y determina si son falsas o verdaderas. <!-- para llenar el medidor de salud del paciente. --></p>
|
||||
<img src="img/3.1.png" class="img-fluid mx-3" />
|
||||
<p class="mb-0">
|
||||
<strong>Instrucciones:</strong> Presiona cada ícono, lee con atención las
|
||||
oraciones que se presentan acerca de los tipos de diálisis y determina si son
|
||||
falsas o verdaderas.
|
||||
<!-- para llenar el medidor de salud del paciente. -->
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="actividad-objects" class="col-12">
|
||||
<div class="row justify-content-center align-items-center">
|
||||
<div class="col-12 text-center mb-5">
|
||||
<div class="content-medidor p-2 d-inline-flex flex-row justify-content-center align-items-center gap-3">
|
||||
<img src="img/07.7.png" class="img-fluid">
|
||||
<div
|
||||
class="content-medidor p-2 d-inline-flex flex-row justify-content-center align-items-center gap-3"
|
||||
>
|
||||
<img src="img/07.7.png" class="img-fluid" />
|
||||
<div class="termometro p-1">
|
||||
<div id="#med0" class="med_style"></div>
|
||||
<div id="#med1" class="med_style"></div>
|
||||
@@ -149,29 +155,47 @@
|
||||
<div id="#med3" class="med_style"></div>
|
||||
<div id="#med4" class="med_style"></div>
|
||||
<div id="#med5" class="med_style"></div>
|
||||
<div id="indicador" class="indicador-med d-flex flex-row justify-content-center align-items-center">
|
||||
<img src="img/07.5.png" class="img-fluid">
|
||||
<div
|
||||
id="indicador"
|
||||
class="indicador-med d-flex flex-row justify-content-center align-items-center"
|
||||
>
|
||||
<img src="img/07.5.png" class="img-fluid" />
|
||||
</div>
|
||||
</div>
|
||||
<img src="img/07.6.png" class="img-fluid">
|
||||
<img src="img/07.6.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/07.4.png" class="img-fluid">
|
||||
<div
|
||||
class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||
data-obj="0"
|
||||
>
|
||||
<img src="img/07.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/07.3.png" class="img-fluid">
|
||||
<div
|
||||
class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||
data-obj="1"
|
||||
>
|
||||
<img src="img/07.3.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/07.2.png" class="img-fluid">
|
||||
<div
|
||||
class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||
data-obj="2"
|
||||
>
|
||||
<img src="img/07.2.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/07.1.png" class="img-fluid">
|
||||
<div
|
||||
class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||
data-obj="3"
|
||||
>
|
||||
<img src="img/07.1.png" class="img-fluid" style="max-width: 223px" />
|
||||
</div>
|
||||
<div class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite" data-obj="4">
|
||||
<img src="img/07.0.png" class="img-fluid">
|
||||
<div
|
||||
class="object-btn text-center d-inline-block animate__animated animate__pulse animate__infinite"
|
||||
data-obj="4"
|
||||
>
|
||||
<img src="img/07.0.png" class="img-fluid" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -188,15 +212,18 @@
|
||||
<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
|
||||
id="txt-answers"
|
||||
class="d-flex flex-row justify-content-center align-items-center gap-3"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pop0">
|
||||
<div class="container-fluid">
|
||||
<div class=" w-100 text-center">
|
||||
<img src="img/3.5.png" class="img-fluid">
|
||||
<div class="w-100 text-center">
|
||||
<img src="img/3.5.png" class="img-fluid" />
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 text-center mb-2">
|
||||
@@ -212,7 +239,7 @@
|
||||
<script>
|
||||
$(function () {
|
||||
"use strict";
|
||||
$('.wrap-course-content').addClass('fake');
|
||||
$(".wrap-course-content").addClass("fake");
|
||||
|
||||
let questions;
|
||||
let currentQuestionIndex = 0;
|
||||
@@ -220,21 +247,21 @@
|
||||
let correctQuestions = 0;
|
||||
let currentObjectBtn;
|
||||
let isCorrectAnswer = false;
|
||||
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");
|
||||
|
||||
const urlExcelFile = 'Actividades_Rotafolio_Vantive.xlsx';
|
||||
const urlExcelFile = "Actividades_Rotafolio_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);
|
||||
});
|
||||
@@ -244,21 +271,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;
|
||||
@@ -273,14 +304,14 @@
|
||||
}
|
||||
|
||||
// Cargar preguntas al inicio
|
||||
readExcelFile(urlExcelFile, function(data) {
|
||||
readExcelFile(urlExcelFile, function (data) {
|
||||
const hojaDatos = data["Diapositiva 7"];
|
||||
questions = procesarPreguntas(hojaDatos);
|
||||
});
|
||||
|
||||
$('.object-btn').click(function (e) {
|
||||
$(".object-btn").click(function (e) {
|
||||
e.preventDefault();
|
||||
if ($(this).hasClass('disabled')) return;
|
||||
if ($(this).hasClass("disabled")) return;
|
||||
CourseNav.soundClick();
|
||||
currentObjectBtn = $(this);
|
||||
if (questions && questions.length > 0) {
|
||||
@@ -296,10 +327,11 @@
|
||||
const html = $("#pops-questions").html();
|
||||
Swal.fire({
|
||||
html: html,
|
||||
target: document.getElementById('wrap-course-content'),
|
||||
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'
|
||||
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,
|
||||
@@ -314,7 +346,7 @@
|
||||
didClose: () => {
|
||||
CourseNav.audioController.stopAudio();
|
||||
if (currentObjectBtn) {
|
||||
currentObjectBtn.addClass('completed disabled');
|
||||
currentObjectBtn.addClass("completed disabled");
|
||||
checkAllCompleted();
|
||||
}
|
||||
},
|
||||
@@ -323,15 +355,15 @@
|
||||
|
||||
function displayQuestion() {
|
||||
const contentSwal = $(Swal.getHtmlContainer());
|
||||
const txtPregunta = contentSwal.find('#txt-question');
|
||||
const txtAnswers = contentSwal.find('#txt-answers');
|
||||
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 = '';
|
||||
let answersHtml = "";
|
||||
shuffledOpciones.forEach((opcion, index) => {
|
||||
answersHtml += `<div class="btn-answer text-white p-2 px-3" data-correct="${opcion.correct}">${opcion.text}</div>`;
|
||||
});
|
||||
@@ -339,9 +371,9 @@
|
||||
txtAnswers.html(answersHtml);
|
||||
|
||||
// Event listener para respuestas
|
||||
contentSwal.find('.btn-answer').click(function() {
|
||||
isCorrectAnswer = $(this).data('correct');
|
||||
$(this).addClass('selected');
|
||||
contentSwal.find(".btn-answer").click(function () {
|
||||
isCorrectAnswer = $(this).data("correct");
|
||||
$(this).addClass("selected");
|
||||
if (isCorrectAnswer) {
|
||||
good.play();
|
||||
correctQuestions++;
|
||||
@@ -354,25 +386,26 @@
|
||||
}
|
||||
|
||||
function moveIndicator() {
|
||||
const positions = ['left: 90px', 'left: 170px', 'left: 250px', 'left: 330px', 'left: 410px'];
|
||||
const positions = ["left: 90px", "left: 170px", "left: 250px", "left: 330px", "left: 410px"];
|
||||
if (correctQuestions <= 5) {
|
||||
$('#indicador').attr('style', positions[correctQuestions - 1]);
|
||||
$("#indicador").attr("style", positions[correctQuestions - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
function checkAllCompleted() {
|
||||
const totalButtons = $('.object-btn').length;
|
||||
const completedButtons = $('.object-btn.completed').length;
|
||||
const totalButtons = $(".object-btn").length;
|
||||
const completedButtons = $(".object-btn.completed").length;
|
||||
|
||||
if (totalButtons === completedButtons) {
|
||||
setTimeout(() => {
|
||||
const html = $("#pop0").html();
|
||||
Swal.fire({
|
||||
html: html,
|
||||
target: document.getElementById('wrap-course-content'),
|
||||
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'
|
||||
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: true,
|
||||
@@ -382,7 +415,7 @@
|
||||
width: "35em",
|
||||
didClose: () => {
|
||||
CourseNav.setSlideVisited();
|
||||
}
|
||||
},
|
||||
});
|
||||
}, 250);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user