Compare commits
5 Commits
estado_partidas
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7661343572 | |||
| e97586b033 | |||
| 42cc1489e9 | |||
| a694f19667 | |||
| 3cc0dfb122 |
+2
-2
@@ -82,8 +82,8 @@
|
||||
<div class="modal-content modal-kahoot text-center p-3">
|
||||
<div class="modal-body">
|
||||
<div class="mb-3 fs-1">⚠️</div>
|
||||
<h4 class="modal-title mb-2 fw-bold text-white" id="modalAbandonarSalaLabel">¿Abandonar la sala?</h4>
|
||||
<p class="text-white-50">Si sales de la sala, perderás tu lugar en el equipo.</p>
|
||||
<h4 class="modal-title mb-2 fw-bold" id="modalAbandonarSalaLabel">¿Abandonar la sala?</h4>
|
||||
<p class="text-dark-50">Si sales de la sala, perderás tu lugar en el equipo.</p>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-center border-0 gap-2">
|
||||
<button type="button" class="btn btn-secondary px-4 py-2" data-bs-dismiss="modal">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
<?php
|
||||
require_once __DIR__ . '/../includes/conexionBD.php';
|
||||
|
||||
@@ -466,4 +467,25 @@ class Partida
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
public function contar()
|
||||
{
|
||||
$conexion = conexionBD();
|
||||
if (is_array($conexion)) {
|
||||
return $conexion;
|
||||
}
|
||||
try {
|
||||
$sql="SELECT COUNT(*) AS total FROM partida";
|
||||
$consulta = $conexion->prepare($sql);
|
||||
$consulta->execute();
|
||||
return (int) $consulta->fetchColumn();
|
||||
} catch (PDOException $error) {
|
||||
return [
|
||||
"error" => "Ocurrió un error al obtener el listado.",
|
||||
'error_tecnico' => $error->getMessage()
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
<?php
|
||||
require_once __DIR__ . '/../includes/conexionBD.php';
|
||||
|
||||
@@ -110,4 +111,22 @@ class Pregunta {
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
public static function getTodosIds()//devuelve solamente los id de todas las preguntas
|
||||
{
|
||||
$conexion = conexionBD();
|
||||
if (is_array($conexion)) {
|
||||
return $conexion;
|
||||
}
|
||||
try {
|
||||
$consulta = $conexion->prepare("SELECT idPregunta FROM pregunta");
|
||||
$consulta->execute();
|
||||
return $consulta->fetchAll(PDO::FETCH_COLUMN);
|
||||
} catch (PDOException $error) {
|
||||
return [
|
||||
"error" => "Ocurrió un error al obtener el listado.",
|
||||
'error_tecnico' => $error->getMessage()
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ require_once '../clases/ClasePartida.php';
|
||||
require_once '../clases/ClaseEquipo.php';
|
||||
require_once '../clases/ClaseEquipoxUsuario.php';
|
||||
require_once '../clases/ClaseEquipoxPartida.php';
|
||||
require_once '../clases/ClasePregunta.php';
|
||||
|
||||
|
||||
switch ($_POST['orden']) {
|
||||
@@ -119,6 +120,7 @@ switch ($_POST['orden']) {
|
||||
}
|
||||
|
||||
$idPartida = (int)$resultadoPartida['exito_tecnico'];
|
||||
$partida->idPartida = $idPartida;
|
||||
|
||||
|
||||
/*
|
||||
@@ -211,6 +213,42 @@ switch ($_POST['orden']) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ==========================================
|
||||
* 5. ASIGNAMOS 10 PREGUNTAS ALEATORIAS A LA PARTIDA
|
||||
* ==========================================
|
||||
*/
|
||||
|
||||
// Obtenemos todos los IDs de las preguntas
|
||||
|
||||
$listaPreguntas = Pregunta::getTodosIds();
|
||||
|
||||
$totalPreguntas = count($listaPreguntas);
|
||||
|
||||
// Guardamos las preguntas que ya hemos asignado
|
||||
$preguntasAsignadas = [];
|
||||
|
||||
// Generamos 10 posiciones aleatorias sin repetir
|
||||
while (count($preguntasAsignadas) < 10) {
|
||||
|
||||
// Generamos una posición aleatoria del array
|
||||
$posicionAleatoria = rand(0, $totalPreguntas - 1);
|
||||
|
||||
// Obtenemos el ID real de la pregunta
|
||||
$idPreguntaAleatoria = $listaPreguntas[$posicionAleatoria];
|
||||
|
||||
// Comprobamos que esa pregunta no haya sido asignada ya
|
||||
if (!in_array($idPreguntaAleatoria, $preguntasAsignadas)) {
|
||||
$preguntasAsignadas[] = $idPreguntaAleatoria;
|
||||
|
||||
// Asignamos el ID real de la pregunta a la partida
|
||||
$partida->asignarPregunta($idPreguntaAleatoria);
|
||||
}
|
||||
}//fin shile
|
||||
|
||||
|
||||
/*
|
||||
* ==========================================
|
||||
* TODO CORRECTO
|
||||
@@ -218,7 +256,7 @@ switch ($_POST['orden']) {
|
||||
*/
|
||||
|
||||
echo json_encode([
|
||||
'exito' => 'Sala creada correctamente.',
|
||||
'exito' => 'Sala creada correctamente. Preguntas preparadas.',
|
||||
'idPartida' => $resultadoPartida['exito_tecnico'],
|
||||
'idEquipo1' => $equipo1->idEquipo,
|
||||
'idEquipo2' => $equipo2->idEquipo
|
||||
|
||||
@@ -55,10 +55,11 @@ switch ($_POST['orden']) {
|
||||
|
||||
if ($resultado instanceof Usuario) {
|
||||
|
||||
// === AÑADIR ESTAS LÍNEAS PARA GUARDAR EN SESIÓN ===
|
||||
// === GUARDAR EN SESIÓN (incluido avatar)===
|
||||
$_SESSION['idUsuario'] = $resultado->getIdUsuario();
|
||||
$_SESSION['nombreUsuario'] = $resultado->getNombreUsuario();
|
||||
$_SESSION['email'] = $resultado->getEmail();
|
||||
$_SESSION['avatar'] = $resultado->getAvatar();
|
||||
// =================================================
|
||||
|
||||
echo json_encode([
|
||||
@@ -83,6 +84,7 @@ switch ($_POST['orden']) {
|
||||
unset($_SESSION['idUsuario']);
|
||||
unset($_SESSION['email']);
|
||||
unset($_SESSION['nombreUsuario']);
|
||||
unset($_SESSION['avatar']);
|
||||
|
||||
// Destruimos la sesión
|
||||
session_destroy();
|
||||
@@ -92,7 +94,6 @@ switch ($_POST['orden']) {
|
||||
]);
|
||||
|
||||
break;
|
||||
|
||||
case 'mostrarEstadisticas':
|
||||
|
||||
$usuario = Usuario::buscarPorId($_SESSION['idUsuario']);
|
||||
@@ -242,7 +243,8 @@ switch ($_POST['orden']) {
|
||||
'activa' => true,
|
||||
'usuario' => [
|
||||
'idUsuario' => $_SESSION['idUsuario'],
|
||||
'nombreUsuario' => $_SESSION['nombreUsuario'] ?? ''
|
||||
'nombreUsuario' => $_SESSION['nombreUsuario'] ?? '',
|
||||
'avatar' => $_SESSION['avatar'] ?? ''
|
||||
]
|
||||
]);
|
||||
} else {
|
||||
|
||||
+10
-2
@@ -68,8 +68,8 @@
|
||||
|
||||
.btn-unirse {
|
||||
border: none;
|
||||
border-bottom: 3px solid #0c4891;
|
||||
background-color: var(--kahoot-blue);
|
||||
border-bottom: 3px solid #1f6f09;
|
||||
background-color: #26890c;
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
border-radius: 8px;
|
||||
@@ -105,3 +105,11 @@
|
||||
border-color: var(--kahoot-purple);
|
||||
box-shadow: 0 0 0 3px rgba(70, 23, 143, 0.15);
|
||||
}
|
||||
|
||||
.jugador-host {
|
||||
background-color: #fff3cd;
|
||||
border: 1px solid #ffc107;
|
||||
border-radius: 8px;
|
||||
padding: 6px 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
+44
-13
@@ -123,11 +123,23 @@ function mostrarSala(partida, equipos, jugadores) {
|
||||
let jugadoresHTML = "";
|
||||
if (jugadoresEquipo.length > 0) {
|
||||
jugadoresEquipo.forEach(function (jugador) {
|
||||
const esHost = jugador.idUsuario == partida.idUsuario;
|
||||
|
||||
jugadoresHTML += `
|
||||
<div class="jugador">
|
||||
<span class="avatar">👤</span>
|
||||
<div class="jugador border border-2 d-flex align-items-center justify-content-between ${
|
||||
esHost ? "jugador-host" : ""
|
||||
}">
|
||||
<div>
|
||||
<span class="avatar">${esHost ? "👑" : "👤"}</span>
|
||||
${escapeHTML(jugador.nombreUsuario)}
|
||||
</div>
|
||||
|
||||
${
|
||||
esHost
|
||||
? `<span class="badge bg-warning text-dark ms-2">HOST</span>`
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
} else {
|
||||
@@ -138,7 +150,7 @@ function mostrarSala(partida, equipos, jugadores) {
|
||||
let botonUnirseHTML = "";
|
||||
if (!usuarioYaEstaEnEquipo) {
|
||||
botonUnirseHTML = `
|
||||
<button type="button" class="btn btn-unirse w-100 btn-unirse-equipo mt-2"
|
||||
<button type="button" class="btn-unirse w-100 btn-unirse-equipo mt-2"
|
||||
data-id-partida="${partida.idPartida}"
|
||||
data-id-equipo="${equipo.idEquipo}">
|
||||
Unirse
|
||||
@@ -157,17 +169,34 @@ function mostrarSala(partida, equipos, jugadores) {
|
||||
`;
|
||||
});
|
||||
|
||||
// Acciones disponibles si el usuario YA ESTÁ dentro de esta sala
|
||||
// Acciones disponibles si el usuario YA ESTÁ dentro de esta sala
|
||||
let accionesSalaHTML = "";
|
||||
|
||||
if (usuarioYaEstaEnEquipo) {
|
||||
accionesSalaHTML = `
|
||||
<div class="sala-acciones text-center mt-4 pt-3 border-top d-flex justify-content-center gap-3">
|
||||
<button type="button" class="btn btn-outline-danger btn-abandonar-sala" data-id-partida="${partida.idPartida}">
|
||||
Abandonar sala
|
||||
</button>
|
||||
<a href="juego.php?idPartida=${partida.idPartida}" class="btn btn-success btn-lg px-4">
|
||||
let botonIniciarHTML = "";
|
||||
|
||||
// Solo el host puede iniciar la partida
|
||||
if (partida.idUsuario == idUsuarioSesion) {
|
||||
botonIniciarHTML = `
|
||||
<a href="juego.php?idPartida=${partida.idPartida}"
|
||||
class="btn btn-success btn-lg px-4">
|
||||
🎮 ¡Iniciar Partida!
|
||||
</a>
|
||||
`;
|
||||
}
|
||||
|
||||
accionesSalaHTML = `
|
||||
<div class="sala-acciones text-center mt-4 pt-3 border-top d-flex justify-content-center gap-3">
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-outline-danger btn-abandonar-sala"
|
||||
data-id-partida="${partida.idPartida}">
|
||||
Abandonar sala
|
||||
</button>
|
||||
|
||||
${botonIniciarHTML}
|
||||
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
@@ -175,7 +204,7 @@ function mostrarSala(partida, equipos, jugadores) {
|
||||
const salaHTML = `
|
||||
<div class="col-12 col-md-10 col-lg-8">
|
||||
<div class="sala card p-3 shadow-sm mb-4">
|
||||
<div class="sala-header h4 text-center mb-3">
|
||||
<div class="sala-header h4 text-center mb-3 text-white">
|
||||
${escapeHTML(partida.nombrePartida)}
|
||||
</div>
|
||||
<div class="sala-body">
|
||||
@@ -234,13 +263,15 @@ let botonAbandonarReferencia = null;
|
||||
// A. Al hacer clic en el botón "Abandonar sala" de la tarjeta, abrimos el modal
|
||||
$(document).on("click", ".btn-abandonar-sala", function () {
|
||||
botonAbandonarReferencia = $(this);
|
||||
const modal = new bootstrap.Modal(document.getElementById('modalAbandonarSala'));
|
||||
const modal = new bootstrap.Modal(
|
||||
document.getElementById("modalAbandonarSala"),
|
||||
);
|
||||
modal.show();
|
||||
});
|
||||
|
||||
// B. Al hacer clic en "Sí, salir" dentro del modal Kahoot
|
||||
$(document).on("click", "#btnConfirmarAbandonar", function () {
|
||||
const modalEl = document.getElementById('modalAbandonarSala');
|
||||
const modalEl = document.getElementById("modalAbandonarSala");
|
||||
const modalInstance = bootstrap.Modal.getInstance(modalEl);
|
||||
|
||||
const btnConfirmar = $(this);
|
||||
@@ -275,7 +306,7 @@ $(document).on("click", "#btnConfirmarAbandonar", function () {
|
||||
if (modalInstance) {
|
||||
modalInstance.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
// 8. Evento: Crear Sala
|
||||
|
||||
+18
-17
@@ -1,3 +1,5 @@
|
||||
let idUsuarioSesion = null;
|
||||
|
||||
$(document).ready(function () {
|
||||
// Comprobar la sesión activa al cargar la página
|
||||
comprobarEstadoSesion();
|
||||
@@ -26,7 +28,7 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
/**
|
||||
* Comprueba con el servidor si existe una sesión PHP activa.
|
||||
* Comprueba con el servidor si existe una sesión PHP
|
||||
*/
|
||||
function comprobarEstadoSesion() {
|
||||
$.ajax({
|
||||
@@ -36,8 +38,8 @@ function comprobarEstadoSesion() {
|
||||
data: { orden: 'comprobarSesion' },
|
||||
success: function (respuesta) {
|
||||
if (respuesta.activa) {
|
||||
idUsuarioSesion = respuesta.usuario.idUsuario;
|
||||
renderizarCabeceraConSesion(respuesta.usuario);
|
||||
// Si existe el contenedor del botón Jugar en index, lo mostramos
|
||||
$('#colBotonJugar').removeClass('d-none');
|
||||
} else {
|
||||
renderizarCabeceraSinSesion();
|
||||
@@ -79,13 +81,8 @@ function ejecutarLogin() {
|
||||
$('#modalLogin').modal('hide');
|
||||
$('#formLogin')[0].reset();
|
||||
|
||||
renderizarCabeceraConSesion({
|
||||
idUsuario: respuesta.idUsuario,
|
||||
nombreUsuario: respuesta.nombreUsuario,
|
||||
avatar: respuesta.avatar
|
||||
});
|
||||
|
||||
$('#colBotonJugar').removeClass('d-none');
|
||||
// Cargar datos de la sesión actualizados
|
||||
comprobarEstadoSesion();
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
@@ -132,7 +129,7 @@ function ejecutarRegistro() {
|
||||
$('#modalRegistro').modal('hide');
|
||||
$('#formRegistro')[0].reset();
|
||||
|
||||
// Autologin
|
||||
// Autologin tras registrarse
|
||||
$('#loginEmail').val(email);
|
||||
$('#loginPassword').val(pass);
|
||||
ejecutarLogin();
|
||||
@@ -165,15 +162,21 @@ function cerrarSesion() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Renderiza la cabecera cuando HAY sesión iniciada (Menú Perfil + Avatar)
|
||||
* Renderiza la cabecera cuando HAY sesión iniciada
|
||||
*/
|
||||
function renderizarCabeceraConSesion(usuario) {
|
||||
let avatarImg = usuario.avatar ? usuario.avatar : 'img/avatars/defaultProfile.jpeg';
|
||||
//Mete el avatar en cabecera
|
||||
let avatarImg = (usuario.avatar && usuario.avatar !== '')
|
||||
? usuario.avatar
|
||||
: 'img/avatars/defaultProfile.jpeg';
|
||||
|
||||
// Refrescar avatar si se cambia
|
||||
let avatarConCacheBuster = avatarImg + '?v=' + new Date().getTime();
|
||||
|
||||
let html = `
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-outline-light dropdown-toggle d-flex align-items-center gap-2 rounded-pill px-3 py-1 fw-bold" type="button" id="userMenu" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<img src="${avatarImg}" alt="Avatar" class="rounded-circle border" style="width: 32px; height: 32px; object-fit: cover;">
|
||||
<img src="${avatarConCacheBuster}" alt="Avatar" class="rounded-circle border" style="width: 32px; height: 32px; object-fit: cover;">
|
||||
<span>${escapeHtml(usuario.nombreUsuario)}</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end shadow border-0 mt-2" aria-labelledby="userMenu">
|
||||
@@ -195,13 +198,11 @@ function renderizarCabeceraConSesion(usuario) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Renderiza los botones originales:
|
||||
* - "Iniciar Sesión" (Rojo -> btn-danger)
|
||||
* - "Registrarse" (Verde -> btn-success)
|
||||
* Renderiza los botones en la cabecera cuando NO hay sesión (Iniciar sesión azul)
|
||||
*/
|
||||
function renderizarCabeceraSinSesion() {
|
||||
let html = `
|
||||
<button class="btn btn-danger rounded-pill px-4 fw-bold shadow-sm" data-bs-toggle="modal" data-bs-target="#modalLogin">
|
||||
<button class="btn btn-primary rounded-pill px-4 fw-bold shadow-sm" data-bs-toggle="modal" data-bs-target="#modalLogin">
|
||||
<i class="fa-solid fa-right-to-bracket me-1"></i> Iniciar sesión
|
||||
</button>
|
||||
<button class="btn btn-success rounded-pill px-4 fw-bold shadow-sm" data-bs-toggle="modal" data-bs-target="#modalRegistro">
|
||||
|
||||
+20
-27
@@ -26,6 +26,10 @@ $.ajax({
|
||||
function cambiarNombre() {
|
||||
let nuevoNombre = $("#nuevoNombre").val().trim();
|
||||
|
||||
if (nuevoNombre === "") {
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "controladores/controladorUsuario.php",
|
||||
@@ -42,8 +46,13 @@ function cambiarNombre() {
|
||||
// Actualizamos el nombre mostrado en la página
|
||||
$("#nombre").text(respuesta.nombreUsuario);
|
||||
|
||||
// Limpiamos el input
|
||||
|
||||
$("#nuevoNombre").val("");
|
||||
|
||||
|
||||
if (typeof comprobarEstadoSesion === "function") {
|
||||
comprobarEstadoSesion();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -74,14 +83,11 @@ $("#inputFoto").change(function () {
|
||||
// Comprobamos que sea una imagen
|
||||
if (!archivo.type.startsWith("image/")) {
|
||||
alert("El archivo seleccionado no es una imagen.");
|
||||
|
||||
$("#inputFoto").val("");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
let datos = new FormData();
|
||||
|
||||
datos.append("avatar", archivo);
|
||||
datos.append("orden", "cambiarAvatar");
|
||||
|
||||
@@ -97,18 +103,23 @@ $("#inputFoto").change(function () {
|
||||
if (respuesta.error) {
|
||||
alert(respuesta.error);
|
||||
} else {
|
||||
// Actualizamos la imagen sin recargar la página
|
||||
// Actualizamos la imagen en la página de perfil sin recargar
|
||||
$("#fotoPerfil").attr(
|
||||
"src",
|
||||
respuesta.avatar + "?t=" + new Date().getTime(),
|
||||
respuesta.avatar + "?t=" + new Date().getTime()
|
||||
);
|
||||
|
||||
// Actualizamos también el avatar superior en la cabecera
|
||||
if (typeof comprobarEstadoSesion === "function") {
|
||||
comprobarEstadoSesion();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// =========================
|
||||
// RECOGER CATEGORIAS
|
||||
// ====
|
||||
// =========================
|
||||
|
||||
$("#modalCrearPregunta").on("show.bs.modal", function () {
|
||||
const selectCategoria = $("#idCategoria");
|
||||
@@ -141,16 +152,14 @@ $("#modalCrearPregunta").on("show.bs.modal", function () {
|
||||
$("<option>", {
|
||||
value: categoria.idCategoria,
|
||||
text: categoria.nombreCategoria,
|
||||
}),
|
||||
})
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
error: function (xhr, status, error) {
|
||||
console.error("Error al cargar las categorías:", error);
|
||||
|
||||
console.error("Respuesta del servidor:", xhr.responseText);
|
||||
|
||||
alert("No se han podido cargar las categorías.");
|
||||
},
|
||||
});
|
||||
@@ -158,7 +167,7 @@ $("#modalCrearPregunta").on("show.bs.modal", function () {
|
||||
|
||||
// =========================
|
||||
// CREAR PREGUNTA
|
||||
// ====
|
||||
// =========================
|
||||
|
||||
$("#formCrearPregunta").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
@@ -188,24 +197,15 @@ $("#formCrearPregunta").on("submit", function (e) {
|
||||
|
||||
$.ajax({
|
||||
url: "controladores/controladorPregunta.php",
|
||||
|
||||
type: "POST",
|
||||
|
||||
dataType: "json",
|
||||
|
||||
data: {
|
||||
orden: "crearPregunta",
|
||||
|
||||
idCategoria: $("#idCategoria").val(),
|
||||
|
||||
nombrePregunta: pregunta,
|
||||
|
||||
respuestaCorrecta: respuestaCorrecta,
|
||||
|
||||
respuestaIncorrecta1: respuestaIncorrecta1,
|
||||
|
||||
respuestaIncorrecta2: respuestaIncorrecta2,
|
||||
|
||||
respuestaIncorrecta3: respuestaIncorrecta3,
|
||||
},
|
||||
|
||||
@@ -214,10 +214,8 @@ $("#formCrearPregunta").on("submit", function (e) {
|
||||
|
||||
if (respuesta.error) {
|
||||
alert(respuesta.error);
|
||||
|
||||
boton.prop("disabled", false);
|
||||
boton.text("Crear pregunta");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -233,17 +231,12 @@ $("#formCrearPregunta").on("submit", function (e) {
|
||||
// Volvemos a activar el botón
|
||||
boton.prop("disabled", false);
|
||||
boton.text("Crear pregunta");
|
||||
|
||||
// Si tienes que actualizar la lista de preguntas:
|
||||
// cargarPreguntas();
|
||||
}
|
||||
},
|
||||
|
||||
error: function (xhr, status, error) {
|
||||
console.error("Error al crear la pregunta:", error);
|
||||
|
||||
console.error("Respuesta del servidor:", xhr.responseText);
|
||||
|
||||
alert("No se ha podido crear la pregunta.");
|
||||
|
||||
boton.prop("disabled", false);
|
||||
|
||||
Reference in New Issue
Block a user