<div class="right_col" role="main">

<div class="row">

            <div class="col-md-12 col-sm-12 col-xs-12">

              <div class="x_panel">

                <div class="x_title">

                <h2>Alumnos - Activos</h2>

                <div class="clearfix"></div>

              </div>

              <?php if(count($alumnos)>0): ?>  

                <div class="col-xs-12 col-sm-12 col-lg-12 col-md-12">

                    <form id="formBuscarAlumnos" name="formBuscarAlumnos">

                      <div class="form-group col-md-2 col-sm-2">

                        <select class="form-control col-sm-2 col-md-2" name="periodoEva" id="periodoEva">

                        <option value="0">Período:</option>

                        <?php if(count($periodos)>0): ?>

                          <?php $__currentLoopData = $periodos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $periodos): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                            <option value="<?php echo e($periodos->periodo_cal); ?>"><?php echo e($periodos->periodo_cal); ?></option>

                          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                        <?php endif; ?>

                        

                      </select>

                      </div>



                      <div class="form-group col-md-2 col-sm-2">

                        <select class="form-control" name="carreraEva" id="carreraEva">

                        <option value="0">Carrera:</option>

                        <?php if(count($carreras)>0): ?>

                          <?php $__currentLoopData = $carreras; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $carreras): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                            <option value="<?php echo e($carreras->id_carr); ?>"><?php echo e($carreras->nombre_carr); ?></option>

                          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                        <?php endif; ?>

                      </select>

                      </div>

                      

                      <div class="form-group col-md-2 col-sm-2">

                        <input type="text" size="8" minlength=8" maxlength="8" class="form-control" name="ncontrolEva" id="ncontrolEva" placeholder="No. Control">

                      </div>



                      <div class="form-group col-md-3 col-sm-3">

                        <input class="form-control" type="text" name="nombreEva" id="nombreEva" placeholder="Nombre o Apellidos">

                      </div>



                      <div class="form-group col-md-3 col-sm-3">

                        <button type="button" class="btn btn-limpiar btn-dark btn-xs">

                        <span class='fa fa-remove'></span>Limpiar

                      </button>



                      <button type="button" class="btn btn-buscar btn-primary btn-xs">

                        <span class='fa fa-search'></span>Buscar

                      </button>



                      <button type="button" class="btn btn-reporte btn-turq btn-xs" onclick="javascript:reporte_activos();">

                        <span class='fa fa-download'></span>EXE

                      </button>

                      </div>



                      



                    </form>                    

                  </div>     

              <div class="x_content">



                <div class="container-fluid">            

                             

                    <div class="row encabezado">

                      <div class="col-xs col-sm-1"><p class="text-center">Cancelar</p></div>

                      <div class="col-xs col-sm-1"><p class="text-center">No.</p></div>

                      <div class="col-xs col-sm-2"><p class="text-center">No. control</p></div>

                      <div class="col-xs col-sm-3"><p class="text-center">Nombre</p></div>

                      <div class="col-xs col-sm-2"><p class="text-center">Carrera</p></div>

                      <div class="col-xs col-sm-3"><p class="text-center">Opciones</p></div>

                      <!-- Optional: clear the XS cols if their content doesn't match in height -->

                      <div class="clearfix visible-xs-block"></div>

                    </div>

                    <?php ($numero = 0); ?>

                    <?php $__currentLoopData = $alumnos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $a): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                        <?php ($numero++); ?>

                        <div class="row renglon" id="<?php echo e($a->id_alu); ?>">

                          <div class="col-xs col-sm-1" align="center">

                            <button type="button" id="btnCancelarServicio" class="btn btnCancelarServicio btn-danger btn-xs" data-toggle="modal" data-id1alu="<?php echo e($a->id_alu); ?>" onclick="cancelarServicio(<?php echo e($a->id_alu); ?>);"><span class="fa fa-trash-o"> </span></button>

                          </div>

                          <div class="col-xs col-sm-1 text-center" id="num<?php echo e($numero); ?>"><?php echo e($numero); ?></div>

                          <div class="col-xs col-sm-2" id="ncontrolDiv<?php echo e($a->id_alu); ?>"><?php echo e($a->ncontrol_alu); ?></div>

                          <div class="col-xs col-sm-3" id="nombreDiv<?php echo e($a->id_alu); ?>"><?php echo e($a->nombre_alu); ?> <?php echo e($a->apaterno_alu); ?> <?php echo e($a->amaterno_alu); ?>

                            <?php if($a->solicitud_pendiente || $a->solicitud_rechazada || $a->reportes_pendientes || $a->reportes_rechazados || $a->evaluaciones_pendientes): ?>
                              <br>
                              <?php if($a->solicitud_pendiente): ?>
                                  <span class="badge" style="background-color: deepskyblue;"><?php echo e(1); ?></span> 
                              <?php endif; ?>

                              <?php if($a->solicitud_rechazada): ?> 
                                  <span class="badge" style="background-color: darkorange;"><?php echo e(1); ?></span> 
                              <?php endif; ?>

                              <?php if($a->reportes_pendientes): ?> 
                                <?php if(count($a->reportes_pendientes)>0): ?>
                                  <span class="badge" style="background-color: lightseagreen;"><?php echo e(count($a->reportes_pendientes)); ?></span> 
                                <?php endif; ?>
                              <?php endif; ?>

                              <?php if($a->reportes_rechazados): ?> 
                                <?php if(count($a->reportes_rechazados)>0): ?>
                                  <span class="badge" style="background-color: goldenrod;"><?php echo e(count($a->reportes_rechazados)); ?></span>
                                <?php endif; ?>
                              <?php endif; ?>

                              <?php if($a->evaluaciones_pendientes): ?> 
                                <?php if(count($a->evaluaciones_pendientes)>0): ?>
                                  <span class="badge" style="background-color: orangered;"><?php echo e(count($a->evaluaciones_pendientes)); ?></span> 
                                <?php endif; ?>
                              <?php endif; ?>
                            <?php endif; ?>

                            <?php ($auto_pen = 0); ?>

                            <?php if($a->auto1_alu==0): ?>
                              <?php ($auto_pen++); ?>
                            <?php endif; ?>
                            <?php if($a->auto2_alu==0): ?>
                              <?php ($auto_pen++); ?>
                            <?php endif; ?>
                            <?php if($a->auto3_alu==0): ?>
                              <?php ($auto_pen++); ?>
                            <?php endif; ?>
                            <?php if($a->autofinal_alu==0): ?>
                              <?php ($auto_pen++); ?>
                            <?php endif; ?>

                            <?php if($auto_pen!=0): ?>
                              <span class="badge" style="background-color: darkred;"><?php echo e($auto_pen); ?></span> 
                            <?php endif; ?>
                          </div>

                          <div class="col-xs col-sm-2" id="carreraDiv<?php echo e($a->id_alu); ?>"><?php echo e($a->carrera->nombre_carr); ?></div>

                          <div class="col-xs col-sm-3" align="center">

                            <button type="button" id="btnConsultaAlumno" class="btn btnConsultaAlumno btn-primary btn-xs" data-toggle="modal" data-id1alu="<?php echo e($a->id_alu); ?>" ><span class="fa fa-eye"> </span>Consultar </button>



                            <?php if($a->soli_alu==1 && $a->carta_alu==1 && $a->presentacion_alu==1 && $a->reporte1_alu==1 && $a->reporte2_alu==1 && $a->reporte3_alu==1 && $a->reportefinal_alu==1 && $a->eva1_alu==1 && $a->eva2_alu==1 && $a->eva3_alu==1 && $a->evafinal_alu==1 && $a->auto1_alu==1 && $a->auto2_alu==1 && $a->auto3_alu==1 && $a->autofinal_alu==1): ?>

                              <button type="button" id="btnLiberacionAlumno<?php echo e($a->id_alu); ?>" class="btn btnLiberacionAlumno btn-turq btn-xs" data-toggle="modal" data-id2alu="<?php echo e($a->id_alu); ?>" ><span class="fa fa-file-pdf-o" disabled> </span>Generar Liberación </button>

                            <?php else: ?>

                            <button type="button" id="btnAutorizarAlumno" class="btn btnAutorizarAlumno btn-turq btn-xs" data-toggle="modal" data-id3alu="<?php echo e($a->id_alu); ?>" ><span class="fa fa-edit"> </span>Autorizar </button>

                            <?php endif; ?>

                          </div>

                          <!-- Optional: clear the XS cols if their content doesn't match in height -->

                          <div class="clearfix visible-xs-block"></div>

                        </div>

                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 

                  <?php else: ?>

                    <h4 align="center">No hay alumnos activos.</h4>

                  <?php endif; ?>

                  <div class="col-12">
                    <span class="badge" style="background-color: deepskyblue;">Solicitud pendiente</span>
                    <span class="badge" style="background-color: darkorange;">Solicitud rechazada</span>
                    <span class="badge" style="background-color: lightseagreen;">Reporte pendiente</span>
                    <span class="badge" style="background-color: goldenrod;">Reporte rechazado</span>
                    <span class="badge" style="background-color: orangered;">Evaluación pendiente captura</span>
                    <span class="badge" style="background-color: darkred;">Autoevaluación pendiente</span>
                  </div>

                </div>

              </div>

            </div>            

          </div>      

        </div>

      <!-- /page content -->

      </div>



  <!-- MODAL DE MENSAJES -->

    <div class="modal fade" id="msjModalPrincipal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

      <div class="modal-dialog" role="document">

        <div class="modal-content">

          <div class="modal-header">

            <button type="button" class="close cerrar_modal" data-dismiss="modal" aria-label="Close">

              <span aria-hidden="true">&times;</span>

            </button>

            <h4 class="modal-title" id="miModalLabel">Información</h4>

          </div>

          <div class="modal-body">

              <h5 class="mnsjPrincipal"></h5>



              <div class="modal-footer">

                <button type="button" class="btn btn-dark cerrar_modal" data-dismiss="modal">

                  <span class='fa fa-remove'></span> Cerrar

                </button>

              </div>

          </div>

        </div>

      </div>

    </div>





    <!-- MODAL DE CONSULTA -->

    <div class="modal fade" data-backdrop="static" id="consultaAlumnoModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

      <div class="modal-dialog" role="document">

        <div class="modal-content">

          <div class="modal-header">

            <button type="button" class="close cerrar_modal" data-dismiss="modal" aria-label="Close">

              <span aria-hidden="true">&times;</span>

            </button>

            <h4 class="modal-title" id="miModalLabel">Información</h4>

          </div>

          <div class="modal-body">

            

<form class="form-horizontal" id="formEvaluaciones" role="form">

  

    <div class="form-group">

                <label class="control-label col-sm-2" for="id">ID:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" id="id_con" value="" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Número de Control:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" id="ncontrol_con" value="" disabled>

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Nombre:</label>

                <div class="col-md-10 col-sm-10 col-xs-12">

                  <input type="text" class="form-control" id="nombre_con" value="" disabled>

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Carrera:</label>

                <div class="col-md-10 col-sm-10 col-xs-12">

                  <input type="text" class="form-control" id="carrera_con" value="" disabled="" >

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Correo:</label>

                <div class="col-md-10 col-sm-10 col-xs-12">

                  <input type="text" class="form-control" id="correo_eva" name="correo_eva" value="" readonly="" >

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Password:</label>

                <div class="col-md-10 col-sm-10 col-xs-12">

                  <input type="text" class="form-control" id="password_con" value="" disabled="" >

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Reportes:</label>

                <div id="selectReportesss" class="col-md-10 col-sm-10 col-xs-12">

                  

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Evaluaciones:</label>

                <div id="selectEvaluacionesss" class="col-md-10 col-sm-10 col-xs-12">

                  

                </div>

              </div>          



              <div class="form-group">

                <div id="consultaevaluacion" class="col-md-12 col-sm-12 col-xs-12">

                  

                </div>

              </div>    





</form>

              <div class="modal-footer">

                <button type="button" class="btn btn-warning cerrar_modal" data-dismiss="modal">

                  <span class='fa fa-remove'></span> Cerrar

                </button>

                <label id="botonGuardarEva"></label>

                

              </div>

      </div>

    </div>

  </div>

</div>









<!-- MODAL DE AUTORIZACIÓN -->

    <div class="modal fade" id="autorizarAlumnoModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

      <div class="modal-dialog" role="document">

        <div class="modal-content">

          <div class="modal-header">

            <button type="button" class="close cerrar_modal" data-dismiss="modal" aria-label="Close">

              <span aria-hidden="true">&times;</span>

            </button>

            <h4 class="modal-title" id="miModalLabel">Información</h4>

          </div>

          <div class="modal-body">

            

<form class="form-horizontal" id="formAutorizar" role="form">

  

    <div class="form-group">

                <label class="control-label col-sm-2" for="id">ID:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" id="id_aut" value="" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Número de Control:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="ncontrol_aut" id="ncontrol_aut" readonly="">

                </div>

                <div id="errorNcontrol" style="color: red"></div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Nombre:</label>

                <div class="col-md-10 col-sm-10 col-xs-12">

                  <input type="text" class="form-control" id="nombre_aut" value="" disabled>

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Carrera:</label>

                <div class="col-md-10 col-sm-10 col-xs-12">

                  <input type="text" class="form-control" id="carrera_aut" value="" disabled="" >

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Fecha Actual:</label>

                <div class="col-md-10 col-sm-10 col-xs-12">

                  <input type="date" class="form-control" value="" name="fechaActual" id="fechaActual" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Fecha Termino:</label>

                <div class="col-md-10 col-sm-10 col-xs-12">

                  <input type="date" class="form-control" name="fechaTer" id="fechaTer">

                </div>

                <div id="errorFecha" style="color: red"></div>

              </div>

                    <?php ($c=0); ?>

                    <?php ($i=6); ?>

                    <?php if(count($actividades)>0): ?>



                    <div class="form-group">

                      <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">

                        <label>Actividades:</label>

                      </div>

                      

                      <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">

                    <?php $__currentLoopData = $actividades; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $act): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                          <?php if($act->id_act==2 || $act->id_act==4 || $act->id_act==9 || $act->id_act==10 || $act->id_act==10 || $act->id_act==11 || $act->id_act==12): ?>

                    <input type="checkbox" name="actividad[]" id="actividad[]" value="<?php echo e($act->id_act); ?>"><?php echo e($act->nombre_act); ?><br>

                         

                  <?php endif; ?>

                        <?php if($c==1): ?>

                          </div>

                          <?php ($c=0); ?>

                          <div class="col-lg-<?php echo e($i); ?> col-md-<?php echo e($i); ?> col-sm-<?php echo e($i); ?> col-xs-12">

                        <?php else: ?>

                          <?php ($c++); ?>

                        <?php endif; ?>

                          

                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 

                    </div>

                      <div id="errorActividad" style="color: red"></div>

                    </div>

                    <?php endif; ?>  





</form>

              <div class="modal-footer">

                <button type="button" class="btn btn-warning cerrar_modal" data-dismiss="modal">

                  <span class='fa fa-remove'></span> Cerrar

                </button>


                <button type="button" class="btn btnGuardaAutorizacion btn-success" onclick="javascript:guardarAutorizacion();">

                  <span class='fa fa-edit'></span> Registrar Autorización

                </button>

                

              </div>
              <div id="desglose_autorizaciones" style="display: none;">
                <h4>Desglose de Autorizaciones</h4>
                <table width="100%">
                  <thead>
                    <tr>
                      <th width="50%" class="text-center">Actividad</th>
                      <th width="25%" class="text-center">Fecha Autorización</th>
                      <th width="25%" class="text-center">Fecha Límite</th>
                    </tr>
                  </thead>
                  <tbody id="body_table">

                  </tbody>
                </table>
                
              </div>

      </div>

    </div>

  </div>

</div>



<!-- MODAL DE Liberacion -->

    <div class="modal fade" id="liberacionModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

      <div class="modal-dialog" role="document">

        <div class="modal-content">

          <div class="modal-header">

            <button type="button" class="close cerrar_modal" data-dismiss="modal" aria-label="Close">

              <span aria-hidden="true">&times;</span>

            </button>

            <h4 class="modal-title" id="miModalLabel">Carta de Liberacion Servicio Social</h4>

          </div>

          <div class="modal-body">

            <form class="form-horizontal" name="formLiberacion" id="formLiberacion" role="form">

              <?php echo e(csrf_field()); ?>


              <div class="form-group">

                <label class="control-label col-sm-2" for="id">ID:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="id_mod" id="id_mod" readonly="">

                  <input type="hidden" class="form-control" value="" name="fechaCarta" id="fechaCarta">

                  <input type="hidden" class="form-control" value="" name="periodoAlu" id="periodoAlu">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Número de Control:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="ncontrol_mod" id="ncontrol_mod" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="id">Nombre:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="nombre_mod" id="nombre_mod" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="titular">Dependencia:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="dependencia_mod" id="dependencia_mod" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="titular">Programa:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="programa_mod" id="programa_mod" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="titular">Periodo:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="periodo_mod" id="periodo_mod" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="titular">Calificación:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="calificacion_mod" id="calificacion_mod" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="titular">Nivel de Desempeño:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="nivel_mod" id="nivel_mod" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="titular">Calificación Real:</label>

                <div class="col-sm-10 col-xs-12">

                  <input type="text" class="form-control" name="cali_real" id="cali_real" readonly="">

                </div>

              </div>

              <div class="form-group">

                <label class="control-label col-sm-2" for="domicilio">No. de oficio de carta de liberación:</label>

                <div class="col-sm-10 col-xs-12">

                  <input class="form-control" type="number" name="oficio" id="oficio">

                </div>

              </div>

              <div id="errorOficio" style="color: red"></div>

              

              <div class="modal-footer">

                <button type="button" class="btn btn-warning cerrar_modal" data-dismiss="modal">

                  <span class='fa fa-remove'></span> Cancelar

                </button>

                <button type="button" class="btn btn-generaCartaGuardar btn-success">

                  <span class='fa fa-file-pdf-o'></span> Generar Carta

                </button>

              </div>

            </form>

      </div>

    </div>

  </div>

</div>