Correción horarios
This commit is contained in:
@@ -55,7 +55,7 @@ try {
|
||||
$RelevantColumns = implode(', ', $relevant_columns);
|
||||
|
||||
$_SESSION['fecha_inicio'] = $_GET['fecha'] ?? $_GET['fecha_inicio'] ?? date('Y-m-d');
|
||||
$_SESSION['fecha_fin'] = date('Y-m-d H:i:s', strtotime($baseDate ?? 'now'));
|
||||
$_SESSION['fecha_fin'] = date('Y-m-d 23:59:59', strtotime($baseDate ?? 'now'));
|
||||
|
||||
$fechas = [
|
||||
'fecha_inicio' => $_SESSION['fecha_inicio'],
|
||||
@@ -110,7 +110,7 @@ try {
|
||||
CASE
|
||||
WHEN registro.registro_retardo THEN 'warning'
|
||||
ELSE 'primary'
|
||||
END AS color
|
||||
END AS color,
|
||||
FROM horario
|
||||
JOIN fechas USING (horario_id)
|
||||
JOIN profesor USING (profesor_id)
|
||||
|
||||
@@ -25,13 +25,13 @@ try {
|
||||
:registro_fecha_ideal as registro_fecha_ideal,
|
||||
horario_hora,
|
||||
horario_fin,
|
||||
profesor_nombre,
|
||||
COALESCE(materia_asignacion.materia_asignacion_profesor, profesor.profesor_nombre) AS profesor_nombre,
|
||||
profesor_correo,
|
||||
profesor_clave,
|
||||
horario.facultad_id,
|
||||
materia_nombre as materia,
|
||||
COALESCE(materia_asignacion.materia_asignacion_materia, materia.materia_nombre) AS materia,
|
||||
facultad_nombre as facultad,
|
||||
carrera_nombre as carrera,
|
||||
COALESCE(materia_asignacion.materia_asignacion_carrera, carrera.carrera_nombre) AS carrera,
|
||||
registro_fecha,
|
||||
registro_fecha_supervisor,
|
||||
estado_color,
|
||||
@@ -49,11 +49,15 @@ try {
|
||||
ELSE 'primary'
|
||||
END AS color
|
||||
FROM horario
|
||||
NATURAL JOIN facultad
|
||||
NATURAL JOIN materia
|
||||
NATURAL JOIN carrera
|
||||
NATURAL JOIN horario_profesor
|
||||
NATURAL JOIN profesor
|
||||
JOIN facultad ON facultad.facultad_id = COALESCE(horario.facultad_id, 0)
|
||||
|
||||
LEFT JOIN materia USING (MATERIA_ID)
|
||||
LEFT JOIN carrera USING (carrera_id)
|
||||
|
||||
LEFT JOIN materia_asignacion USING (horario_id)
|
||||
|
||||
LEFT JOIN registro ON
|
||||
REGISTRO.HORARIO_ID = HORARIO.HORARIO_ID AND
|
||||
REGISTRO.PROFESOR_ID = HORARIO_PROFESOR.PROFESOR_ID AND
|
||||
|
||||
@@ -33,11 +33,11 @@ $data = $db->query(
|
||||
SELECT
|
||||
fechas.registro_fecha_ideal,
|
||||
profesor_clave,
|
||||
profesor_nombre,
|
||||
COALESCE(materia_asignacion.materia_asignacion_profesor, profesor.profesor_nombre) AS profesor_nombre,
|
||||
profesor_correo,
|
||||
facultad_nombre,
|
||||
materia_nombre,
|
||||
carrera_nombre,
|
||||
COALESCE(materia_asignacion.materia_asignacion_materia, materia.materia_nombre) AS materia_nombre,
|
||||
COALESCE(materia_asignacion.materia_asignacion_carrera, carrera.carrera_nombre) AS carrera_nombre,
|
||||
horario_grupo,
|
||||
horario_hora,
|
||||
horario_fin,
|
||||
@@ -57,9 +57,11 @@ $data = $db->query(
|
||||
NATURAL JOIN profesor
|
||||
NATURAL JOIN salon_view_mat
|
||||
|
||||
NATURAL JOIN facultad
|
||||
NATURAL JOIN materia
|
||||
NATURAL JOIN carrera
|
||||
JOIN facultad ON facultad.facultad_id = COALESCE(horario.facultad_id, 0)
|
||||
LEFT JOIN materia USING (MATERIA_ID)
|
||||
LEFT JOIN carrera USING (carrera_id)
|
||||
|
||||
LEFT JOIN materia_asignacion USING (horario_id)
|
||||
|
||||
LEFT JOIN REGISTRO USING (profesor_id, registro_fecha_ideal, horario_id)
|
||||
LEFT JOIN usuario ON usuario.usuario_id = REGISTRO.supervisor_id
|
||||
|
||||
@@ -32,12 +32,13 @@ if($user->jefe_carrera){
|
||||
JOIN HORARIO_VIEW USING (MATERIA_ID)
|
||||
JOIN HORARIO_PROFESOR USING (HORARIO_ID)
|
||||
JOIN PROFESOR USING (PROFESOR_ID)
|
||||
WHERE USUARIO_ID = :usr', [':usr' => $user->user["id"]]);
|
||||
WHERE USUARIO_ID = :usr
|
||||
ORDER BY PROFESOR.PROFESOR_NOMBRE asc', [':usr' => $user->user["id"]]);
|
||||
}else{
|
||||
$prof_rs = $db->query('SELECT DISTINCT PROFESOR.* FROM PROFESOR
|
||||
JOIN horario_profesor USING (profesor_id)
|
||||
JOIN HORARIO_VIEW USING (horario_id)
|
||||
WHERE FACULTAD_ID = :fac ORDER BY profesor.profesor_nombre', [':fac' => $user->facultad["facultad_id"]]);
|
||||
WHERE FACULTAD_ID = :fac ORDER BY profesor.profesor_nombre asc', [':fac' => $user->facultad["facultad_id"]]);
|
||||
}
|
||||
|
||||
//Duraciones
|
||||
|
||||
@@ -168,7 +168,7 @@ function duracionMinutos($fechahora_i, $fechahora_f){
|
||||
<?php /*if($user->periodo_id!= ""){ */ ?>
|
||||
<form action="solicitudes_autorizar.php" id="asistencia" method="post" onsubmit="return validaFechas()">
|
||||
<div class="form-box">
|
||||
<input type="hidden" name="facultad" value="5">
|
||||
<input type="hidden" name="facultad" value="<?php echo $user->facultad["facultad_id"];?>">
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="filtro_inicial" class="col-4 col-form-label">Fecha inicial</label>
|
||||
|
||||
Reference in New Issue
Block a user