CC aplicado
This commit is contained in:
+18
-11
@@ -8,7 +8,7 @@
|
||||
|
||||
.hr-style {
|
||||
opacity: 1;
|
||||
width: 40%;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.btn-respuesta {
|
||||
@@ -41,8 +41,7 @@
|
||||
<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">
|
||||
<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
|
||||
hace correctamente. Analiza cuidadosamente sus argumentos y elige quién tiene la razón.</p>
|
||||
<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>
|
||||
</div>
|
||||
@@ -86,7 +85,7 @@
|
||||
const feedbackincorrect = CourseNav.createSound('audio/feedback-incorrect.mpeg');
|
||||
|
||||
const imgPerso = ['img/12.0.png','img/12.1.png'];
|
||||
const urlExcelFile = 'versus.xlsx';
|
||||
const urlExcelFile = 'Actividades_Rotafolio_Vantive.xlsx';
|
||||
let versusData;
|
||||
let currentQuestionIndex = 0;
|
||||
|
||||
@@ -116,6 +115,14 @@
|
||||
return array;
|
||||
}
|
||||
|
||||
function procesarPreguntas(data) {
|
||||
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() : ''
|
||||
}));
|
||||
}
|
||||
|
||||
function createIndicators(total) {
|
||||
const container = $('.indicadores-avance');
|
||||
container.empty();
|
||||
@@ -164,20 +171,20 @@
|
||||
|
||||
const leftResponse = randomOrder ? responses[0] : responses[1];
|
||||
const rightResponse = randomOrder ? responses[1] : responses[0];
|
||||
const leftIsCorrect = randomOrder ? true : false; // opcion_c es la correcta
|
||||
const leftIsCorrect = randomOrder ? false : true; // opcion_c es la correcta
|
||||
|
||||
const structure = `
|
||||
<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">
|
||||
<div class="card bg-verde-ceniza border-0 shadow rounded-15 pt-5 px-3 pb-3 text-center text-respuesta text-white">${leftResponse || ''}</div>
|
||||
<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>
|
||||
</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">
|
||||
<div class="card bg-verde-ceniza border-0 shadow rounded-15 pt-5 px-3 pb-3 text-center text-respuesta text-white">${rightResponse || ''}</div>
|
||||
<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>
|
||||
</div>
|
||||
`;
|
||||
@@ -252,8 +259,8 @@
|
||||
|
||||
// Cargar datos del Excel
|
||||
readExcelFile(urlExcelFile, function(data) {
|
||||
const sheetData = data[Object.keys(data)[0]];
|
||||
versusData = sheetData;
|
||||
const hojaDatos = data["Diapositiva 14"];
|
||||
versusData = procesarPreguntas(hojaDatos);
|
||||
console.log('Datos cargados:', versusData);
|
||||
createIndicators(versusData.length);
|
||||
createVersusStructure();
|
||||
|
||||
Reference in New Issue
Block a user