update
This commit is contained in:
+31
-31
@@ -28,19 +28,19 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
</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'>
|
||||
<div class='row justify-content-center'>
|
||||
<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">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-10 mb-2">
|
||||
<h2 class="text-center fw-bold text-primary">Cuidados del sitio de salida y complicaciones</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-10 px-0 mb-1 col-instrucciones">
|
||||
<div class="card bg-lila-claro border-0 my-2 rounded-4 bg-custom px-3 py-2 text-center">
|
||||
<div class="d-flex justify-content-center align-items-center flex-row">
|
||||
<img src="img/12.3.png" class="img-fluid mx-3">
|
||||
<img src="img/12.3.png" class="img-fluid mx-3" />
|
||||
<p class="mb-0 text-white text-start">Lee lo que opinan dos doctores sobre los cuidados del sitio de salida y las complicaciones que pueden surgir si no se hacen correctamente. Analiza cuidadosamente sus argumentos y elige quién tiene la razón.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,8 +63,8 @@
|
||||
<div class="d-none">
|
||||
<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">
|
||||
@@ -79,12 +79,12 @@
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
"use strict";
|
||||
'use strict';
|
||||
$('.wrap-course-content').addClass('fake');
|
||||
const feedbackcorrect = CourseNav.createSound('audio/feedback-correct.mpeg');
|
||||
const feedbackincorrect = CourseNav.createSound('audio/feedback-incorrect.mpeg');
|
||||
|
||||
const imgPerso = ['img/12.0.png','img/12.1.png'];
|
||||
const imgPerso = ['img/12.0.png', 'img/12.1.png'];
|
||||
const urlExcelFile = 'Actividades_Rotafolio_Vantive.xlsx';
|
||||
let versusData;
|
||||
let currentQuestionIndex = 0;
|
||||
@@ -96,9 +96,9 @@
|
||||
xhr.onload = function (e) {
|
||||
var arrayBuffer = xhr.response;
|
||||
var data = new Uint8Array(arrayBuffer);
|
||||
var workbook = XLSX.read(data, { type: "array" });
|
||||
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);
|
||||
});
|
||||
@@ -116,10 +116,10 @@
|
||||
}
|
||||
|
||||
function procesarPreguntas(data) {
|
||||
return data.map(fila => ({
|
||||
return data.map((fila) => ({
|
||||
pregunta: fila.pregunta ? String(fila.pregunta).trim() : '',
|
||||
opcion: fila.opcion ? String(fila.opcion).trim() : '',
|
||||
opcion_c: fila.opcion_c ? String(fila.opcion_c).trim() : ''
|
||||
opcion_c: fila.opcion_c ? String(fila.opcion_c).trim() : '',
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
for (let i = 0; i < total; i++) {
|
||||
const circle = $('<div class="indicator-circle"></div>');
|
||||
circle.css({
|
||||
'background-color': i === 0 ? '#2196F3' : '#E0E0E0'
|
||||
'background-color': i === 0 ? '#2196F3' : '#E0E0E0',
|
||||
});
|
||||
circle.attr('data-index', i);
|
||||
container.append(circle);
|
||||
@@ -137,13 +137,13 @@
|
||||
}
|
||||
|
||||
function updateIndicators() {
|
||||
$('.indicator-circle').each(function(index) {
|
||||
$('.indicator-circle').each(function (index) {
|
||||
const $this = $(this);
|
||||
if (index < currentQuestionIndex) {
|
||||
$this.empty();
|
||||
const img = $('<img>').attr({
|
||||
'src': 'img/11.check.png',
|
||||
'style': 'width: 100%; height: 100%;'
|
||||
src: 'img/11.check.png',
|
||||
style: 'width: 100%; height: 100%;',
|
||||
});
|
||||
$this.append(img);
|
||||
} else if (index === currentQuestionIndex) {
|
||||
@@ -177,14 +177,14 @@
|
||||
<div class="btn-respuesta" data-correct="${leftIsCorrect}">
|
||||
<div class="d-flex flex-column justify-content-center align-items-center gap-0">
|
||||
<img src="${shuffledImages[0]}" alt="personaje" style="z-index:1;">
|
||||
<div class="card bg-verde-ceniza border-0 shadow rounded-15 pt-5 px-3 pb-3 text-center text-respuesta text-white" style="margin-top: -60px;">${leftResponse || ''}</div>
|
||||
<div class="card bg-verde-ceniza border-0 shadow rounded-15 pt-5 px-3 pb-3 text-center text-respuesta text-white" style="margin-top: -60px;"><p class="mb-0">${leftResponse || ''}</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="img/12.2.png" class="img-fluid mx-2">
|
||||
<div class="btn-respuesta" data-correct="${!leftIsCorrect}">
|
||||
<div class="d-flex flex-column justify-content-center align-items-center gap-0">
|
||||
<img src="${shuffledImages[1]}" alt="personaje" style="z-index:1;">
|
||||
<div class="card bg-verde-ceniza border-0 shadow rounded-15 pt-5 px-3 pb-3 text-center text-respuesta text-white" style="margin-top: -60px;">${rightResponse || ''}</div>
|
||||
<div class="card bg-verde-ceniza border-0 shadow rounded-15 pt-5 px-3 pb-3 text-center text-respuesta text-white" style="margin-top: -60px;"><p class="mb-0">${rightResponse || ''}</p></div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -196,7 +196,7 @@
|
||||
container.removeClass('animate__animated animate__zoomIn');
|
||||
}, 1000);
|
||||
|
||||
$('.btn-respuesta').click(function() {
|
||||
$('.btn-respuesta').click(function () {
|
||||
const isCorrect = $(this).data('correct');
|
||||
|
||||
if (isCorrect) {
|
||||
@@ -235,31 +235,31 @@
|
||||
|
||||
function checkAllCompleted() {
|
||||
setTimeout(() => {
|
||||
const html = $("#pop0").html();
|
||||
const html = $('#pop0').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'
|
||||
confirmButton: 'btn text-white bg-primary amor fw-semibold animate__animated animate__pulse animate__infinite',
|
||||
},
|
||||
confirmButtonText: "Cerrar",
|
||||
confirmButtonText: 'Cerrar',
|
||||
showConfirmButton: true,
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
backdrop: "rgba(65, 60, 60, .95)",
|
||||
width: "35em",
|
||||
backdrop: 'rgba(65, 60, 60, .95)',
|
||||
width: '35em',
|
||||
didClose: () => {
|
||||
CourseNav.setSlideVisited();
|
||||
$(".card-container2").addClass('disabled');
|
||||
}
|
||||
$('.card-container2').addClass('disabled');
|
||||
},
|
||||
});
|
||||
}, 250);
|
||||
}
|
||||
|
||||
// Cargar datos del Excel
|
||||
readExcelFile(urlExcelFile, function(data) {
|
||||
const hojaDatos = data["Diapositiva 14"];
|
||||
readExcelFile(urlExcelFile, function (data) {
|
||||
const hojaDatos = data['Diapositiva 14'];
|
||||
versusData = procesarPreguntas(hojaDatos);
|
||||
console.log('Datos cargados:', versusData);
|
||||
createIndicators(versusData.length);
|
||||
|
||||
Reference in New Issue
Block a user