Fix student selection announcement and data structure
This commit is contained in:
@@ -177,7 +177,7 @@ switch ($_GET["action"]) {
|
||||
function seleccionarAlumno(element, nombre) {
|
||||
element.style.backgroundColor = "#9cff9f"; // Verde
|
||||
announceAndMaybeRedirect(
|
||||
"¡Hola " + nombre + "!",
|
||||
"¡Hola " + nombre['n'] + "!",
|
||||
"/entreaulas/paneldiario.php?aulario=<?php echo urlencode($_GET['aulario'] ?? ''); ?>",
|
||||
true
|
||||
);
|
||||
@@ -204,7 +204,7 @@ switch ($_GET["action"]) {
|
||||
$photo_path = $alumno_path . "/photo.jpg";
|
||||
$photo_exists = file_exists($photo_path);
|
||||
?>
|
||||
<a href="#" class="card grid-item" style="color: black;" onclick="seleccionarAlumno(this, <?php echo json_encode($alumno_name, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>);" aria-label="Seleccionar alumno <?php echo htmlspecialchars($alumno_name); ?>">
|
||||
<a href="#" class="card grid-item" style="color: black;" onclick="seleccionarAlumno(this, <?php echo json_encode(['n' => $alumno_name]); ?>);" aria-label="Seleccionar alumno <?php echo htmlspecialchars($alumno_name); ?>">
|
||||
<?php if ($photo_exists): ?>
|
||||
<img src="_filefetch.php?type=alumno_photo&alumno=<?php echo urlencode($alumno_name); ?>¢ro=<?php echo urlencode($centro_id); ?>&aulario=<?php echo urlencode($aulario_id); ?>" height="150" class="bg-white" alt="Foto de <?php echo htmlspecialchars($alumno_name); ?>">
|
||||
<?php else: ?>
|
||||
|
||||
Reference in New Issue
Block a user