Periodo null
This commit is contained in:
@@ -43,12 +43,13 @@ $write = $user->admin || in_array($user->acceso, ['w']);
|
||||
<?php
|
||||
#$carreras = query("SELECT * FROM FS_CARRERA WHERE FACULTAD = :fac AND PERIODO = COALESCE(:per, PERIODO) ORDER BY CARRERA", [":fac" => $user->facultad['facultad_id'], ":per" => $user->periodo], single: false);
|
||||
// repliaction of the query in the database with database class
|
||||
$nivel = $db->where('id', $user->periodo)->getOne('fs_periodo');
|
||||
$carreras = $db
|
||||
$nivel = $user->periodo ? $db->where('id', $user->periodo)->getOne('fs_periodo') : false;
|
||||
|
||||
$carreras = $nivel ? $db
|
||||
->orderBy('carrera')
|
||||
->where('facultad', $nivel['facultad_id'])
|
||||
->where('nivel', $nivel['nivel_id'])
|
||||
->get('fs_carrera', 100, 'id, carrera');
|
||||
->get('fs_carrera', 100, 'id, carrera') : [];
|
||||
|
||||
?>
|
||||
<div class="form-group row">
|
||||
@@ -282,7 +283,7 @@ $write = $user->admin || in_array($user->acceso, ['w']);
|
||||
<div class="form-group row">
|
||||
<label for="editor_salón" class="col-4 col-form-label">Salón</label>
|
||||
<div class="col-6">
|
||||
<input type="text" class="form-control" id="editor_salón" name="salón" placeholder="Salón" maxlength="10" required="required">
|
||||
<input type="text" class="form-control" id="editor_salón" name="salón" placeholder="Salón" maxlength="100" required="required">
|
||||
<div class="invalid-feedback">
|
||||
El salón no puede estar vacío.
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user