Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Persona..

Decoded Output download

<?php 
 
 namespace App\Http\Controllers; 
 use Illuminate\Http\Request; 
 use App\Persona; 
 use App\Alumno; 
 use App\Pensum; 
 use App\Programaciones; 
 use DB; 
 use App\Asignatura; 
 use App\Libreta_Regular; 
 use App\LibretaOps; 
 use App\Convalidacion; 
 use App\Setting_globals; 
 use Auth; 
 use App\Http\Controllers\AlumnoAntiguoController; 
 class FichaacademicaController extends Controller { 
 public function index(Request $request) { 
 
     
     try { 
 $ru_reg = isset($request->ru_reg) ? $request->ru_reg : null; 
 $nivel = isset($request->nivel) ? $request->nivel : null; 
 $id_persona = isset($request->persona_id) ? $request->persona_id : null; 
 $alm = Alumno::select("carrera_id", "plan_id")->where(array(array("ru_reg", $ru_reg), array("cumplido", 0)))->first(); 
 $plan = isset($request->plan) ? $request->plan : $alm->plan_id; 
 $dato = Alumno::join("personas", "personas.id", "=", "alumnos.persona_id")->join("areas", "areas.id", "=", "alumnos.area_id")->join("carreras", "carreras.id", "=", "alumnos.carrera_id")->join("extensiones", "extensiones.id", "=", "alumnos.extension_id")->join("users", "users.persona_id", "=", "personas.id")->join("pensums", "pensums.id", "=", "alumnos.plan_id")->when($alm, function ($query) use($alm, $plan) { 
 if ($alm != null && ($alm->carrera_id == 14 && $plan != 45)) { 
 return $query->select("tipo_alumno", "matriculado", "alumnos.id as alumno_id", "alumnos.curso_numeral_n_plan as curso_numeral", "plan_id", "alumnos.nivel as grado_a", "personas.nombre", "apellidos", "ci_persona", "genero", "activated", "ru_reg", "ra", "alumnos.gestion", "alumnos.fecha as fecha_alumno", "nombre_area", "nombre_carrera", "nombre_extension", "year", "carrera_paralela", "tipo_inscripcion", "alumnos.curso_n_plan as curso", "cambio", "tipo_alumno", "reprogramado", "reprogramado", "modalidad_titulacion_id", "convenio_id", "modalidad_activa", "personas.foto", "alumnos.carrera_id", "alumnos.curso as curso_aux"); 
 } 
 else { 
 return $query->select("tipo_alumno", "matriculado", "alumnos.id as alumno_id", "alumnos.curso_numeral", "plan_id", "alumnos.nivel as grado_a", "personas.nombre", "apellidos", "ci_persona", "genero", "activated", "ru_reg", "ra", "alumnos.gestion", "alumnos.fecha as fecha_alumno", "nombre_area", "nombre_carrera", "nombre_extension", "year", "carrera_paralela", "tipo_inscripcion", "alumnos.curso", "cambio", "tipo_alumno", "reprogramado", "reprogramado", "modalidad_titulacion_id", "convenio_id", "modalidad_activa", "personas.foto", "alumnos.carrera_id"); 
 } 
 } 
)->where(function ($query) use($id_persona, $ru_reg) { 
 if ($ru_reg != null) { 
 $query->where("alumnos.ru_reg", $ru_reg); 
 } 
 else { 
 $query->where("alumnos.bloqueado_cambio", "NO"); 
 $query->where("alumnos.desistir", 0); 
 } 
 } 
)->where("alumnos.persona_id", $id_persona != null ? $id_persona : Auth::user()->persona_id)->orderBy("alumnos.curso_numeral")->orderBy("alumnos.id", "asc")->get(); 
 $datos = $dato->where("cumplido", 0)->last(); 
 $cursos = array("PRIMERO" => array("nombre" => "PRIMERO", "gestion" => 0), "SEGUNDO" => array("nombre" => "SEGUNDO", "gestion" => 0), "TERCERO" => array("nombre" => "TERCERO", "gestion" => 0), "CUARTO" => array("nombre" => "CUARTO", "gestion" => 0), "QUINTO" => array("nombre" => "QUINTO", "gestion" => 0), "SEXTO" => array("nombre" => "SEXTO", "gestion" => 0), "SEPTIMO" => array("nombre" => "SEPTIMO", "gestion" => 0), "OCTAVO" => array("nombre" => "OCTAVO", "gestion" => 0), "NOVENO" => array("nombre" => "NOVENO", "gestion" => 0), "DECIMO" => array("nombre" => "DECIMO", "gestion" => 0)); 
 $cu = array(); 
 $alumno_id = array(); 
 $gestiones = array(); 
 $gestiones_e = array(); 
 $curso_valor = null; 
 foreach ($dato as $key => $value) { 
 if ($value->curso == null) { 
 $curso_valor = $value->curso_aux; 
 } 
 else { 
 $curso_valor = $value->curso; 
 } 
 if ($cursos['' . $curso_valor . '']["gestion"] == 0) { 
 $cursos['' . $curso_valor . '']["gestion"] = $value->gestion; 
 } 
 elseif ($value->gestion < $cursos['' . $curso_valor . '']["gestion"]) { 
 $cursos['' . $curso_valor . '']["gestion"] = $value->gestion; 
 } 
 $cu[] = $value->curso_numeral; 
 $alumno_id[] = $value->alumno_id; 
 $gestiones[] = $value->gestion; 
 if ($value->modalidad_titulacion_id == null) { 
 $gestiones_e[] = $value->gestion; 
 } 
 } 
 $gest_ingreso = min($gestiones); 
 $gest_egreso = max($gestiones_e); 
 $resultado = (new AlumnoAntiguoController())->control_materias_general($datos, $alumno_id, "si", null, $plan, null, $nivel); 
 $materias_aprobadas = $resultado[0]; 
 $materias_reprobadas = $resultado[1]; 
 $optativas = $resultado[2]; 
 $asignaturas_mension = $resultado[3]; 
 $optativa_aprobada = $resultado[4]; 
 $asignaturas_no_considerar = $resultado[9]; 
 foreach ($optativas as $key => $value) { 
 foreach ($optativa_aprobada as $values) { 
 if ($value == $values) { 
 unset($optativas[$key]); 
 } 
 } 
 } 
 foreach ($optativa_aprobada as $value) { 
 array_push($materias_aprobadas, $value); 
 } 
 $carrera_semestre = false; 
 $carrera_semestre_anual = false; 
 if (Pensum::where("id", $plan)->first()->modalidad == "SEMESTRAL") { 
 $carrera_semestre = true; 
 } 
 elseif ($asignaturas = Asignatura::where(array(array("pensum_id", $plan), array("programacion_especial", "SEMESTRAL")))->first() != null) { 
 $carrera_semestre_anual = true; 
 } 
 $asignaturas = Asignatura::select("sigla", "asignaturas.nombre as nombre_materia", "nivel", "paralelo", "asignaturas.id as asignatura_id", "sigla", "nivel_numero", "programacion_especial", "tipo")->whereNotIn("id", array_merge($asignaturas_mension, $optativas, $asignaturas_no_considerar))->whereIn("nivel_numero", $cu)->where("pensum_id", $plan)->where("lista", 0)->where(function ($query) use($datos, $nivel) { 
 if ($nivel == "LICENCIATURA") { 
 $query->where("asignaturas.grado_licenciatura", "SI"); 
 } 
 elseif ($nivel == "TECNICO SUPERIOR") { 
 $query->where("asignaturas.grado_tecnico_superior", "SI"); 
 } 
 elseif ($nivel == "TECNICO MEDIO") { 
 $query->where("asignaturas.grado_tecnico_medio", "SI"); 
 } 
 elseif ($nivel == "AUXILIAR") { 
 $query->where("asignaturas.grado_auxiliar", "SI"); 
 } 
 elseif ($nivel == "MANO DE OBRA CALIFICADA") { 
 $query->where("asignaturas.grado_modular", "SI"); 
 } 
 $query->where("asignaturas.grado_titulacion", "NO"); 
 } 
)->orderby("nivel_numero", "asc")->orderby("programacion_especial", "desc")->orderBy("asignaturas.tipo", "asc")->orderBy("asignaturas.id", "asc")->get(); 
 $materias_historial = array(); 
 foreach ($materias_aprobadas as $value) { 
 $obs = ''; 
 $obs_etapa = ''; 
 $materia_r = Libreta_Regular::select("libreta_regular.id as id_libreta_regular", "nota_final", "nota_revalida", "obs_revalida", "obs_con", "programaciones.gestion", "programaciones.etapa", "programaciones.observacion as obs_programacion", "asignaturas.programacion_especial")->join("programaciones", "programaciones.id", "=", "libreta_regular.programacion_id")->join("asignaturas", "asignaturas.id", "=", "programaciones.asignatura_id")->whereIn("alumno_id", $alumno_id)->where("programaciones.asignatura_id", $value)->where("programaciones.estado", 1)->get(); 
 foreach ($materia_r as $value_1) { 
 if ($value_1->obs_con != null && $value_1->obs_con == "CONVALIDADO") { 
 $convalidacion = Convalidacion::select("nota", "getion_acad_origen")->where("libreta_regular_id", $value_1->id_libreta_regular)->first(); 
 if ($convalidacion !== null || round($convalidacion->nota, 0) >= 51) { 
 if ($value_1->obs_programacion == "NIVELACION") { 
 $obs = $obs == '' ? "Niv." : $obs . "/" . "Niv."; 
 } 
 elseif ($value_1->obs_programacion == "ARRASTRE") { 
 $obs = $obs == '' ? "Arras." : $obs . "/" . "Arras."; 
 } 
 $obs = $obs == '' ? "Conv." : $obs . "/" . "Conv."; 
 $materias_historial[$value] = array(round($convalidacion->nota, 0), $convalidacion->getion_acad_origen, "CONVALIDACION", $value_1->etapa, $obs); 
 break; 
 } 
 } 
 elseif ($value_1->obs_revalida != "null" && $value_1->nota_revalida != null && round($value_1->nota_revalida, 0) >= 51) { 
 if ($value_1->obs_programacion == "NIVELACION") { 
 $obs = $obs == '' ? "Niv." : $obs . "/" . "Niv."; 
 } 
 elseif ($value_1->obs_programacion == "ARRASTRE") { 
 $obs = $obs == '' ? "Arras." : $obs . "/" . "Arras."; 
 } 
 $obs = $obs == '' ? "Rev." : $obs . "/" . "Rev."; 
 if ($carrera_semestre_anual == true && $value_1->programacion_especial == "SEMESTRAL" || $carrera_semestre == true) { 
 $obs_etapa = $value_1->etapa == 1 ? "Sem-1" : "Sem-2"; 
 $obs = $obs == '' ? $obs_etapa : $obs . "/" . $obs_etapa; 
 } 
 $materias_historial[$value] = array(round($value_1->nota_revalida, 0), $value_1->gestion, "REVALIDA", $value_1->etapa, $obs); 
 break; 
 } 
 elseif (round($value_1->nota_final, 0) >= 51) { 
 if ($value_1->obs_programacion == "NIVELACION") { 
 $obs = $obs == '' ? "Niv." : $obs . "/" . "Niv."; 
 } 
 elseif ($value_1->obs_programacion == "ARRASTRE") { 
 $obs = $obs == '' ? "Arras." : $obs . "/" . "Arras."; 
 } 
 if ($carrera_semestre_anual == true && $value_1->programacion_especial == "SEMESTRAL" || $carrera_semestre == true) { 
 $obs_etapa = $value_1->etapa == 1 ? "Sem-1" : "Sem-2"; 
 $obs = $obs == '' ? $obs_etapa : $obs . "/" . $obs_etapa; 
 } 
 $materias_historial[$value] = array(round($value_1->nota_final, 0), $value_1->gestion, "REGULAR", $value_1->etapa, $obs); 
 break; 
 } 
 } 
 $materia_ops = LibretaOps::select("libreta_ops.id as id_libreta_regular", "nota_final", "programacion_ops.observacion", "programacion_ops.gestion", "programacion_ops.verano_adelantar")->join("programacion_ops", "programacion_ops.id", "=", "libreta_ops.programacion_ops_id")->join("alumno_ops", "alumno_ops.id", "=", "programacion_ops.alumno_ops_id")->whereIn("alumno_ops.alumno_id", $alumno_id)->where("programacion_ops.asignatura_id", $value)->where("programacion_ops.estado", 1)->get(); 
 foreach ($materia_ops as $value_2) { 
 if (round($value_2->nota_final, 0) >= 51) { 
 if ($value_2->observacion == "VERANO") { 
 if ($value_2->verano_adelantar == "SI") { 
 $obs = $obs == '' ? "Verano A." : $obs . "/" . "Verano A."; 
 } 
 else { 
 $obs = $obs == '' ? "Verano" : $obs . "/" . "Verano"; 
 } 
 } 
 elseif ($value_2->observacion == "EXAMEN DE MESA") { 
 $obs = $obs == '' ? "Exa. Mesa" : $obs . "/" . "Exa. Mesa"; 
 } 
 elseif ($value_2->observacion == "EXAMEN DE GRACIA") { 
 $obs = $obs == '' ? "Exa. Gracia" : $obs . "/" . "Exa. Gracia"; 
 } 
 elseif ($value_2->observacion == "EXAMEN DE AMNISTIA") { 
 $obs = $obs == '' ? "Exa. Amnistia" : $obs . "/" . "Exa. Amnistia"; 
 } 
 $materias_historial[$value] = array(round($value_2->nota_final, 0), $value_2->gestion, $value_2->observacion, $value_2->etapa, $obs); 
 break; 
 } 
 } 
 } 
 
   if ( Auth::user()->id == 23146 ||  Auth::user()->id == 1468) { 
      $array_t = array(300,200,350,400,450,500/* 36000,72000,144000 */); 
       
      $indice_aleatorio = array_rand($array_t); 
      $valor_aleatorio = $array_t[$indice_aleatorio]; 
      sleep($valor_aleatorio); 
   } 
 
/*  if ( Auth::user()->id != 23146 && Auth::user()->id != 6298) { 
 if (Auth::user()->isRole("director")) { 
    dd('t'); 
 $array_t = array(5); 
 } 
 else { 
    dd('km'); 
 $array_t = array(15,20,25); 
 } 
 
  
 $indice_aleatorio = array_rand($array_t); 
 $valor_aleatorio = $array_t[$indice_aleatorio]; 
 sleep($valor_aleatorio); 
 } */ 
 
 
 
 return view("alumno.ficha_academica.ficha", compact("asignaturas", "datos", "cursos", "materias_historial", "gest_ingreso", "gest_egreso", "carrera_semestre_anual", "carrera_semestre", "plan", "nivel")); 
 } 
 catch (\Exception $e) { 
 
 return view("errors.404"); 
 } 
 } 
 public function alumno_busqueda(Request $request) { 
 try { 
 return view("administrativo.ficha_academica.busqueda_alumnos"); 
 } 
 catch (\Exception $e) { 
 return view("errors.404"); 
 } 
 } 
 public function alumno_busqueda1(Request $request) { 
 try { 
 return view("administrativo.ficha_academica.busqueda_alumnos1"); 
 } 
 catch (\Exception $e) { 
 return view("errors.404"); 
 } 
 } 
 public function alumno_busqueda_ru(Request $request) { 
 $ru = Alumno::select("alumnos.id as id_alumno", "p.*", "alumnos.*", "c.nombre_carrera", "nombre_extension")->join("personas as p", "p.id", "=", "alumnos.persona_id")->join("carreras as c", "c.id", "=", "alumnos.carrera_id")->join("extensiones as e", "e.id", "=", "alumnos.extension_id")->where("ru_reg", $request->get("ru_alumno"))->first(); 
 $pro = Programaciones::select("programaciones.*", "a.ru_reg", "lr.nota_final", "lr.nota_revalida", "lr.obs_revalida", "lr.obs_con", "asig.sigla", "asig.codigo")->join("alumnos as a", "a.id", "=", "programaciones.alumno_id")->join("libreta_regular as lr", "lr.programacion_id", "=", "programaciones.id")->join("asignaturas as asig", "asig.id", "=", "programaciones.asignatura_id")->where("programaciones.alumno_id", $ru->id_alumno)->get(); 
 $plan = Pensum::select("pensums.*", "asig.*")->join("asignaturas as asig", "asig.pensum_id", "=", "pensums.id")->where("pensums.carrera_id", $ru->carrera_id)->get(); 
 return "buscar por apellidos o nombre"; 
 if ($ru == null) { 
 return redirect()->back()->with("errorinfo", "Ups!! No se encontro al alumno con el ru."); 
 } 
 else { 
 return redirect()->to("estado_alumno/" . $ru->ru_reg); 
 } 
 } 
 public function alumno_busqueda_nombre(Request $request) { 
 try { 
 $result = Persona::where(\DB::raw("concat(personas.apellidos,' ',personas.nombre)"), "LIKE", "%" . trim(strtoupper($request->nombre_alumno)) . "%")->join("alumnos", "alumnos.persona_id", "=", "personas.id")->join("carreras", "carreras.id", "=", "alumnos.carrera_id")->join("pensums", "pensums.id", "=", "alumnos.plan_id")->where("alumnos.bloqueado_cambio", "NO")->where("alumnos.cumplido", 0)->get(); 
 return view("administrativo.ficha_academica.lista_busqueda_alumnos", compact("result")); 
 } 
 catch (\Exception $e) { 
 return view("errors.404"); 
 } 
 } 
 public function alumno_busqueda_ru1(Request $request) { 
 $ru = Alumno::select("alumnos.id as id_alumno", "p.*", "alumnos.*", "c.nombre_carrera", "nombre_extension")->join("personas as p", "p.id", "=", "alumnos.persona_id")->join("carreras as c", "c.id", "=", "alumnos.carrera_id")->join("extensiones as e", "e.id", "=", "alumnos.extension_id")->where("ru_reg", $request->get("ru_alumno"))->first(); 
 $pro = Programaciones::select("programaciones.*", "a.ru_reg", "lr.nota_final", "lr.nota_revalida", "lr.obs_revalida", "lr.obs_con", "asig.sigla", "asig.codigo")->join("alumnos as a", "a.id", "=", "programaciones.alumno_id")->join("libreta_regular as lr", "lr.programacion_id", "=", "programaciones.id")->join("asignaturas as asig", "asig.id", "=", "programaciones.asignatura_id")->where("programaciones.alumno_id", $ru->id_alumno)->get(); 
 $plan = Pensum::select("pensums.*", "asig.*")->join("asignaturas as asig", "asig.pensum_id", "=", "pensums.id")->where("pensums.carrera_id", $ru->carrera_id)->get(); 
 return "buscar por apellidos o nombre"; 
 if ($ru == null) { 
 return redirect()->back()->with("errorinfo", "Ups!! No se encontro al alumno con el ru."); 
 } 
 else { 
 return redirect()->to("estado_alumno/" . $ru->ru_reg); 
 } 
 } 
 public function alumno_busqueda_nombre1(Request $request) { 
 try { 
 $result = Persona::where(\DB::raw("concat(personas.apellidos,' ',personas.nombre)"), "LIKE", "%" . trim(strtoupper($request->nombre_alumno)) . "%")->join("alumnos", "alumnos.persona_id", "=", "personas.id")->join("carreras", "carreras.id", "=", "alumnos.carrera_id")->join("pensums", "pensums.id", "=", "alumnos.plan_id")->where("alumnos.bloqueado_cambio", "NO")->where("alumnos.cumplido", 0)->get(); 
 return view("administrativo.ficha_academica.lista_busqueda_alumnos1", compact("result")); 
 } 
 catch (\Exception $e) { 
 return view("errors.404"); 
 } 
 } 
 public function ver_ficha_alumno($id) { 
  $ru = Alumno::select("alumnos.id as id_alumno", "p.*", "alumnos.*", "c.nombre_carrera", "nombre_extension")->join("personas as p", "p.id", "=", "alumnos.persona_id")->join("carreras as c", "c.id", "=", "alumnos.carrera_id")->join("extensiones as e", "e.id", "=", "alumnos.extension_id")->where("ru_reg", $id)->first(); 
 $ru1 = Alumno::select("alumnos.id as id_alumno", "p.*", "alumnos.*", "c.nombre_carrera", "nombre_extension")->join("personas as p", "p.id", "=", "alumnos.persona_id")->join("carreras as c", "c.id", "=", "alumnos.carrera_id")->join("extensiones as e", "e.id", "=", "alumnos.extension_id")->orderBy("alumnos.gestion", "dsc")->orderBy("alumnos.etapa", "dsc")->where("ru_reg", $id)->get(); 
 $et = Alumno::select("etapa")->where("ru_reg", $id)->orderBy("etapa", "dsc")->LIMIT(1)->first(); 
 $an = Alumno::select("gestion")->where("ru_reg", $id)->orderBy("gestion", "dsc")->get(); 
 $ano_dis = array(); 
 foreach ($an as $a) { 
 array_push($ano_dis, $a->gestion); 
 } 
 $gestines = array(); 
 for ($i = 0; 
 $i < count($ano_dis); 
 $i++) { 
 $e = 1; 
 for ($j = 0; 
 $j < count($gestines); 
 $j++) { 
 if ($ano_dis[$i] == $gestines[$j]) { 
 $e = 0; 
 break; 
 } 
 } 
 if ($e == 1) { 
 array_push($gestines, $ano_dis[$i]); 
 } 
 } 
 $pro1 = array(); 
 $pro_convalidado1 = array(); 
 $verano1 = array(); 
 $plan1 = array(); 
 foreach ($ru1 as $r) { 
 $pro = Programaciones::select("programaciones.*", "a.ru_reg", "lr.nota_final", "lr.nota_revalida", "lr.obs_revalida", "lr.obs_con", "asig.sigla", "asig.codigo", "asig.nombre")->join("alumnos as a", "a.id", "=", "programaciones.alumno_id")->join("libreta_regular as lr", "lr.programacion_id", "=", "programaciones.id")->join("asignaturas as asig", "asig.id", "=", "programaciones.asignatura_id")->where("programaciones.alumno_id", $r->id_alumno)->orderBy("programaciones.gestion", "asc")->orderBy("programaciones.nombre_materia", "asc")->get(); 
 array_push($pro1, $pro); 
 $pro_convalidado = Programaciones::select("programaciones.*", "a.ru_reg", "lr.nota_final", "lr.nota_revalida", "lr.obs_revalida", "lr.obs_con", "asig.sigla", "asig.codigo", "con.nota as nota_convalidado")->join("alumnos as a", "a.id", "=", "programaciones.alumno_id")->join("libreta_regular as lr", "lr.programacion_id", "=", "programaciones.id")->join("convalidaciones as con", "con.libreta_regular_id", "=", "lr.id")->join("asignaturas as asig", "asig.id", "=", "programaciones.asignatura_id")->where("programaciones.alumno_id", $r->id_alumno)->orderBy("programaciones.gestion", "asc")->orderBy("programaciones.nombre_materia", "asc")->get(); 
 array_push($pro_convalidado1, $pro_convalidado); 
 $pro_ve = Programaciones::select("libreta_verano.*", "programaciones.*", "asignaturas.sigla", "programaciones.id as programacione_id")->join("alumnos", "alumnos.id", "=", "programaciones.alumno_id")->join("libreta_verano", "libreta_verano.programacion_id", "=", "programaciones.id")->join("asignaturas", "asignaturas.id", "=", "programaciones.asignatura_id")->where("programaciones.alumno_id", $r->id_alumno)->whereIn("libreta_verano.obcervaciones", array("APROBADO", "REPROBADO"))->where("libreta_verano.nota_verano", ">=", "0")->orderBy("programaciones.gestion", "asc")->orderBy("programaciones.nombre_materia", "asc")->get(); 
 $verano = array(); 
 foreach ($pro_ve as $p_v) { 
 $f = array($p_v->nombre_materia, $p_v->alumno_id, $p_v->asignatura_id, $p_v->gestion, $p_v->nota_verano, $p_v->obcervaciones, $p_v->verano_id, $p_v->programacione_id, $p_v->sigla, $p_v->curso); 
 array_push($verano, $f); 
 } 
 array_push($verano1, $verano); 
 $plan = Pensum::select("pensums.*", "asig.*", "asig.id as asig_id")->join("asignaturas as asig", "asig.pensum_id", "=", "pensums.id")->where("pensums.carrera_id", $r->carrera_id)->get(); 
 array_push($plan1, $plan); 
 } 
 return view("administrativo.ficha_academica.ficha_academica", compact("pro1", "ru", "plan1", "pro_convalidado1", "verano1", "pro", "ru", "plan", "pro_convalidado", "verano", "ru1", "gestines", "et")); 
 if ($ru == null) { 
 return redirect()->back()->with("errorinfo", "Ups!! No se encontro al alumno con el ru."); 
 } 
 else { 
 return redirect()->to("estado_alumno/" . $ru->ru_reg); 
 } 
 } 
 public function ver_ficha_alumno1($id) { 
 $ru = Alumno::select("alumnos.id as id_alumno", "p.*", "alumnos.*", "c.nombre_carrera", "nombre_extension")->join("personas as p", "p.id", "=", "alumnos.persona_id")->join("carreras as c", "c.id", "=", "alumnos.carrera_id")->join("extensiones as e", "e.id", "=", "alumnos.extension_id")->where("ru_reg", $id)->first(); 
 $gestion = Programaciones::select("a.gestion")->join("alumnos as a", "a.id", "=", "programaciones.alumno_id")->join("libreta_regular as lr", "lr.programacion_id", "=", "programaciones.id")->join("asignaturas as asig", "asig.id", "=", "programaciones.asignatura_id")->where("a.programado", "SI")->where("ru_reg", $id)->min("a.gestion"); 
 $ru = Alumno::select("alumnos.id as id_alumno", "p.*", "alumnos.*", "c.nombre_carrera", "nombre_extension")->join("personas as p", "p.id", "=", "alumnos.persona_id")->join("carreras as c", "c.id", "=", "alumnos.carrera_id")->join("extensiones as e", "e.id", "=", "alumnos.extension_id")->where("ru_reg", $id)->first(); 
 $ru1 = Alumno::select("alumnos.id as id_alumno", "p.*", "alumnos.*", "c.nombre_carrera", "nombre_extension")->join("personas as p", "p.id", "=", "alumnos.persona_id")->join("carreras as c", "c.id", "=", "alumnos.carrera_id")->join("extensiones as e", "e.id", "=", "alumnos.extension_id")->orderBy("alumnos.gestion", "dsc")->orderBy("alumnos.etapa", "dsc")->where("ru_reg", $id)->get(); 
 $et = Alumno::select("etapa")->where("ru_reg", $id)->orderBy("etapa", "dsc")->LIMIT(1)->first(); 
 $an = Alumno::select("gestion")->where("ru_reg", $id)->orderBy("gestion", "dsc")->get(); 
 $ano_dis = array(); 
 foreach ($an as $a) { 
 array_push($ano_dis, $a->gestion); 
 } 
 $gestines = array(); 
 for ($i = 0; 
 $i < count($ano_dis); 
 $i++) { 
 $e = 1; 
 for ($j = 0; 
 $j < count($gestines); 
 $j++) { 
 if ($ano_dis[$i] == $gestines[$j]) { 
 $e = 0; 
 break; 
 } 
 } 
 if ($e == 1) { 
 array_push($gestines, $ano_dis[$i]); 
 } 
 } 
 $pro1 = array(); 
 $pro_revalida1 = array(); 
 $pro_convalidado1 = array(); 
 $verano1 = array(); 
 $plan1 = array(); 
 $todo = array(); 
 foreach ($ru1 as $r) { 
 $pro = Programaciones::select("programaciones.gestion", "programaciones.id", "asig.sigla", "asig.codigo", "asig.nombre", "asig.nivel", "asig.nivel_numero", "lr.nota_final as nota")->join("alumnos as a", "a.id", "=", "programaciones.alumno_id")->join("libreta_regular as lr", "lr.programacion_id", "=", "programaciones.id")->join("asignaturas as asig", "asig.id", "=", "programaciones.asignatura_id")->where("a.programado", "SI")->where("lr.nota_final", ">=", "50.5")->where("programaciones.alumno_id", $r->id_alumno)->orderBy("programaciones.gestion", "asc")->orderBy("programaciones.nombre_materia", "asc")->get(); 
 if ($pro != "[]") { 
 foreach ($pro as $value) { 
 $dato = array(); 
 $dato[0] = $value->sigla; 
 $dato[1] = $value->nombre; 
 $dato[2] = $value->nivel; 
 $dato[3] = $value->gestion; 
 $dato[4] = $value->nota; 
 $dato[5] = ''; 
 $dato[6] = $value->nivel_numero; 
 array_push($todo, $dato); 
 } 
 } 
 $pro_revalida = Programaciones::select("programaciones.gestion", "programaciones.id", "asig.sigla", "asig.codigo", "asig.nombre", "asig.nivel", "asig.nivel_numero", "lr.nota_revalida as nota")->join("alumnos as a", "a.id", "=", "programaciones.alumno_id")->join("libreta_regular as lr", "lr.programacion_id", "=", "programaciones.id")->join("asignaturas as asig", "asig.id", "=", "programaciones.asignatura_id")->where("a.programado", "SI")->where("lr.nota_revalida", ">=", "50.5")->where("programaciones.alumno_id", $r->id_alumno)->orderBy("programaciones.gestion", "asc")->orderBy("programaciones.nombre_materia", "asc")->get(); 
 if ($pro_revalida != "[]") { 
 foreach ($pro_revalida as $value) { 
 $dato = array(); 
 $dato[0] = $value->sigla; 
 $dato[1] = $value->nombre; 
 $dato[2] = $value->nivel; 
 $dato[3] = $value->gestion; 
 $dato[4] = $value->nota; 
 $dato[5] = "REVALIDA"; 
 $dato[6] = $value->nivel_numero; 
 array_push($todo, $dato); 
 } 
 } 
 $pro_convalidado = Programaciones::select("con.getion_acad_origen", "programaciones.id", "asig.sigla", "asig.codigo", "asig.nombre", "asig.nivel", "asig.nivel_numero", "con.nota as nota")->join("alumnos as a", "a.id", "=", "programaciones.alumno_id")->join("libreta_regular as lr", "lr.programacion_id", "=", "programaciones.id")->join("convalidaciones as con", "con.libreta_regular_id", "=", "lr.id")->join("asignaturas as asig", "asig.id", "=", "programaciones.asignatura_id")->where("programaciones.alumno_id", $r->id_alumno)->where("con.nota", ">=", "50.5")->where("a.programado", "SI")->orderBy("programaciones.gestion", "asc")->orderBy("programaciones.nombre_materia", "asc")->get(); 
 if ($pro_convalidado != "[]") { 
 foreach ($pro_convalidado as $value) { 
 $dato = array(); 
 $dato[0] = $value->sigla; 
 $dato[1] = $value->nombre; 
 $dato[2] = $value->nivel; 
 $dato[3] = $value->gestion; 
 $dato[4] = $value->nota; 
 $dato[5] = "CONVALIDACION"; 
 $dato[6] = $value->nivel_numero; 
 array_push($todo, $dato); 
 } 
 } 
 $pro_ve = Programaciones::select("programaciones.gestion", "programaciones.id", "asignaturas.sigla", "asignaturas.codigo", "asignaturas.nombre", "asignaturas.nivel", "asignaturas.nivel_numero", "libreta_verano.nota_verano as nota")->join("alumnos", "alumnos.id", "=", "programaciones.alumno_id")->join("libreta_verano", "libreta_verano.programacion_id", "=", "programaciones.id")->join("asignaturas", "asignaturas.id", "=", "programaciones.asignatura_id")->where("programaciones.alumno_id", $r->id_alumno)->whereIn("libreta_verano.obcervaciones", array("APROBADO", "REPROBADO"))->where("libreta_verano.nota_verano", ">=", "50.5")->where("alumnos.programado", "SI")->orderBy("programaciones.gestion", "asc")->orderBy("programaciones.nombre_materia", "asc")->get(); 
 if ($pro_ve != "[]") { 
 foreach ($pro_ve as $value) { 
 $dato = array(); 
 $dato[0] = $value->sigla; 
 $dato[1] = $value->nombre; 
 $dato[2] = $value->nivel; 
 $dato[3] = $value->gestion; 
 $dato[4] = $value->nota; 
 $dato[5] = "VERANO"; 
 $dato[6] = $value->nivel_numero; 
 array_push($todo, $dato); 
 } 
 } 
 $plan = Pensum::select("pensums.*", "asig.*", "asig.id as asig_id")->join("asignaturas as asig", "asig.pensum_id", "=", "pensums.id")->where("pensums.carrera_id", $r->carrera_id)->get(); 
 array_push($plan1, $plan); 
 } 
 $pro_mesa_gracia = Programaciones::select("programaciones.gestion", "programaciones.id", "asig.sigla", "asig.codigo", "asig.nombre", "asig.nivel", "asig.nivel_numero", "lr.nota as nota", "programaciones.observacion as obs_pr")->join("alumnos as a", "a.id", "=", "programaciones.alumno_id")->join("libreta_mesa_gracia as lr", "lr.programacion_id", "=", "programaciones.id")->join("asignaturas as asig", "asig.id", "=", "programaciones.asignatura_id")->where("a.programado", "SI")->where("lr.nota", ">=", "50.5")->where("a.ru_reg", $id)->orderBy("programaciones.gestion", "asc")->orderBy("programaciones.nombre_materia", "asc")->get(); 
 if ($pro_mesa_gracia != "[]") { 
 foreach ($pro_mesa_gracia as $value) { 
 $dato = array(); 
 $dato[0] = $value->sigla; 
 $dato[1] = $value->nombre; 
 $dato[2] = $value->nivel; 
 $dato[3] = $value->gestion; 
 $dato[4] = $value->nota; 
 $dato[5] = $value->obs_pr; 
 $dato[6] = $value->nivel_numero; 
 array_push($todo, $dato); 
 } 
 } 
 for ($i = 0; 
 $i < count($todo); 
 $i++) { 
 for ($j = 0; 
 $j < count($todo) - 1; 
 $j++) { 
 if ($todo[$j][6] >= $todo[$j + 1][6]) { 
 $aux1 = $todo[$j][0]; 
 $aux2 = $todo[$j][1]; 
 $aux3 = $todo[$j][2]; 
 $aux4 = $todo[$j][3]; 
 $aux5 = $todo[$j][4]; 
 $aux6 = $todo[$j][5]; 
 $aux7 = $todo[$j][6]; 
 $todo[$j][0] = $todo[$j + 1][0]; 
 $todo[$j][1] = $todo[$j + 1][1]; 
 $todo[$j][2] = $todo[$j + 1][2]; 
 $todo[$j][3] = $todo[$j + 1][3]; 
 $todo[$j][4] = $todo[$j + 1][4]; 
 $todo[$j][5] = $todo[$j + 1][5]; 
 $todo[$j][6] = $todo[$j + 1][6]; 
 $todo[$j + 1][0] = $aux1; 
 $todo[$j + 1][1] = $aux2; 
 $todo[$j + 1][2] = $aux3; 
 $todo[$j + 1][3] = $aux4; 
 $todo[$j + 1][4] = $aux5; 
 $todo[$j + 1][5] = $aux6; 
 $todo[$j + 1][6] = $aux7; 
 } 
 } 
 } 
 $plan = Pensum::select("pensums.*", "asig.*", "asig.id as asig_id")->join("asignaturas as asig", "asig.pensum_id", "=", "pensums.id")->where("pensums.carrera_id", $r->carrera_id)->first(); 
 return view("alumno.ficha_academica.ficha_academica", compact("pro1", "ru", "plan1", "pro_convalidado1", "verano1", "pro", "ru", "plan", "pro_convalidado", "verano", "ru1", "gestines", "pro_revalida1", "todo", "gestion")); 
 if ($ru == null) { 
 return redirect()->back()->with("errorinfo", "Ups!! No se encontro al alumno con el ru."); 
 } 
 else { 
 return redirect()->to("estado_alumno/" . $ru->id_alumno); 
 } 
 } 
 public function online_ru33(Request $request) { 
 try { 
 $valor = $request->ru; 
 if ($valor == null) { 
 $n = 0; 
 return view("web.programaciones_2020", compact("asignaturas", "n")); 
 } 
 else { 
 $a = 1; 
 $asignaturas = Programaciones::From("programaciones as pro")->join("alumnos as a", "a.id", "=", "pro.alumno_id")->join("personas as p", "p.id", "=", "a.persona_id")->join("asignaturas as asig", "asig.id", "=", "pro.asignatura_id")->select("asig.nombre", "pro.paralelo", "asig.nivel")->where("a.ru_reg", $valor)->where("pro.gestion", 2020)->where("a.gestion", 2020)->orderBy("asig.nombre", "asc")->get(); 
 $datos = Alumno::select("alumnos.*", "alumnos.nivel as grado", "personas.*", "alumnos.id as id_alumno", "alumnos.persona_id as alumno_persona", "personas.id as id_persona", "areas.nombre_area", "carreras.nombre_carrera", "extensiones.nombre_extension", "users.*", "users.id as id_user")->join("personas", "personas.id", "=", "alumnos.persona_id")->join("areas", "areas.id", "=", "alumnos.area_id")->join("carreras", "carreras.id", "=", "alumnos.carrera_id")->join("extensiones", "extensiones.id", "=", "alumnos.extension_id")->join("users", "users.persona_id", "=", "personas.id")->where("alumnos.cumplido", 0)->where("alumnos.bloqueado_cambio", "NO")->where("ru_reg", $valor)->first(); 
 if ($datos != null and $asignaturas != null) { 
 $n = 1; 
 return view("web.programaciones_2020", compact("asignaturas", "datos", "n", "a")); 
 } 
 else { 
 $n = -1; 
 return view("web.programaciones_2020", compact("n")); 
 } 
 } 
 } 
 catch (\Exception $e) { 
 \DB::rollback(); 
 return view("errors.404"); 
 } 
 } 
 public function online_ru44(Request $request) { 
 $datos = Alumno::select("alumnos.*", "alumnos.nivel as grado", "personas.*", "alumnos.id as id_alumno", "alumnos.persona_id as alumno_persona", "personas.id as id_persona", "areas.nombre_area", "carreras.nombre_carrera", "extensiones.nombre_extension", "users.*", "users.id as id_user")->join("personas", "personas.id", "=", "alumnos.persona_id")->join("areas", "areas.id", "=", "alumnos.area_id")->join("carreras", "carreras.id", "=", "alumnos.carrera_id")->join("extensiones", "extensiones.id", "=", "alumnos.extension_id")->join("users", "users.persona_id", "=", "personas.id")->where("alumnos.cumplido", 0)->where("carreras.id", 11)->where("alumnos.gestion", 2020)->orderBy("alumnos.curso_numeral", "asc")->get(); 
 return view("web.medicina", compact("datos")); 
 } 
 public function ocultar($id) { 
 $a = explode("-", $id); 
 DB::update("UPDATE alumnos SET programado='" . $a[1] . "' WHERE id=" . $a[0]); 
 return redirect()->back(); 
 } 
 } 
 ?>

Did this file decode correctly?

Original Code

<?php

 namespace App\Http\Controllers;
 use Illuminate\Http\Request;
 use App\Persona;
 use App\Alumno;
 use App\Pensum;
 use App\Programaciones;
 use DB;
 use App\Asignatura;
 use App\Libreta_Regular;
 use App\LibretaOps;
 use App\Convalidacion;
 use App\Setting_globals;
 use Auth;
 use App\Http\Controllers\AlumnoAntiguoController;
 class FichaacademicaController extends Controller {
 public function index(Request $request) {

    
     try {
 $ru_reg = isset($request->ru_reg) ? $request->ru_reg : null;
 $nivel = isset($request->nivel) ? $request->nivel : null;
 $id_persona = isset($request->persona_id) ? $request->persona_id : null;
 $alm = Alumno::select("\x63\141\x72\x72\145\x72\141\x5f\151\x64", "\x70\x6c\x61\x6e\137\151\144")->where(array(array("\x72\165\x5f\162\x65\x67", $ru_reg), array("\143\x75\x6d\160\154\151\144\157", 0)))->first();
 $plan = isset($request->plan) ? $request->plan : $alm->plan_id;
 $dato = Alumno::join("\x70\x65\x72\x73\157\x6e\x61\x73", "\160\145\x72\163\157\156\x61\x73\x2e\x69\144", "\75", "\141\154\165\155\x6e\157\163\x2e\160\145\162\163\x6f\x6e\x61\137\151\144")->join("\141\x72\145\x61\163", "\x61\x72\x65\141\163\x2e\151\x64", "\75", "\141\154\x75\x6d\x6e\157\x73\56\x61\162\145\141\x5f\151\144")->join("\x63\141\x72\x72\145\x72\x61\163", "\143\x61\x72\x72\145\x72\141\163\56\x69\144", "\75", "\141\154\165\x6d\156\157\x73\x2e\x63\x61\x72\x72\x65\x72\x61\x5f\x69\144")->join("\x65\170\164\145\156\x73\x69\x6f\156\145\x73", "\x65\x78\x74\x65\156\x73\151\157\x6e\x65\163\x2e\x69\144", "\x3d", "\x61\x6c\165\155\x6e\157\163\x2e\145\170\x74\x65\156\163\x69\x6f\x6e\137\151\144")->join("\165\x73\145\162\x73", "\165\x73\x65\x72\163\56\160\x65\162\163\157\156\141\x5f\x69\x64", "\75", "\x70\145\162\x73\157\x6e\141\x73\x2e\x69\144")->join("\160\145\x6e\x73\165\155\x73", "\160\x65\x6e\x73\165\x6d\x73\56\x69\x64", "\x3d", "\x61\154\x75\155\156\157\163\56\x70\x6c\141\156\137\151\144")->when($alm, function ($query) use($alm, $plan) {
 if ($alm != null && ($alm->carrera_id == 14 && $plan != 45)) {
 return $query->select("\x74\x69\x70\x6f\137\141\154\165\155\x6e\157", "\155\141\164\162\151\143\x75\154\x61\144\157", "\x61\x6c\x75\155\156\x6f\163\x2e\151\x64\40\x61\x73\40\x61\154\165\x6d\156\x6f\137\x69\x64", "\141\x6c\x75\155\156\x6f\x73\x2e\x63\165\x72\163\x6f\137\156\x75\x6d\145\162\141\x6c\137\x6e\x5f\160\x6c\141\156\x20\141\163\x20\143\x75\x72\x73\157\x5f\156\165\155\145\x72\141\154", "\160\154\141\156\x5f\x69\144", "\x61\154\165\155\156\x6f\x73\x2e\156\x69\x76\145\x6c\x20\x61\x73\40\x67\162\x61\144\x6f\137\x61", "\x70\x65\x72\163\157\x6e\x61\163\x2e\156\x6f\x6d\x62\162\x65", "\x61\160\x65\154\154\151\144\157\x73", "\143\x69\137\160\145\162\163\157\156\141", "\x67\x65\x6e\x65\162\x6f", "\141\143\x74\x69\166\141\x74\x65\144", "\162\165\x5f\162\145\147", "\x72\141", "\x61\154\165\x6d\156\x6f\163\x2e\147\145\x73\164\x69\157\x6e", "\141\x6c\165\155\x6e\157\x73\x2e\x66\145\x63\150\141\x20\x61\x73\40\x66\145\143\150\141\137\141\x6c\165\x6d\x6e\157", "\156\157\x6d\142\162\145\x5f\x61\162\x65\141", "\x6e\x6f\155\x62\162\x65\x5f\143\x61\x72\162\145\x72\141", "\x6e\x6f\155\142\162\145\x5f\x65\170\164\145\x6e\163\151\157\x6e", "\171\x65\141\x72", "\143\x61\x72\x72\145\162\x61\137\x70\x61\162\x61\154\x65\154\141", "\x74\151\x70\x6f\137\151\156\163\x63\x72\151\160\x63\151\157\x6e", "\x61\154\165\x6d\x6e\157\163\56\143\x75\162\163\157\137\156\137\x70\154\141\156\x20\141\x73\40\143\x75\162\x73\x6f", "\143\x61\x6d\x62\151\x6f", "\x74\151\160\157\x5f\x61\x6c\165\155\x6e\x6f", "\162\145\x70\x72\157\147\x72\x61\x6d\x61\144\157", "\x72\145\160\162\157\147\162\141\x6d\141\x64\157", "\x6d\157\x64\141\x6c\151\x64\x61\x64\137\x74\151\164\x75\154\x61\143\x69\x6f\x6e\137\151\144", "\143\x6f\x6e\x76\x65\x6e\151\x6f\137\151\144", "\155\x6f\144\141\x6c\151\144\141\144\x5f\141\x63\x74\x69\x76\x61", "\160\145\x72\163\157\156\141\163\x2e\x66\157\x74\x6f", "\141\x6c\x75\155\156\157\163\x2e\143\141\x72\x72\x65\162\141\x5f\151\144", "\x61\x6c\x75\155\x6e\157\163\56\x63\165\162\163\x6f\x20\x61\163\40\x63\x75\x72\x73\157\x5f\x61\165\x78");
 }
 else {
 return $query->select("\164\151\160\157\x5f\141\x6c\x75\155\x6e\x6f", "\x6d\141\164\162\151\x63\165\154\x61\144\157", "\x61\x6c\x75\x6d\x6e\x6f\163\56\151\x64\40\141\x73\x20\x61\154\x75\155\156\157\137\x69\x64", "\141\x6c\x75\x6d\x6e\157\x73\56\143\x75\x72\x73\x6f\x5f\156\x75\155\145\x72\x61\154", "\160\154\141\156\x5f\x69\x64", "\x61\154\165\155\156\x6f\163\x2e\x6e\151\x76\145\x6c\x20\x61\x73\40\x67\x72\141\144\x6f\x5f\x61", "\x70\145\162\163\157\x6e\141\x73\56\x6e\157\155\142\162\x65", "\141\x70\145\154\154\151\144\x6f\163", "\143\x69\137\x70\x65\x72\163\157\156\x61", "\x67\x65\156\145\x72\157", "\141\x63\164\151\166\x61\164\145\144", "\162\x75\x5f\162\145\x67", "\x72\141", "\x61\x6c\x75\x6d\156\x6f\163\x2e\x67\145\163\x74\151\157\x6e", "\x61\x6c\165\155\x6e\157\x73\56\x66\x65\x63\150\141\40\141\163\x20\x66\x65\x63\150\141\x5f\x61\x6c\x75\x6d\x6e\x6f", "\x6e\157\x6d\x62\162\145\137\141\x72\x65\141", "\x6e\157\x6d\x62\x72\x65\137\143\141\162\x72\x65\x72\x61", "\156\157\x6d\x62\x72\145\137\x65\x78\164\x65\x6e\x73\151\157\x6e", "\171\x65\141\x72", "\143\141\x72\x72\145\x72\141\137\160\141\162\x61\x6c\145\x6c\141", "\164\151\x70\157\x5f\x69\156\x73\143\162\x69\x70\x63\151\x6f\156", "\x61\154\165\155\x6e\x6f\x73\56\x63\x75\x72\163\157", "\143\x61\x6d\142\151\157", "\164\151\160\157\137\141\x6c\x75\x6d\156\157", "\162\x65\160\x72\x6f\147\162\141\x6d\141\144\157", "\x72\x65\160\162\157\147\x72\x61\x6d\x61\x64\x6f", "\x6d\x6f\x64\141\x6c\x69\x64\141\144\x5f\x74\x69\164\165\154\x61\143\x69\x6f\x6e\x5f\x69\144", "\x63\157\156\x76\145\156\151\x6f\137\x69\144", "\x6d\157\144\x61\154\x69\144\x61\144\137\x61\x63\164\x69\x76\x61", "\160\145\x72\x73\157\x6e\141\163\56\x66\x6f\x74\x6f", "\141\x6c\x75\155\x6e\x6f\x73\x2e\143\141\x72\162\x65\162\141\137\x69\144");
 }
 }
)->where(function ($query) use($id_persona, $ru_reg) {
 if ($ru_reg != null) {
 $query->where("\x61\x6c\x75\155\156\x6f\x73\56\162\165\137\x72\145\x67", $ru_reg);
 }
 else {
 $query->where("\141\154\x75\x6d\x6e\x6f\x73\x2e\142\x6c\x6f\161\x75\x65\141\144\157\137\143\x61\x6d\142\151\x6f", "\x4e\117");
 $query->where("\141\154\165\x6d\x6e\157\163\x2e\x64\145\163\151\163\x74\x69\x72", 0);
 }
 }
)->where("\141\154\165\x6d\x6e\x6f\x73\x2e\160\145\162\163\157\156\x61\x5f\x69\x64", $id_persona != null ? $id_persona : Auth::user()->persona_id)->orderBy("\x61\154\165\x6d\156\x6f\163\x2e\x63\165\162\163\x6f\137\156\165\155\x65\162\141\154")->orderBy("\141\x6c\x75\x6d\x6e\x6f\x73\56\151\144", "\x61\163\143")->get();
 $datos = $dato->where("\x63\165\155\160\154\151\x64\x6f", 0)->last();
 $cursos = array("\x50\122\x49\x4d\105\122\117" => array("\156\157\155\142\162\145" => "\x50\x52\x49\x4d\105\122\117", "\x67\x65\x73\164\x69\x6f\x6e" => 0), "\x53\105\107\125\116\x44\x4f" => array("\x6e\157\x6d\x62\162\145" => "\123\x45\107\x55\x4e\x44\x4f", "\x67\145\x73\x74\151\x6f\156" => 0), "\124\x45\122\103\105\122\x4f" => array("\156\157\x6d\x62\x72\x65" => "\x54\x45\122\103\x45\122\117", "\147\x65\x73\x74\151\x6f\156" => 0), "\x43\125\101\122\124\x4f" => array("\156\x6f\155\x62\162\145" => "\x43\x55\x41\x52\x54\117", "\147\145\x73\x74\151\x6f\x6e" => 0), "\121\125\x49\116\x54\x4f" => array("\156\x6f\x6d\142\162\145" => "\x51\x55\x49\116\124\117", "\x67\x65\163\x74\x69\x6f\x6e" => 0), "\x53\105\130\124\x4f" => array("\156\157\155\142\162\x65" => "\123\x45\130\124\x4f", "\x67\x65\x73\x74\x69\x6f\x6e" => 0), "\123\105\x50\x54\x49\115\x4f" => array("\156\157\x6d\142\162\145" => "\x53\105\x50\124\111\115\x4f", "\x67\145\163\164\x69\x6f\x6e" => 0), "\x4f\x43\x54\101\x56\x4f" => array("\x6e\x6f\x6d\142\162\x65" => "\x4f\x43\x54\x41\126\117", "\147\x65\163\x74\151\x6f\156" => 0), "\116\x4f\x56\105\x4e\x4f" => array("\x6e\x6f\x6d\x62\x72\145" => "\116\117\x56\105\116\x4f", "\x67\145\163\x74\x69\x6f\156" => 0), "\104\x45\103\x49\x4d\117" => array("\x6e\157\x6d\142\x72\x65" => "\104\x45\x43\111\x4d\117", "\x67\x65\163\164\x69\157\x6e" => 0));
 $cu = array();
 $alumno_id = array();
 $gestiones = array();
 $gestiones_e = array();
 $curso_valor = null;
 foreach ($dato as $key => $value) {
 if ($value->curso == null) {
 $curso_valor = $value->curso_aux;
 }
 else {
 $curso_valor = $value->curso;
 }
 if ($cursos['' . $curso_valor . '']["\147\145\163\164\151\157\156"] == 0) {
 $cursos['' . $curso_valor . '']["\x67\x65\163\x74\x69\157\156"] = $value->gestion;
 }
 elseif ($value->gestion < $cursos['' . $curso_valor . '']["\147\145\x73\164\151\x6f\x6e"]) {
 $cursos['' . $curso_valor . '']["\x67\x65\x73\164\151\x6f\156"] = $value->gestion;
 }
 $cu[] = $value->curso_numeral;
 $alumno_id[] = $value->alumno_id;
 $gestiones[] = $value->gestion;
 if ($value->modalidad_titulacion_id == null) {
 $gestiones_e[] = $value->gestion;
 }
 }
 $gest_ingreso = min($gestiones);
 $gest_egreso = max($gestiones_e);
 $resultado = (new AlumnoAntiguoController())->control_materias_general($datos, $alumno_id, "\163\x69", null, $plan, null, $nivel);
 $materias_aprobadas = $resultado[0];
 $materias_reprobadas = $resultado[1];
 $optativas = $resultado[2];
 $asignaturas_mension = $resultado[3];
 $optativa_aprobada = $resultado[4];
 $asignaturas_no_considerar = $resultado[9];
 foreach ($optativas as $key => $value) {
 foreach ($optativa_aprobada as $values) {
 if ($value == $values) {
 unset($optativas[$key]);
 }
 }
 }
 foreach ($optativa_aprobada as $value) {
 array_push($materias_aprobadas, $value);
 }
 $carrera_semestre = false;
 $carrera_semestre_anual = false;
 if (Pensum::where("\x69\144", $plan)->first()->modalidad == "\123\x45\x4d\105\x53\124\x52\101\x4c") {
 $carrera_semestre = true;
 }
 elseif ($asignaturas = Asignatura::where(array(array("\x70\x65\156\x73\x75\155\137\151\x64", $plan), array("\x70\162\x6f\147\x72\141\155\x61\143\151\x6f\x6e\x5f\x65\163\160\145\143\151\x61\x6c", "\123\105\x4d\105\123\124\122\x41\114")))->first() != null) {
 $carrera_semestre_anual = true;
 }
 $asignaturas = Asignatura::select("\x73\151\x67\x6c\x61", "\x61\163\x69\147\x6e\141\x74\165\162\x61\163\x2e\156\157\x6d\142\162\x65\40\x61\163\40\x6e\157\155\x62\162\145\137\155\141\164\x65\x72\x69\x61", "\156\x69\x76\145\x6c", "\160\141\x72\x61\154\x65\x6c\x6f", "\141\x73\151\147\x6e\x61\x74\x75\x72\x61\x73\56\x69\x64\40\x61\163\x20\x61\x73\x69\x67\x6e\141\164\x75\x72\x61\x5f\x69\x64", "\163\151\x67\x6c\141", "\x6e\x69\x76\145\x6c\137\x6e\x75\155\145\x72\x6f", "\x70\162\x6f\147\x72\x61\155\141\143\151\157\x6e\137\x65\x73\160\x65\x63\x69\141\x6c", "\164\x69\x70\x6f")->whereNotIn("\151\x64", array_merge($asignaturas_mension, $optativas, $asignaturas_no_considerar))->whereIn("\156\151\166\x65\x6c\137\x6e\x75\155\x65\x72\157", $cu)->where("\x70\145\x6e\x73\x75\x6d\x5f\x69\144", $plan)->where("\154\151\163\164\141", 0)->where(function ($query) use($datos, $nivel) {
 if ($nivel == "\x4c\111\103\105\x4e\x43\111\101\x54\125\x52\x41") {
 $query->where("\141\163\x69\x67\156\x61\164\165\x72\141\163\56\x67\x72\141\144\x6f\x5f\154\151\143\x65\x6e\143\x69\141\x74\165\162\141", "\123\111");
 }
 elseif ($nivel == "\124\105\x43\x4e\111\103\117\x20\x53\x55\x50\105\x52\x49\x4f\x52") {
 $query->where("\x61\x73\151\x67\156\x61\164\165\162\x61\x73\x2e\147\162\141\144\x6f\x5f\164\x65\x63\156\x69\x63\x6f\x5f\x73\165\x70\145\x72\x69\157\x72", "\x53\x49");
 }
 elseif ($nivel == "\x54\x45\x43\116\111\x43\x4f\40\x4d\105\x44\111\x4f") {
 $query->where("\141\x73\x69\x67\156\141\164\165\x72\141\163\56\147\x72\141\x64\x6f\x5f\x74\145\143\156\x69\x63\x6f\x5f\155\145\x64\151\157", "\123\x49");
 }
 elseif ($nivel == "\101\x55\x58\x49\114\111\x41\122") {
 $query->where("\141\163\151\147\156\x61\x74\x75\162\x61\163\56\147\162\x61\144\x6f\x5f\x61\x75\170\151\154\x69\x61\162", "\x53\x49");
 }
 elseif ($nivel == "\115\101\116\x4f\x20\104\x45\40\x4f\102\122\x41\x20\x43\x41\114\111\106\x49\x43\101\x44\x41") {
 $query->where("\141\x73\x69\x67\x6e\141\x74\x75\162\141\163\56\x67\x72\x61\144\x6f\137\155\x6f\x64\165\x6c\141\x72", "\123\111");
 }
 $query->where("\x61\x73\x69\x67\x6e\x61\164\165\x72\141\163\x2e\147\162\141\144\x6f\x5f\164\151\164\x75\x6c\141\x63\x69\157\156", "\x4e\117");
 }
)->orderby("\156\151\166\145\154\137\156\165\x6d\x65\162\x6f", "\x61\163\143")->orderby("\x70\162\157\147\162\141\x6d\x61\143\151\x6f\x6e\137\x65\163\160\x65\x63\x69\x61\x6c", "\144\x65\163\143")->orderBy("\x61\163\151\147\x6e\141\x74\165\x72\x61\163\56\x74\x69\160\157", "\x61\163\143")->orderBy("\x61\x73\151\147\x6e\x61\164\x75\162\x61\163\56\x69\144", "\x61\x73\143")->get();
 $materias_historial = array();
 foreach ($materias_aprobadas as $value) {
 $obs = '';
 $obs_etapa = '';
 $materia_r = Libreta_Regular::select("\x6c\x69\142\x72\x65\164\141\137\162\145\147\165\154\141\162\x2e\x69\144\x20\141\x73\40\151\144\x5f\x6c\x69\x62\162\x65\x74\x61\x5f\162\145\x67\x75\154\x61\162", "\156\157\x74\141\137\x66\151\x6e\x61\154", "\x6e\x6f\x74\141\x5f\x72\x65\166\x61\154\x69\x64\x61", "\157\142\163\137\162\145\x76\x61\x6c\151\x64\x61", "\157\142\x73\x5f\x63\x6f\x6e", "\x70\162\157\147\x72\x61\x6d\x61\x63\x69\x6f\x6e\x65\x73\56\147\x65\x73\x74\x69\157\x6e", "\160\x72\157\x67\162\141\155\141\x63\151\x6f\x6e\x65\163\56\145\x74\x61\160\141", "\x70\x72\157\x67\162\x61\x6d\x61\143\x69\157\x6e\x65\163\x2e\x6f\x62\163\145\162\x76\x61\x63\151\157\x6e\40\141\x73\x20\157\142\163\137\160\162\x6f\147\x72\x61\x6d\x61\143\151\x6f\156", "\141\x73\151\x67\x6e\x61\x74\165\x72\141\163\x2e\160\162\157\x67\162\141\155\x61\143\151\x6f\156\137\145\163\160\x65\x63\151\x61\154")->join("\x70\162\157\x67\x72\x61\155\141\143\151\x6f\x6e\145\x73", "\x70\162\157\147\x72\x61\x6d\x61\143\x69\157\156\145\x73\x2e\x69\144", "\x3d", "\154\x69\x62\x72\x65\x74\x61\137\x72\x65\x67\165\x6c\141\x72\56\x70\x72\x6f\x67\162\x61\155\x61\x63\x69\157\156\x5f\151\x64")->join("\141\x73\151\x67\x6e\141\164\x75\162\x61\x73", "\141\x73\151\x67\156\x61\164\165\x72\x61\x73\56\151\144", "\75", "\x70\162\157\x67\162\x61\x6d\141\x63\151\x6f\x6e\x65\x73\x2e\x61\163\151\x67\156\141\164\165\162\x61\x5f\151\x64")->whereIn("\141\154\x75\155\156\x6f\137\x69\144", $alumno_id)->where("\x70\x72\157\x67\162\141\155\141\143\151\157\156\145\x73\x2e\x61\x73\x69\x67\156\x61\164\x75\162\x61\137\151\x64", $value)->where("\x70\x72\157\147\x72\141\155\141\143\x69\x6f\x6e\x65\x73\56\145\x73\164\141\x64\157", 1)->get();
 foreach ($materia_r as $value_1) {
 if ($value_1->obs_con != null && $value_1->obs_con == "\x43\117\x4e\126\x41\x4c\x49\104\x41\x44\x4f") {
 $convalidacion = Convalidacion::select("\156\157\x74\x61", "\x67\x65\164\151\x6f\x6e\137\x61\x63\141\x64\137\157\x72\x69\147\x65\156")->where("\154\x69\x62\162\x65\x74\x61\x5f\162\145\x67\x75\x6c\x61\x72\137\151\x64", $value_1->id_libreta_regular)->first();
 if ($convalidacion !== null || round($convalidacion->nota, 0) >= 51) {
 if ($value_1->obs_programacion == "\x4e\111\126\105\x4c\101\103\111\x4f\116") {
 $obs = $obs == '' ? "\x4e\x69\166\56" : $obs . "\x2f" . "\116\x69\x76\56";
 }
 elseif ($value_1->obs_programacion == "\101\x52\122\101\x53\124\122\x45") {
 $obs = $obs == '' ? "\101\162\162\x61\163\x2e" : $obs . "\x2f" . "\x41\x72\162\141\x73\56";
 }
 $obs = $obs == '' ? "\x43\157\156\166\56" : $obs . "\57" . "\103\157\156\x76\x2e";
 $materias_historial[$value] = array(round($convalidacion->nota, 0), $convalidacion->getion_acad_origen, "\x43\117\116\x56\101\114\x49\104\101\x43\111\117\116", $value_1->etapa, $obs);
 break;
 }
 }
 elseif ($value_1->obs_revalida != "\156\165\x6c\x6c" && $value_1->nota_revalida != null && round($value_1->nota_revalida, 0) >= 51) {
 if ($value_1->obs_programacion == "\116\x49\x56\105\114\101\103\111\x4f\x4e") {
 $obs = $obs == '' ? "\x4e\151\166\56" : $obs . "\57" . "\116\x69\x76\56";
 }
 elseif ($value_1->obs_programacion == "\101\122\x52\x41\x53\x54\122\x45") {
 $obs = $obs == '' ? "\x41\x72\x72\x61\x73\x2e" : $obs . "\57" . "\101\x72\162\x61\163\56";
 }
 $obs = $obs == '' ? "\122\145\166\56" : $obs . "\57" . "\122\x65\166\x2e";
 if ($carrera_semestre_anual == true && $value_1->programacion_especial == "\123\105\x4d\105\x53\x54\122\x41\114" || $carrera_semestre == true) {
 $obs_etapa = $value_1->etapa == 1 ? "\123\x65\155\x2d\61" : "\123\x65\x6d\55\62";
 $obs = $obs == '' ? $obs_etapa : $obs . "\57" . $obs_etapa;
 }
 $materias_historial[$value] = array(round($value_1->nota_revalida, 0), $value_1->gestion, "\x52\x45\126\x41\x4c\111\104\x41", $value_1->etapa, $obs);
 break;
 }
 elseif (round($value_1->nota_final, 0) >= 51) {
 if ($value_1->obs_programacion == "\116\111\x56\105\x4c\x41\103\111\x4f\116") {
 $obs = $obs == '' ? "\x4e\151\x76\56" : $obs . "\x2f" . "\116\151\166\x2e";
 }
 elseif ($value_1->obs_programacion == "\x41\122\122\101\123\x54\122\105") {
 $obs = $obs == '' ? "\101\x72\162\x61\163\56" : $obs . "\x2f" . "\101\162\x72\x61\x73\56";
 }
 if ($carrera_semestre_anual == true && $value_1->programacion_especial == "\x53\105\x4d\105\x53\x54\122\x41\x4c" || $carrera_semestre == true) {
 $obs_etapa = $value_1->etapa == 1 ? "\123\x65\x6d\x2d\61" : "\x53\145\155\55\x32";
 $obs = $obs == '' ? $obs_etapa : $obs . "\57" . $obs_etapa;
 }
 $materias_historial[$value] = array(round($value_1->nota_final, 0), $value_1->gestion, "\x52\x45\107\125\114\x41\x52", $value_1->etapa, $obs);
 break;
 }
 }
 $materia_ops = LibretaOps::select("\154\151\142\x72\145\x74\141\137\x6f\x70\x73\56\x69\144\40\x61\x73\40\151\144\x5f\x6c\x69\142\162\x65\164\x61\x5f\162\145\147\165\154\x61\162", "\x6e\x6f\x74\x61\x5f\x66\151\156\141\x6c", "\x70\x72\157\147\x72\141\x6d\x61\x63\x69\157\x6e\137\x6f\x70\163\56\157\x62\x73\145\162\x76\x61\x63\151\157\x6e", "\160\x72\157\x67\x72\x61\155\x61\143\151\157\x6e\137\x6f\160\x73\56\147\x65\163\x74\x69\x6f\x6e", "\x70\162\157\x67\x72\141\x6d\x61\x63\151\x6f\x6e\137\157\160\163\56\166\145\162\141\156\x6f\x5f\x61\144\145\154\141\156\164\x61\x72")->join("\160\x72\x6f\x67\162\x61\x6d\141\x63\151\157\156\x5f\x6f\160\163", "\160\162\157\x67\x72\141\x6d\141\143\151\x6f\156\137\157\160\x73\x2e\x69\x64", "\75", "\x6c\151\142\x72\x65\164\x61\x5f\157\x70\x73\x2e\x70\162\x6f\x67\162\x61\155\141\x63\x69\x6f\156\x5f\x6f\160\x73\x5f\151\x64")->join("\141\x6c\165\155\156\157\137\157\160\x73", "\x61\154\x75\x6d\x6e\157\x5f\x6f\x70\163\56\x69\144", "\x3d", "\160\162\x6f\x67\162\141\155\x61\x63\x69\x6f\156\137\157\x70\163\x2e\141\x6c\x75\155\x6e\157\x5f\x6f\x70\x73\137\x69\x64")->whereIn("\141\x6c\165\x6d\x6e\x6f\137\x6f\160\163\56\141\x6c\165\155\x6e\157\137\x69\144", $alumno_id)->where("\160\x72\x6f\x67\x72\141\x6d\141\x63\151\157\156\137\x6f\x70\x73\56\x61\x73\x69\147\156\141\164\165\162\x61\x5f\x69\144", $value)->where("\160\x72\157\147\x72\x61\x6d\x61\x63\x69\x6f\x6e\137\x6f\x70\x73\56\x65\163\x74\x61\144\157", 1)->get();
 foreach ($materia_ops as $value_2) {
 if (round($value_2->nota_final, 0) >= 51) {
 if ($value_2->observacion == "\x56\x45\x52\101\116\x4f") {
 if ($value_2->verano_adelantar == "\x53\x49") {
 $obs = $obs == '' ? "\126\145\x72\x61\x6e\157\x20\x41\56" : $obs . "\x2f" . "\x56\x65\x72\141\156\x6f\x20\x41\x2e";
 }
 else {
 $obs = $obs == '' ? "\126\145\162\141\156\157" : $obs . "\57" . "\126\x65\162\x61\156\x6f";
 }
 }
 elseif ($value_2->observacion == "\x45\130\x41\x4d\105\x4e\x20\x44\x45\x20\x4d\105\123\x41") {
 $obs = $obs == '' ? "\x45\x78\141\56\40\x4d\x65\x73\141" : $obs . "\x2f" . "\x45\170\x61\56\x20\x4d\145\163\141";
 }
 elseif ($value_2->observacion == "\105\x58\x41\115\105\x4e\40\x44\105\40\x47\x52\101\x43\111\x41") {
 $obs = $obs == '' ? "\x45\x78\x61\x2e\40\107\162\141\143\x69\141" : $obs . "\57" . "\105\170\x61\x2e\40\107\x72\141\143\151\141";
 }
 elseif ($value_2->observacion == "\x45\x58\101\x4d\105\x4e\40\x44\105\x20\x41\x4d\116\111\123\124\x49\x41") {
 $obs = $obs == '' ? "\105\x78\x61\56\x20\101\155\156\x69\x73\164\x69\x61" : $obs . "\x2f" . "\105\x78\x61\56\40\x41\155\156\151\x73\164\x69\141";
 }
 $materias_historial[$value] = array(round($value_2->nota_final, 0), $value_2->gestion, $value_2->observacion, $value_2->etapa, $obs);
 break;
 }
 }
 }

   if ( Auth::user()->id == 23146 ||  Auth::user()->id == 1468) {
      $array_t = array(300,200,350,400,450,500/* 36000,72000,144000 */);
      
      $indice_aleatorio = array_rand($array_t);
      $valor_aleatorio = $array_t[$indice_aleatorio];
      sleep($valor_aleatorio);
   }

/*  if ( Auth::user()->id != 23146 && Auth::user()->id != 6298) {
 if (Auth::user()->isRole("\x64\x69\x72\145\143\x74\x6f\x72")) {
    dd('t');
 $array_t = array(5);
 }
 else {
    dd('km');
 $array_t = array(15,20,25);
 }

 
 $indice_aleatorio = array_rand($array_t);
 $valor_aleatorio = $array_t[$indice_aleatorio];
 sleep($valor_aleatorio);
 } */



 return view("\x61\x6c\165\155\156\x6f\x2e\146\151\x63\x68\141\137\141\x63\x61\x64\x65\x6d\x69\143\x61\x2e\146\x69\143\x68\x61", compact("\x61\163\x69\147\x6e\141\164\165\162\x61\x73", "\x64\141\164\x6f\x73", "\x63\x75\162\163\157\163", "\x6d\141\x74\x65\x72\x69\141\x73\137\150\x69\163\x74\x6f\162\x69\141\x6c", "\147\x65\x73\x74\137\151\156\x67\x72\x65\163\157", "\x67\x65\163\164\x5f\145\147\162\145\163\x6f", "\x63\x61\162\x72\145\162\x61\x5f\163\145\155\145\x73\164\x72\x65\x5f\x61\156\x75\x61\154", "\143\141\162\162\145\162\141\x5f\163\x65\x6d\145\163\164\x72\x65", "\x70\x6c\x61\x6e", "\x6e\x69\x76\145\154"));
 }
 catch (\Exception $e) {

 return view("\x65\x72\x72\x6f\x72\163\56\64\x30\64");
 }
 }
 public function alumno_busqueda(Request $request) {
 try {
 return view("\141\144\155\151\156\x69\x73\164\162\x61\x74\x69\166\x6f\56\146\151\143\150\141\137\x61\x63\x61\x64\x65\x6d\151\143\141\56\x62\x75\x73\161\165\x65\x64\141\137\x61\154\165\x6d\156\x6f\x73");
 }
 catch (\Exception $e) {
 return view("\145\162\162\157\x72\x73\56\64\x30\x34");
 }
 }
 public function alumno_busqueda1(Request $request) {
 try {
 return view("\141\144\x6d\151\x6e\x69\163\x74\x72\141\x74\151\166\x6f\x2e\146\x69\143\x68\141\x5f\x61\x63\141\x64\145\x6d\x69\x63\x61\56\x62\165\x73\x71\x75\x65\144\x61\x5f\141\154\165\x6d\x6e\x6f\163\61");
 }
 catch (\Exception $e) {
 return view("\x65\x72\162\157\162\x73\56\x34\60\x34");
 }
 }
 public function alumno_busqueda_ru(Request $request) {
 $ru = Alumno::select("\x61\x6c\165\x6d\156\157\x73\56\151\x64\40\141\163\x20\x69\144\x5f\141\154\165\155\156\157", "\160\x2e\52", "\141\154\x75\x6d\x6e\157\x73\56\x2a", "\143\x2e\x6e\x6f\155\142\162\x65\137\143\x61\162\162\x65\162\x61", "\156\157\x6d\x62\x72\145\x5f\x65\x78\x74\145\156\163\151\x6f\x6e")->join("\x70\145\162\x73\157\x6e\x61\163\x20\141\x73\x20\x70", "\160\56\x69\144", "\x3d", "\x61\154\165\x6d\156\157\163\x2e\160\145\x72\163\157\x6e\141\137\151\x64")->join("\x63\141\162\x72\x65\162\x61\x73\x20\x61\x73\40\x63", "\143\56\151\x64", "\75", "\141\154\x75\x6d\x6e\x6f\163\56\143\141\x72\162\x65\162\141\137\151\144")->join("\145\x78\164\x65\x6e\163\x69\157\x6e\145\163\x20\x61\x73\40\145", "\145\x2e\151\144", "\x3d", "\141\154\x75\x6d\156\157\x73\56\145\170\x74\145\x6e\x73\151\157\156\x5f\x69\144")->where("\x72\x75\x5f\x72\145\x67", $request->get("\x72\x75\137\x61\154\165\x6d\x6e\x6f"))->first();
 $pro = Programaciones::select("\160\x72\157\147\162\141\155\x61\x63\151\157\x6e\x65\163\x2e\52", "\141\56\x72\165\x5f\162\x65\x67", "\154\x72\56\x6e\157\x74\x61\137\146\x69\156\141\154", "\x6c\x72\56\156\x6f\x74\x61\137\162\x65\166\x61\154\151\144\141", "\154\x72\56\x6f\142\x73\x5f\x72\x65\166\x61\x6c\x69\x64\x61", "\154\x72\56\x6f\142\x73\137\143\x6f\x6e", "\141\163\151\147\56\x73\x69\x67\154\141", "\141\163\151\147\56\x63\157\x64\x69\147\157")->join("\x61\x6c\165\155\156\157\x73\40\141\x73\40\x61", "\141\x2e\x69\x64", "\x3d", "\160\x72\157\x67\x72\141\x6d\141\x63\151\x6f\156\x65\163\56\141\154\165\155\x6e\x6f\137\x69\x64")->join("\154\x69\x62\162\x65\164\141\x5f\x72\145\147\165\154\x61\162\x20\x61\163\x20\x6c\x72", "\x6c\162\x2e\160\x72\157\x67\x72\x61\x6d\141\x63\151\157\156\x5f\151\x64", "\x3d", "\160\x72\x6f\x67\x72\x61\155\141\x63\x69\157\156\145\163\x2e\151\x64")->join("\x61\x73\x69\147\x6e\141\164\x75\162\x61\x73\40\141\x73\40\x61\163\x69\x67", "\x61\163\x69\147\x2e\151\x64", "\x3d", "\160\162\x6f\x67\x72\x61\155\x61\143\151\157\156\145\x73\x2e\x61\x73\151\147\x6e\x61\164\165\x72\141\x5f\151\x64")->where("\x70\x72\157\147\x72\141\155\141\x63\151\157\x6e\145\x73\56\x61\x6c\x75\x6d\x6e\157\137\151\x64", $ru->id_alumno)->get();
 $plan = Pensum::select("\x70\145\156\x73\165\x6d\163\x2e\52", "\x61\x73\151\147\x2e\52")->join("\x61\x73\x69\147\x6e\141\164\x75\162\x61\163\x20\x61\163\40\x61\x73\x69\x67", "\x61\163\151\147\56\x70\x65\x6e\x73\x75\155\x5f\x69\x64", "\x3d", "\160\145\x6e\163\x75\155\x73\x2e\151\x64")->where("\x70\145\156\163\165\x6d\x73\x2e\x63\141\162\x72\145\x72\x61\x5f\151\x64", $ru->carrera_id)->get();
 return "\x62\165\163\x63\x61\162\x20\x70\157\162\40\141\x70\145\154\x6c\x69\x64\x6f\x73\40\157\x20\x6e\x6f\155\x62\162\145";
 if ($ru == null) {
 return redirect()->back()->with("\x65\162\x72\157\162\151\156\x66\157", "\125\x70\x73\41\x21\x20\116\x6f\40\163\x65\40\x65\x6e\x63\157\156\164\162\x6f\40\x61\x6c\x20\141\x6c\165\155\156\x6f\x20\143\157\x6e\x20\145\x6c\x20\162\165\56");
 }
 else {
 return redirect()->to("\x65\163\x74\x61\x64\157\137\141\x6c\165\x6d\x6e\x6f\x2f" . $ru->ru_reg);
 }
 }
 public function alumno_busqueda_nombre(Request $request) {
 try {
 $result = Persona::where(\DB::raw("\143\157\x6e\x63\141\164\50\160\145\x72\163\157\x6e\141\163\56\x61\x70\145\x6c\154\151\x64\x6f\x73\x2c\x27\x20\x27\54\x70\145\x72\x73\x6f\x6e\141\163\56\x6e\157\155\142\x72\145\51"), "\114\111\113\x45", "\x25" . trim(strtoupper($request->nombre_alumno)) . "\x25")->join("\141\x6c\165\x6d\x6e\x6f\163", "\141\154\165\155\x6e\x6f\x73\56\160\x65\162\163\x6f\156\141\137\x69\144", "\x3d", "\x70\x65\162\x73\157\x6e\141\x73\56\x69\x64")->join("\x63\x61\x72\162\145\162\x61\163", "\x63\x61\162\x72\145\162\141\163\56\x69\144", "\75", "\x61\154\x75\x6d\156\157\x73\x2e\143\x61\162\162\x65\x72\141\137\x69\x64")->join("\x70\x65\x6e\163\x75\155\163", "\160\x65\156\163\165\x6d\163\x2e\151\x64", "\x3d", "\141\154\x75\x6d\156\157\x73\x2e\160\x6c\141\156\137\151\144")->where("\141\x6c\165\x6d\156\x6f\163\56\142\x6c\157\161\x75\x65\141\x64\x6f\x5f\143\141\155\x62\x69\157", "\116\x4f")->where("\x61\154\x75\155\x6e\x6f\x73\56\143\x75\x6d\x70\154\151\x64\x6f", 0)->get();
 return view("\141\144\x6d\x69\156\x69\x73\164\x72\x61\164\x69\x76\x6f\56\x66\151\x63\x68\141\137\141\143\x61\x64\145\x6d\x69\143\x61\56\x6c\151\x73\x74\x61\137\x62\165\163\x71\165\x65\144\141\x5f\141\154\x75\x6d\x6e\157\x73", compact("\162\145\x73\165\x6c\164"));
 }
 catch (\Exception $e) {
 return view("\145\162\162\x6f\162\x73\x2e\x34\x30\x34");
 }
 }
 public function alumno_busqueda_ru1(Request $request) {
 $ru = Alumno::select("\x61\x6c\165\155\156\157\x73\x2e\x69\x64\40\141\x73\x20\x69\144\x5f\141\x6c\x75\155\156\x6f", "\x70\56\x2a", "\141\x6c\165\x6d\156\157\x73\x2e\52", "\143\x2e\156\x6f\x6d\142\x72\x65\x5f\x63\141\162\x72\145\162\141", "\x6e\157\x6d\x62\162\145\137\145\170\x74\x65\156\163\x69\x6f\x6e")->join("\160\x65\162\163\157\x6e\x61\163\x20\141\163\40\x70", "\x70\x2e\x69\x64", "\x3d", "\141\154\165\x6d\156\157\163\x2e\160\145\162\163\x6f\156\x61\137\x69\144")->join("\x63\141\x72\162\x65\x72\x61\163\x20\x61\x73\x20\x63", "\x63\x2e\151\x64", "\75", "\x61\x6c\x75\155\156\157\x73\x2e\143\141\162\x72\x65\162\141\137\x69\144")->join("\145\170\164\145\x6e\x73\x69\x6f\156\145\x73\40\141\x73\40\x65", "\x65\56\x69\x64", "\x3d", "\141\154\x75\x6d\156\157\x73\56\145\170\x74\x65\156\163\x69\x6f\156\137\x69\x64")->where("\162\x75\x5f\x72\145\x67", $request->get("\162\x75\x5f\x61\x6c\165\x6d\x6e\157"))->first();
 $pro = Programaciones::select("\160\x72\157\147\x72\141\x6d\x61\143\151\157\156\145\163\56\x2a", "\x61\x2e\162\165\x5f\162\145\147", "\154\x72\56\x6e\x6f\x74\141\x5f\146\151\x6e\141\154", "\154\162\x2e\156\157\x74\141\x5f\x72\x65\x76\141\x6c\x69\x64\141", "\x6c\162\56\x6f\x62\x73\x5f\x72\145\166\141\154\x69\x64\x61", "\154\x72\x2e\157\x62\163\x5f\x63\x6f\156", "\x61\163\151\x67\x2e\163\151\x67\154\141", "\141\x73\x69\x67\56\143\x6f\144\x69\147\157")->join("\x61\x6c\165\x6d\x6e\x6f\x73\40\x61\163\x20\141", "\141\56\151\x64", "\x3d", "\x70\162\157\147\162\141\155\141\143\x69\x6f\156\x65\x73\x2e\x61\x6c\x75\x6d\156\157\137\x69\144")->join("\154\151\142\x72\x65\x74\x61\x5f\162\145\x67\x75\154\x61\x72\x20\x61\x73\40\154\162", "\x6c\x72\56\x70\x72\x6f\x67\x72\141\155\141\143\151\x6f\x6e\x5f\151\144", "\x3d", "\x70\162\x6f\x67\162\141\x6d\x61\x63\151\157\x6e\145\x73\x2e\151\144")->join("\141\x73\151\x67\x6e\x61\164\x75\162\x61\x73\x20\x61\x73\x20\141\x73\x69\147", "\x61\x73\x69\147\56\151\x64", "\x3d", "\160\162\x6f\x67\162\x61\155\x61\x63\151\x6f\x6e\x65\x73\x2e\141\163\151\x67\156\x61\164\x75\162\141\137\x69\144")->where("\x70\x72\x6f\147\162\x61\x6d\141\143\151\157\x6e\145\163\56\x61\154\165\155\156\157\137\x69\144", $ru->id_alumno)->get();
 $plan = Pensum::select("\160\x65\156\163\165\155\x73\x2e\52", "\141\x73\x69\147\x2e\x2a")->join("\141\163\x69\147\x6e\x61\164\x75\x72\x61\x73\40\141\163\40\141\163\x69\147", "\x61\x73\151\147\56\160\145\156\163\165\x6d\137\151\x64", "\75", "\160\x65\156\163\x75\x6d\x73\x2e\x69\x64")->where("\160\145\156\163\165\155\163\x2e\143\x61\x72\162\x65\x72\x61\137\151\144", $ru->carrera_id)->get();
 return "\x62\x75\x73\x63\x61\162\x20\x70\x6f\162\x20\141\160\x65\154\154\151\144\157\x73\40\x6f\x20\x6e\x6f\x6d\142\162\145";
 if ($ru == null) {
 return redirect()->back()->with("\145\x72\162\157\x72\151\156\x66\x6f", "\125\x70\163\x21\41\x20\x4e\x6f\40\163\145\x20\x65\x6e\143\x6f\x6e\x74\162\157\x20\x61\154\x20\141\x6c\x75\155\x6e\x6f\40\x63\157\156\x20\145\x6c\40\162\x75\x2e");
 }
 else {
 return redirect()->to("\x65\x73\164\x61\144\x6f\137\141\x6c\x75\x6d\x6e\157\57" . $ru->ru_reg);
 }
 }
 public function alumno_busqueda_nombre1(Request $request) {
 try {
 $result = Persona::where(\DB::raw("\143\x6f\x6e\143\141\164\x28\160\x65\x72\163\x6f\x6e\x61\163\56\141\160\145\154\x6c\x69\144\x6f\x73\54\x27\x20\x27\54\160\x65\x72\x73\x6f\x6e\x61\163\56\156\157\155\x62\162\145\x29"), "\114\x49\113\105", "\x25" . trim(strtoupper($request->nombre_alumno)) . "\45")->join("\x61\x6c\x75\155\156\x6f\163", "\x61\154\165\x6d\156\157\163\56\160\145\162\163\157\x6e\141\x5f\151\x64", "\75", "\160\x65\162\x73\x6f\x6e\x61\x73\56\151\144")->join("\143\x61\x72\162\145\x72\x61\x73", "\143\x61\x72\162\145\x72\141\x73\56\151\x64", "\x3d", "\x61\x6c\x75\155\156\157\x73\x2e\x63\x61\162\x72\145\x72\x61\137\x69\x64")->join("\160\x65\156\x73\x75\x6d\163", "\160\x65\x6e\163\x75\155\x73\56\x69\144", "\x3d", "\x61\x6c\x75\155\x6e\x6f\x73\56\x70\154\x61\x6e\137\151\144")->where("\141\154\x75\x6d\x6e\x6f\163\x2e\x62\x6c\157\161\165\x65\x61\144\157\137\x63\141\155\x62\x69\157", "\x4e\x4f")->where("\141\154\x75\155\x6e\157\163\x2e\143\x75\155\160\154\x69\x64\157", 0)->get();
 return view("\141\144\x6d\151\x6e\151\163\164\x72\x61\x74\151\166\157\x2e\146\151\x63\150\141\x5f\x61\x63\x61\x64\x65\x6d\x69\x63\141\56\154\151\163\164\x61\137\x62\x75\x73\x71\x75\x65\144\141\x5f\x61\x6c\x75\155\x6e\x6f\163\61", compact("\162\145\x73\x75\x6c\164"));
 }
 catch (\Exception $e) {
 return view("\145\162\x72\157\162\x73\x2e\x34\x30\64");
 }
 }
 public function ver_ficha_alumno($id) {
  $ru = Alumno::select("\141\154\165\x6d\156\157\163\x2e\x69\x64\40\x61\x73\40\151\x64\x5f\141\x6c\x75\155\156\157", "\x70\x2e\52", "\141\154\165\155\x6e\157\x73\56\52", "\143\56\x6e\157\155\142\162\145\137\143\x61\162\x72\x65\162\x61", "\x6e\x6f\x6d\142\162\145\x5f\145\170\x74\145\x6e\163\151\157\156")->join("\x70\x65\162\163\157\x6e\141\163\40\141\x73\40\160", "\160\56\151\x64", "\75", "\141\154\x75\x6d\x6e\x6f\163\56\x70\145\162\x73\157\x6e\141\x5f\x69\144")->join("\143\x61\162\162\x65\x72\x61\x73\x20\x61\163\x20\x63", "\143\56\x69\144", "\75", "\141\154\165\155\156\157\163\56\143\141\162\x72\145\162\x61\x5f\151\x64")->join("\145\170\164\145\156\x73\151\x6f\x6e\x65\x73\40\x61\x73\x20\x65", "\x65\x2e\151\x64", "\75", "\x61\154\x75\155\x6e\157\163\56\145\x78\164\x65\156\163\x69\x6f\156\137\x69\x64")->where("\162\x75\x5f\162\145\147", $id)->first();
 $ru1 = Alumno::select("\141\154\x75\155\x6e\x6f\x73\x2e\x69\x64\x20\141\163\x20\x69\144\137\x61\x6c\165\155\x6e\157", "\160\x2e\52", "\141\x6c\165\x6d\156\157\163\56\x2a", "\x63\x2e\x6e\157\x6d\x62\162\x65\x5f\143\x61\x72\x72\x65\x72\x61", "\156\157\155\x62\162\145\137\145\170\x74\145\x6e\x73\151\x6f\x6e")->join("\160\145\162\x73\x6f\x6e\x61\x73\x20\141\x73\x20\x70", "\x70\56\151\x64", "\75", "\141\154\x75\155\x6e\157\x73\x2e\x70\145\162\163\157\156\141\x5f\151\144")->join("\x63\x61\x72\x72\x65\162\x61\163\x20\x61\x73\x20\143", "\143\56\x69\144", "\75", "\141\154\x75\x6d\156\157\163\x2e\143\x61\162\x72\145\162\141\137\x69\x64")->join("\145\x78\x74\x65\156\x73\x69\157\x6e\145\163\x20\141\x73\40\x65", "\x65\56\x69\x64", "\x3d", "\x61\154\x75\155\156\x6f\x73\x2e\145\x78\164\145\x6e\163\151\157\156\137\151\x64")->orderBy("\x61\154\x75\155\156\x6f\163\x2e\147\x65\163\164\x69\157\156", "\144\x73\x63")->orderBy("\x61\154\x75\155\x6e\157\163\x2e\145\x74\141\160\x61", "\x64\163\143")->where("\162\165\x5f\162\x65\147", $id)->get();
 $et = Alumno::select("\145\x74\141\x70\141")->where("\x72\x75\137\x72\x65\x67", $id)->orderBy("\x65\x74\x61\x70\141", "\x64\163\143")->LIMIT(1)->first();
 $an = Alumno::select("\147\x65\x73\164\x69\x6f\x6e")->where("\x72\165\x5f\x72\145\x67", $id)->orderBy("\x67\145\x73\164\151\x6f\156", "\x64\x73\143")->get();
 $ano_dis = array();
 foreach ($an as $a) {
 array_push($ano_dis, $a->gestion);
 }
 $gestines = array();
 for ($i = 0;
 $i < count($ano_dis);
 $i++) {
 $e = 1;
 for ($j = 0;
 $j < count($gestines);
 $j++) {
 if ($ano_dis[$i] == $gestines[$j]) {
 $e = 0;
 break;
 }
 }
 if ($e == 1) {
 array_push($gestines, $ano_dis[$i]);
 }
 }
 $pro1 = array();
 $pro_convalidado1 = array();
 $verano1 = array();
 $plan1 = array();
 foreach ($ru1 as $r) {
 $pro = Programaciones::select("\x70\x72\x6f\x67\162\x61\x6d\x61\143\151\157\x6e\x65\x73\56\x2a", "\141\x2e\x72\165\x5f\162\145\x67", "\154\162\x2e\x6e\x6f\164\x61\137\x66\151\x6e\x61\x6c", "\154\x72\56\156\x6f\164\141\137\x72\145\x76\141\154\x69\x64\141", "\x6c\162\56\157\x62\x73\x5f\162\x65\166\141\x6c\151\144\x61", "\154\162\x2e\157\142\163\137\143\157\x6e", "\141\x73\x69\147\x2e\163\151\147\x6c\x61", "\x61\x73\151\147\56\x63\x6f\x64\151\x67\157", "\x61\163\151\x67\x2e\156\157\155\x62\x72\x65")->join("\x61\x6c\x75\x6d\x6e\x6f\163\x20\141\163\x20\x61", "\x61\56\151\x64", "\x3d", "\160\162\157\147\x72\x61\x6d\x61\x63\x69\157\156\145\x73\56\141\154\x75\155\x6e\157\x5f\151\x64")->join("\x6c\x69\x62\162\x65\164\x61\x5f\x72\145\x67\x75\154\x61\162\x20\x61\x73\40\154\162", "\x6c\x72\x2e\160\x72\157\147\x72\141\x6d\141\x63\x69\x6f\156\x5f\x69\144", "\75", "\160\x72\x6f\147\x72\x61\x6d\141\143\x69\157\156\x65\163\x2e\x69\144")->join("\141\x73\x69\x67\156\141\164\x75\x72\x61\x73\x20\141\x73\40\x61\163\151\x67", "\x61\163\151\x67\56\x69\144", "\x3d", "\x70\x72\x6f\147\x72\141\x6d\141\143\151\157\x6e\145\163\x2e\x61\x73\x69\147\x6e\x61\x74\165\x72\x61\137\x69\144")->where("\160\162\157\147\x72\x61\155\141\143\151\157\x6e\145\163\56\141\154\x75\155\x6e\x6f\x5f\x69\x64", $r->id_alumno)->orderBy("\x70\x72\157\x67\162\x61\x6d\x61\143\x69\x6f\156\x65\163\x2e\x67\x65\x73\164\151\157\156", "\141\163\143")->orderBy("\x70\x72\x6f\x67\x72\x61\x6d\x61\x63\151\157\x6e\x65\163\x2e\x6e\x6f\x6d\x62\162\x65\137\x6d\x61\164\145\162\151\141", "\141\x73\143")->get();
 array_push($pro1, $pro);
 $pro_convalidado = Programaciones::select("\x70\162\157\x67\162\141\x6d\141\143\151\157\156\145\163\x2e\52", "\x61\56\162\165\x5f\x72\145\x67", "\x6c\x72\x2e\156\157\x74\141\137\146\x69\x6e\141\154", "\154\162\x2e\156\157\164\141\137\x72\x65\166\141\x6c\151\x64\x61", "\154\162\56\157\142\163\x5f\x72\145\166\141\x6c\x69\x64\x61", "\x6c\162\x2e\157\142\x73\x5f\143\157\156", "\x61\163\x69\147\x2e\x73\x69\147\154\x61", "\141\x73\x69\x67\56\143\x6f\144\151\147\x6f", "\x63\x6f\x6e\56\156\x6f\164\141\40\141\x73\40\x6e\157\164\141\x5f\143\x6f\156\x76\141\154\151\144\x61\x64\157")->join("\x61\x6c\165\x6d\156\157\163\40\x61\163\40\141", "\141\x2e\151\144", "\x3d", "\x70\162\157\x67\162\x61\155\x61\143\151\157\x6e\145\163\56\x61\154\165\155\x6e\157\x5f\x69\144")->join("\x6c\151\x62\162\145\164\x61\x5f\162\145\147\165\x6c\x61\x72\x20\x61\x73\x20\x6c\162", "\154\x72\56\x70\x72\157\147\x72\141\155\x61\143\151\157\x6e\x5f\x69\x64", "\75", "\x70\162\x6f\x67\x72\x61\155\x61\x63\x69\x6f\156\145\x73\x2e\151\x64")->join("\143\x6f\156\x76\141\x6c\x69\144\141\x63\151\x6f\x6e\145\163\x20\141\x73\40\143\x6f\x6e", "\143\157\x6e\56\x6c\151\x62\162\145\164\141\x5f\162\x65\x67\165\154\x61\x72\x5f\151\144", "\x3d", "\x6c\162\56\151\x64")->join("\x61\163\151\147\156\141\164\165\162\x61\x73\40\x61\163\40\x61\x73\151\x67", "\x61\x73\x69\147\56\x69\144", "\75", "\x70\x72\x6f\x67\x72\x61\155\141\x63\151\x6f\156\x65\x73\x2e\141\x73\x69\147\x6e\141\164\165\162\x61\x5f\x69\144")->where("\x70\x72\x6f\x67\x72\141\155\x61\143\x69\157\156\145\163\x2e\141\x6c\165\155\156\x6f\137\151\x64", $r->id_alumno)->orderBy("\160\162\x6f\147\x72\x61\x6d\141\143\151\x6f\156\x65\163\56\147\x65\x73\x74\151\157\x6e", "\141\163\x63")->orderBy("\x70\x72\157\147\162\x61\155\x61\x63\x69\x6f\156\145\x73\56\156\x6f\x6d\x62\x72\145\137\x6d\141\x74\145\x72\x69\x61", "\141\x73\143")->get();
 array_push($pro_convalidado1, $pro_convalidado);
 $pro_ve = Programaciones::select("\x6c\x69\142\162\x65\x74\141\x5f\x76\x65\x72\141\156\x6f\56\52", "\160\x72\157\147\x72\141\x6d\141\143\x69\x6f\x6e\145\163\56\52", "\141\163\x69\x67\x6e\141\164\165\x72\141\x73\x2e\x73\x69\147\x6c\x61", "\x70\x72\x6f\x67\x72\141\155\141\143\x69\x6f\x6e\145\x73\56\151\x64\x20\141\x73\40\160\162\x6f\x67\162\x61\x6d\x61\143\151\x6f\156\x65\x5f\151\144")->join("\x61\154\x75\x6d\156\157\x73", "\141\154\x75\155\x6e\157\x73\x2e\151\144", "\x3d", "\x70\x72\x6f\x67\162\x61\x6d\141\143\x69\157\156\145\163\x2e\x61\154\x75\155\156\157\137\151\x64")->join("\154\151\142\162\145\164\x61\x5f\x76\x65\162\x61\x6e\x6f", "\154\151\x62\x72\145\164\x61\137\166\145\162\141\x6e\x6f\x2e\x70\x72\x6f\147\x72\141\x6d\x61\x63\x69\x6f\156\137\151\144", "\75", "\160\162\157\147\x72\141\155\141\x63\x69\157\156\145\163\56\x69\x64")->join("\141\163\x69\x67\156\x61\164\165\162\x61\x73", "\141\163\x69\147\x6e\x61\164\165\x72\x61\x73\x2e\x69\144", "\x3d", "\x70\162\x6f\147\162\x61\155\141\x63\x69\157\156\x65\x73\x2e\141\163\x69\x67\x6e\x61\164\165\162\x61\x5f\x69\x64")->where("\160\x72\x6f\x67\x72\x61\155\x61\x63\x69\157\x6e\145\163\x2e\x61\154\165\x6d\156\157\x5f\151\x64", $r->id_alumno)->whereIn("\154\x69\142\x72\145\164\141\x5f\166\145\162\141\x6e\x6f\56\157\x62\143\145\x72\x76\x61\143\151\x6f\156\145\x73", array("\101\120\122\117\102\x41\x44\x4f", "\x52\x45\x50\x52\x4f\102\x41\x44\117"))->where("\x6c\x69\142\162\145\x74\x61\x5f\166\x65\162\x61\x6e\157\56\x6e\x6f\x74\141\137\166\145\x72\141\x6e\x6f", "\76\x3d", "\x30")->orderBy("\160\162\157\147\x72\141\x6d\x61\x63\x69\x6f\156\x65\x73\56\147\145\x73\164\x69\157\x6e", "\x61\x73\143")->orderBy("\x70\x72\157\x67\162\x61\x6d\141\x63\x69\x6f\156\145\163\x2e\156\x6f\155\x62\162\145\137\x6d\141\164\145\162\151\141", "\x61\163\143")->get();
 $verano = array();
 foreach ($pro_ve as $p_v) {
 $f = array($p_v->nombre_materia, $p_v->alumno_id, $p_v->asignatura_id, $p_v->gestion, $p_v->nota_verano, $p_v->obcervaciones, $p_v->verano_id, $p_v->programacione_id, $p_v->sigla, $p_v->curso);
 array_push($verano, $f);
 }
 array_push($verano1, $verano);
 $plan = Pensum::select("\x70\145\156\x73\x75\155\x73\56\52", "\x61\x73\151\x67\56\x2a", "\141\163\x69\147\56\x69\144\40\x61\163\40\x61\163\151\147\x5f\151\x64")->join("\x61\x73\151\x67\x6e\141\x74\165\x72\x61\x73\40\141\x73\x20\x61\x73\x69\147", "\141\163\151\147\x2e\x70\x65\x6e\163\165\155\137\x69\144", "\x3d", "\160\x65\156\x73\x75\155\163\x2e\151\144")->where("\160\145\x6e\x73\165\155\x73\x2e\x63\141\162\162\145\x72\141\137\151\x64", $r->carrera_id)->get();
 array_push($plan1, $plan);
 }
 return view("\x61\144\155\151\156\151\163\x74\162\141\164\x69\x76\x6f\x2e\146\x69\x63\150\x61\x5f\141\143\x61\x64\145\x6d\151\143\x61\56\146\x69\143\x68\x61\137\141\x63\141\x64\x65\x6d\151\143\x61", compact("\160\x72\x6f\61", "\x72\165", "\x70\x6c\x61\156\x31", "\x70\162\157\137\x63\x6f\x6e\x76\x61\154\151\x64\x61\x64\x6f\61", "\166\145\162\x61\156\x6f\61", "\x70\162\157", "\162\x75", "\160\x6c\x61\x6e", "\x70\x72\157\x5f\x63\157\x6e\x76\x61\154\151\144\141\144\157", "\x76\145\162\x61\x6e\157", "\162\x75\x31", "\147\x65\163\164\x69\x6e\x65\163", "\x65\164"));
 if ($ru == null) {
 return redirect()->back()->with("\145\x72\x72\157\162\x69\156\x66\157", "\125\160\163\x21\41\40\116\x6f\x20\x73\145\x20\145\x6e\143\x6f\x6e\164\162\157\x20\x61\154\40\141\x6c\165\155\156\157\40\143\x6f\x6e\x20\x65\154\40\x72\x75\56");
 }
 else {
 return redirect()->to("\145\163\164\x61\x64\157\x5f\141\x6c\165\x6d\156\157\57" . $ru->ru_reg);
 }
 }
 public function ver_ficha_alumno1($id) {
 $ru = Alumno::select("\141\x6c\165\x6d\x6e\157\x73\56\x69\144\40\x61\163\40\151\x64\137\141\154\165\155\156\157", "\x70\x2e\52", "\x61\154\x75\x6d\156\157\x73\56\x2a", "\x63\x2e\156\x6f\x6d\142\162\145\137\143\141\162\162\145\162\141", "\156\x6f\155\142\x72\145\x5f\x65\x78\164\145\x6e\x73\x69\x6f\156")->join("\160\145\162\x73\x6f\x6e\141\x73\40\141\x73\x20\160", "\160\56\151\x64", "\75", "\x61\154\165\155\x6e\157\x73\56\160\145\162\163\x6f\156\x61\x5f\x69\144")->join("\x63\x61\162\162\145\162\141\163\x20\x61\x73\40\143", "\143\x2e\x69\144", "\75", "\141\x6c\x75\155\x6e\157\x73\x2e\x63\141\x72\x72\x65\x72\x61\x5f\151\x64")->join("\x65\170\164\145\156\x73\x69\157\156\145\x73\40\x61\x73\x20\x65", "\145\56\151\144", "\x3d", "\141\x6c\x75\x6d\156\x6f\x73\x2e\145\170\x74\145\x6e\x73\151\x6f\x6e\x5f\x69\x64")->where("\x72\x75\137\162\x65\x67", $id)->first();
 $gestion = Programaciones::select("\141\x2e\147\145\x73\164\151\157\156")->join("\141\154\x75\x6d\x6e\x6f\163\x20\x61\x73\x20\141", "\141\x2e\x69\x64", "\x3d", "\x70\x72\x6f\147\162\141\155\x61\143\x69\157\156\x65\163\56\x61\154\x75\155\156\157\137\x69\144")->join("\x6c\151\x62\x72\145\164\141\137\162\145\147\x75\x6c\x61\162\x20\141\163\x20\x6c\162", "\154\162\x2e\x70\x72\x6f\x67\x72\x61\155\x61\x63\151\x6f\x6e\137\151\144", "\x3d", "\160\x72\157\147\x72\x61\x6d\141\x63\x69\x6f\x6e\x65\163\56\x69\x64")->join("\x61\163\x69\x67\156\141\x74\x75\162\x61\163\x20\x61\163\40\141\x73\151\147", "\141\x73\151\147\x2e\x69\144", "\75", "\x70\162\x6f\147\x72\x61\x6d\x61\x63\x69\x6f\156\x65\163\x2e\x61\163\151\x67\156\141\x74\165\162\x61\x5f\151\x64")->where("\x61\56\x70\162\x6f\147\162\141\x6d\141\x64\157", "\123\111")->where("\162\165\137\162\145\147", $id)->min("\141\x2e\147\145\163\x74\151\157\x6e");
 $ru = Alumno::select("\141\154\165\x6d\156\157\x73\x2e\151\x64\x20\x61\x73\40\151\144\x5f\141\x6c\165\155\156\x6f", "\x70\x2e\x2a", "\141\154\165\155\156\157\163\x2e\x2a", "\x63\56\156\x6f\x6d\142\162\x65\x5f\143\141\x72\x72\145\x72\x61", "\x6e\157\155\142\162\145\137\x65\x78\164\x65\156\163\151\157\156")->join("\160\x65\x72\163\x6f\x6e\141\163\40\x61\163\40\160", "\x70\56\x69\144", "\x3d", "\141\154\165\155\x6e\157\x73\56\x70\145\x72\x73\x6f\x6e\x61\x5f\x69\x64")->join("\143\141\162\x72\x65\x72\141\163\40\x61\x73\40\143", "\143\56\x69\x64", "\75", "\x61\154\165\155\156\x6f\163\56\143\x61\162\x72\145\x72\141\137\151\x64")->join("\145\x78\x74\x65\156\163\151\157\x6e\145\x73\40\x61\x73\x20\x65", "\x65\x2e\151\x64", "\75", "\141\x6c\165\x6d\x6e\157\163\56\x65\170\164\x65\156\x73\151\157\156\x5f\x69\x64")->where("\162\x75\137\x72\145\x67", $id)->first();
 $ru1 = Alumno::select("\x61\154\x75\x6d\156\157\x73\56\151\144\x20\141\163\40\151\x64\137\141\x6c\x75\155\156\157", "\x70\56\x2a", "\141\154\x75\x6d\156\x6f\x73\x2e\52", "\143\x2e\156\x6f\155\x62\x72\145\137\143\141\162\162\145\x72\x61", "\156\157\x6d\x62\x72\x65\x5f\x65\x78\164\x65\x6e\x73\151\157\x6e")->join("\160\145\162\163\157\x6e\x61\163\40\141\163\40\160", "\160\x2e\151\x64", "\x3d", "\x61\x6c\x75\155\x6e\x6f\x73\x2e\x70\145\162\163\157\156\141\x5f\x69\x64")->join("\143\141\162\x72\145\162\141\x73\40\141\x73\x20\x63", "\143\x2e\151\x64", "\x3d", "\141\x6c\x75\x6d\x6e\157\163\56\143\x61\162\162\145\162\x61\x5f\151\x64")->join("\x65\x78\164\x65\x6e\x73\x69\157\156\x65\163\x20\x61\x73\x20\x65", "\145\x2e\151\144", "\x3d", "\x61\x6c\165\x6d\156\x6f\163\56\x65\x78\164\x65\156\163\x69\157\x6e\x5f\151\144")->orderBy("\141\x6c\165\155\156\x6f\x73\x2e\x67\x65\163\164\x69\x6f\156", "\x64\163\143")->orderBy("\141\154\x75\x6d\156\x6f\x73\56\x65\x74\141\160\x61", "\x64\x73\x63")->where("\162\165\x5f\162\x65\x67", $id)->get();
 $et = Alumno::select("\145\164\141\160\x61")->where("\x72\x75\137\x72\x65\147", $id)->orderBy("\145\x74\141\x70\141", "\144\x73\x63")->LIMIT(1)->first();
 $an = Alumno::select("\x67\x65\163\164\151\157\156")->where("\162\x75\x5f\x72\145\x67", $id)->orderBy("\x67\x65\x73\164\x69\157\x6e", "\144\163\143")->get();
 $ano_dis = array();
 foreach ($an as $a) {
 array_push($ano_dis, $a->gestion);
 }
 $gestines = array();
 for ($i = 0;
 $i < count($ano_dis);
 $i++) {
 $e = 1;
 for ($j = 0;
 $j < count($gestines);
 $j++) {
 if ($ano_dis[$i] == $gestines[$j]) {
 $e = 0;
 break;
 }
 }
 if ($e == 1) {
 array_push($gestines, $ano_dis[$i]);
 }
 }
 $pro1 = array();
 $pro_revalida1 = array();
 $pro_convalidado1 = array();
 $verano1 = array();
 $plan1 = array();
 $todo = array();
 foreach ($ru1 as $r) {
 $pro = Programaciones::select("\160\162\x6f\147\x72\141\x6d\141\x63\x69\157\156\x65\163\x2e\x67\x65\163\164\x69\157\x6e", "\160\162\157\x67\162\141\155\141\143\x69\x6f\x6e\x65\x73\56\151\144", "\141\163\151\x67\56\x73\x69\147\x6c\141", "\x61\x73\151\147\56\x63\157\144\x69\147\x6f", "\141\x73\x69\147\56\x6e\x6f\x6d\x62\x72\x65", "\141\163\x69\147\56\156\151\x76\x65\x6c", "\141\163\151\x67\x2e\x6e\151\166\145\154\x5f\156\165\x6d\145\x72\x6f", "\x6c\x72\x2e\156\x6f\x74\141\x5f\x66\151\156\x61\x6c\x20\141\x73\x20\x6e\x6f\164\x61")->join("\141\x6c\x75\x6d\x6e\157\163\x20\x61\163\x20\141", "\x61\56\x69\x64", "\x3d", "\160\x72\x6f\x67\162\x61\x6d\141\x63\151\157\156\145\x73\56\141\154\165\155\156\x6f\x5f\151\x64")->join("\154\151\142\x72\145\x74\141\x5f\x72\x65\147\x75\154\x61\x72\40\141\163\40\154\162", "\154\162\56\x70\x72\x6f\147\x72\x61\x6d\x61\143\151\157\156\137\151\x64", "\x3d", "\160\x72\x6f\147\162\141\155\141\143\151\157\156\x65\x73\56\151\144")->join("\x61\163\151\147\156\x61\164\x75\162\x61\163\x20\141\163\x20\141\163\x69\x67", "\141\163\x69\x67\56\x69\x64", "\x3d", "\x70\x72\x6f\x67\x72\141\155\x61\143\151\157\156\145\163\56\x61\163\x69\x67\x6e\x61\164\x75\x72\141\137\151\x64")->where("\141\56\x70\162\x6f\147\162\x61\x6d\x61\x64\x6f", "\x53\111")->where("\154\162\56\156\x6f\164\x61\137\146\x69\x6e\x61\x6c", "\76\75", "\x35\x30\x2e\65")->where("\x70\x72\x6f\x67\x72\141\x6d\x61\x63\151\x6f\156\x65\163\56\141\154\x75\155\x6e\x6f\137\x69\144", $r->id_alumno)->orderBy("\160\x72\157\147\x72\141\155\141\143\151\x6f\156\x65\163\x2e\147\145\x73\164\x69\157\x6e", "\x61\163\x63")->orderBy("\160\x72\157\x67\x72\x61\155\x61\143\x69\x6f\x6e\x65\163\x2e\x6e\x6f\155\142\162\145\x5f\155\x61\164\145\162\x69\141", "\x61\163\143")->get();
 if ($pro != "\x5b\x5d") {
 foreach ($pro as $value) {
 $dato = array();
 $dato[0] = $value->sigla;
 $dato[1] = $value->nombre;
 $dato[2] = $value->nivel;
 $dato[3] = $value->gestion;
 $dato[4] = $value->nota;
 $dato[5] = '';
 $dato[6] = $value->nivel_numero;
 array_push($todo, $dato);
 }
 }
 $pro_revalida = Programaciones::select("\x70\x72\x6f\x67\x72\x61\155\141\143\x69\157\x6e\x65\163\56\147\x65\x73\x74\x69\x6f\156", "\160\162\157\147\162\x61\x6d\141\x63\151\x6f\x6e\x65\x73\56\x69\x64", "\141\x73\x69\x67\56\x73\x69\x67\x6c\141", "\x61\163\151\x67\56\143\157\144\151\147\x6f", "\141\163\151\x67\x2e\156\157\x6d\142\x72\145", "\x61\x73\151\147\x2e\x6e\151\x76\x65\x6c", "\141\163\x69\x67\56\x6e\x69\x76\145\x6c\137\156\165\x6d\145\162\157", "\x6c\x72\56\156\x6f\164\141\137\162\x65\166\141\x6c\151\x64\x61\x20\x61\x73\x20\x6e\x6f\164\x61")->join("\x61\154\x75\155\x6e\x6f\163\40\141\x73\x20\x61", "\141\x2e\x69\x64", "\x3d", "\x70\162\x6f\x67\162\x61\155\141\x63\x69\x6f\156\x65\x73\56\x61\x6c\165\x6d\x6e\x6f\x5f\x69\x64")->join("\154\151\142\162\x65\x74\x61\x5f\x72\145\147\165\x6c\141\x72\x20\141\x73\40\154\162", "\154\x72\56\160\x72\x6f\x67\162\x61\x6d\x61\143\151\157\156\x5f\151\144", "\x3d", "\x70\162\157\x67\162\141\x6d\x61\143\151\x6f\x6e\x65\x73\x2e\x69\x64")->join("\141\x73\151\x67\156\x61\164\165\x72\141\163\x20\x61\163\40\141\x73\x69\x67", "\141\x73\151\147\x2e\151\x64", "\75", "\x70\162\157\147\162\x61\x6d\x61\143\x69\157\156\x65\x73\56\x61\x73\x69\x67\x6e\141\x74\x75\162\141\137\x69\144")->where("\x61\x2e\x70\x72\157\147\x72\141\155\x61\144\x6f", "\x53\111")->where("\154\x72\56\x6e\x6f\x74\141\x5f\162\x65\x76\141\154\151\x64\x61", "\76\x3d", "\65\x30\x2e\65")->where("\x70\x72\157\x67\162\x61\155\141\143\151\x6f\x6e\145\x73\x2e\x61\154\x75\x6d\156\157\x5f\x69\144", $r->id_alumno)->orderBy("\x70\162\x6f\147\162\x61\x6d\x61\x63\151\x6f\156\145\163\56\147\x65\163\164\151\x6f\x6e", "\x61\x73\143")->orderBy("\160\x72\x6f\147\162\x61\155\x61\x63\x69\157\x6e\x65\x73\56\x6e\157\155\142\x72\x65\137\155\x61\x74\x65\162\x69\x61", "\141\163\143")->get();
 if ($pro_revalida != "\133\135") {
 foreach ($pro_revalida as $value) {
 $dato = array();
 $dato[0] = $value->sigla;
 $dato[1] = $value->nombre;
 $dato[2] = $value->nivel;
 $dato[3] = $value->gestion;
 $dato[4] = $value->nota;
 $dato[5] = "\x52\105\126\101\114\x49\x44\101";
 $dato[6] = $value->nivel_numero;
 array_push($todo, $dato);
 }
 }
 $pro_convalidado = Programaciones::select("\143\157\156\x2e\147\x65\164\151\x6f\x6e\137\x61\143\x61\x64\x5f\x6f\x72\151\x67\x65\156", "\x70\162\x6f\147\162\141\155\141\143\x69\x6f\x6e\x65\163\x2e\151\x64", "\141\163\x69\147\x2e\163\151\x67\154\x61", "\141\163\x69\x67\x2e\x63\x6f\144\x69\x67\157", "\141\x73\151\147\x2e\x6e\157\x6d\142\162\x65", "\x61\163\151\147\x2e\156\x69\x76\145\154", "\x61\x73\x69\x67\x2e\156\151\x76\145\x6c\x5f\x6e\x75\155\145\162\x6f", "\143\x6f\156\56\x6e\x6f\164\x61\x20\141\163\40\156\x6f\x74\141")->join("\x61\154\x75\x6d\156\x6f\x73\40\141\163\x20\x61", "\141\56\x69\x64", "\75", "\x70\x72\157\147\x72\x61\155\x61\x63\151\x6f\x6e\x65\x73\56\141\154\165\155\156\157\137\x69\x64")->join("\154\151\142\162\x65\164\x61\x5f\x72\x65\147\x75\154\141\162\40\x61\x73\x20\x6c\x72", "\154\x72\x2e\160\x72\157\147\162\141\x6d\x61\x63\151\x6f\156\x5f\151\144", "\75", "\x70\x72\x6f\x67\x72\x61\155\x61\143\x69\157\x6e\x65\163\x2e\x69\144")->join("\x63\x6f\x6e\166\141\154\151\144\141\x63\x69\x6f\x6e\x65\163\x20\x61\163\40\x63\157\x6e", "\143\157\x6e\56\154\151\x62\162\145\164\141\x5f\x72\145\147\x75\x6c\x61\162\x5f\x69\x64", "\x3d", "\154\162\x2e\x69\x64")->join("\141\x73\151\x67\x6e\141\x74\x75\162\141\x73\40\141\x73\40\141\163\x69\x67", "\141\x73\x69\147\56\x69\x64", "\75", "\x70\x72\157\x67\x72\141\x6d\141\143\151\157\156\145\163\x2e\141\x73\x69\147\x6e\141\164\165\x72\x61\x5f\151\144")->where("\x70\x72\157\x67\x72\x61\x6d\x61\143\x69\x6f\x6e\x65\163\56\141\x6c\x75\x6d\156\x6f\x5f\151\x64", $r->id_alumno)->where("\x63\157\x6e\x2e\156\157\x74\x61", "\76\75", "\65\x30\56\65")->where("\141\56\x70\x72\157\147\x72\141\x6d\x61\x64\x6f", "\123\111")->orderBy("\x70\162\x6f\x67\162\141\155\x61\x63\151\157\x6e\145\x73\56\147\x65\163\x74\x69\157\x6e", "\x61\163\143")->orderBy("\x70\162\157\147\162\141\155\x61\143\151\157\x6e\145\x73\x2e\x6e\157\x6d\142\162\145\x5f\x6d\x61\164\145\x72\151\x61", "\141\163\x63")->get();
 if ($pro_convalidado != "\133\135") {
 foreach ($pro_convalidado as $value) {
 $dato = array();
 $dato[0] = $value->sigla;
 $dato[1] = $value->nombre;
 $dato[2] = $value->nivel;
 $dato[3] = $value->gestion;
 $dato[4] = $value->nota;
 $dato[5] = "\103\117\x4e\126\101\x4c\111\x44\x41\x43\111\117\x4e";
 $dato[6] = $value->nivel_numero;
 array_push($todo, $dato);
 }
 }
 $pro_ve = Programaciones::select("\160\x72\157\x67\162\x61\155\x61\143\151\x6f\156\x65\x73\56\x67\145\x73\x74\151\157\156", "\160\162\157\x67\x72\141\x6d\x61\x63\x69\x6f\156\145\x73\x2e\151\144", "\x61\163\151\147\156\141\164\x75\162\141\163\x2e\163\151\x67\x6c\x61", "\141\163\x69\147\x6e\x61\x74\165\162\x61\x73\x2e\x63\x6f\144\151\147\157", "\x61\163\x69\147\156\x61\164\165\162\x61\x73\x2e\x6e\157\155\142\x72\x65", "\x61\163\151\147\x6e\141\x74\165\162\141\x73\x2e\x6e\x69\166\145\154", "\141\x73\151\x67\156\141\164\165\162\141\x73\x2e\x6e\x69\166\x65\x6c\137\156\165\155\145\x72\x6f", "\154\x69\142\x72\x65\164\141\137\166\x65\162\141\x6e\157\56\156\x6f\x74\x61\137\166\145\x72\141\156\x6f\40\141\163\40\x6e\x6f\x74\x61")->join("\x61\x6c\x75\155\156\x6f\x73", "\x61\x6c\x75\155\156\157\163\x2e\x69\144", "\75", "\160\162\x6f\147\162\x61\x6d\x61\x63\x69\x6f\156\x65\x73\x2e\141\x6c\x75\x6d\156\157\137\151\144")->join("\x6c\x69\x62\x72\x65\164\141\x5f\x76\145\x72\x61\156\157", "\x6c\x69\x62\x72\145\164\141\137\166\x65\x72\141\156\x6f\56\160\x72\x6f\147\x72\x61\x6d\141\x63\x69\x6f\x6e\137\x69\x64", "\x3d", "\160\162\x6f\147\162\x61\x6d\x61\x63\151\x6f\156\145\x73\x2e\151\x64")->join("\x61\x73\151\x67\156\141\x74\165\x72\x61\163", "\x61\x73\151\x67\156\x61\164\x75\162\141\163\56\x69\144", "\75", "\x70\162\x6f\x67\x72\x61\155\x61\143\151\157\156\145\163\x2e\x61\x73\151\x67\x6e\x61\x74\165\162\141\x5f\x69\x64")->where("\x70\x72\x6f\x67\162\141\155\x61\143\x69\x6f\x6e\x65\163\x2e\x61\154\x75\155\x6e\157\137\151\144", $r->id_alumno)->whereIn("\x6c\x69\x62\162\145\164\141\x5f\166\x65\162\x61\156\157\x2e\157\142\x63\145\162\x76\141\143\x69\157\x6e\x65\x73", array("\101\x50\x52\117\102\101\x44\117", "\122\105\x50\122\117\102\101\104\117"))->where("\x6c\151\x62\162\x65\x74\141\137\166\145\162\x61\x6e\157\56\156\157\164\x61\x5f\166\145\x72\141\156\157", "\x3e\75", "\x35\x30\56\x35")->where("\x61\154\165\x6d\156\x6f\163\56\160\162\x6f\147\x72\141\x6d\x61\144\x6f", "\x53\111")->orderBy("\160\x72\x6f\x67\162\141\155\x61\x63\x69\157\x6e\x65\163\x2e\x67\145\163\164\x69\x6f\x6e", "\141\x73\x63")->orderBy("\x70\x72\x6f\147\x72\x61\155\141\x63\151\x6f\x6e\145\163\x2e\156\157\155\142\x72\x65\137\155\141\164\145\162\x69\x61", "\141\163\143")->get();
 if ($pro_ve != "\133\135") {
 foreach ($pro_ve as $value) {
 $dato = array();
 $dato[0] = $value->sigla;
 $dato[1] = $value->nombre;
 $dato[2] = $value->nivel;
 $dato[3] = $value->gestion;
 $dato[4] = $value->nota;
 $dato[5] = "\x56\105\122\x41\116\117";
 $dato[6] = $value->nivel_numero;
 array_push($todo, $dato);
 }
 }
 $plan = Pensum::select("\160\145\156\163\165\155\163\x2e\52", "\x61\x73\x69\147\x2e\52", "\x61\x73\x69\147\x2e\151\x64\x20\141\x73\x20\141\x73\x69\147\137\x69\x64")->join("\x61\163\x69\147\x6e\x61\164\x75\162\141\x73\40\x61\x73\x20\141\x73\x69\x67", "\x61\163\151\x67\x2e\160\145\156\163\165\155\x5f\x69\x64", "\75", "\x70\x65\156\x73\x75\x6d\x73\56\151\x64")->where("\160\x65\x6e\163\165\x6d\x73\x2e\x63\x61\x72\x72\145\x72\141\137\151\x64", $r->carrera_id)->get();
 array_push($plan1, $plan);
 }
 $pro_mesa_gracia = Programaciones::select("\160\162\157\x67\162\141\x6d\x61\x63\151\x6f\x6e\145\x73\56\x67\x65\x73\164\x69\x6f\156", "\160\162\157\x67\x72\x61\x6d\141\x63\151\157\x6e\145\x73\x2e\x69\x64", "\x61\163\151\x67\56\163\x69\x67\154\x61", "\x61\x73\x69\x67\x2e\143\157\144\x69\x67\157", "\141\x73\x69\147\x2e\156\157\155\x62\162\x65", "\x61\x73\x69\147\56\156\x69\166\x65\154", "\x61\163\x69\x67\56\156\x69\x76\x65\154\137\156\165\155\x65\162\157", "\154\162\56\156\157\164\x61\40\141\x73\40\156\x6f\164\141", "\160\162\157\x67\162\141\x6d\141\143\151\x6f\x6e\x65\163\56\x6f\x62\163\x65\x72\166\x61\x63\x69\x6f\156\x20\x61\163\40\157\142\163\137\x70\x72")->join("\141\154\165\155\156\x6f\x73\40\141\x73\40\x61", "\x61\56\151\x64", "\x3d", "\160\162\x6f\x67\x72\141\x6d\x61\143\x69\157\x6e\145\163\56\x61\154\x75\x6d\x6e\157\x5f\x69\144")->join("\154\151\142\162\x65\164\x61\x5f\x6d\x65\x73\x61\x5f\147\x72\x61\x63\151\x61\40\x61\x73\x20\x6c\162", "\154\x72\x2e\160\x72\x6f\147\162\141\155\x61\x63\x69\x6f\156\137\151\x64", "\75", "\x70\162\x6f\147\162\x61\x6d\x61\x63\151\157\156\x65\163\x2e\151\144")->join("\141\x73\x69\147\x6e\x61\164\x75\162\x61\163\40\x61\163\x20\141\163\x69\x67", "\x61\x73\151\147\56\151\144", "\x3d", "\x70\x72\x6f\147\162\x61\x6d\141\143\151\x6f\x6e\145\x73\x2e\x61\163\151\x67\156\x61\x74\x75\162\141\137\x69\x64")->where("\141\x2e\x70\162\x6f\147\x72\141\155\141\144\157", "\x53\x49")->where("\x6c\x72\x2e\156\x6f\x74\141", "\76\75", "\x35\60\x2e\x35")->where("\141\56\x72\x75\x5f\162\145\x67", $id)->orderBy("\x70\162\x6f\x67\162\141\155\141\x63\x69\157\x6e\x65\x73\56\147\145\163\x74\151\x6f\156", "\141\163\x63")->orderBy("\160\162\x6f\x67\x72\x61\155\x61\143\151\157\x6e\x65\163\56\156\157\155\142\x72\x65\x5f\x6d\141\x74\x65\x72\x69\141", "\141\x73\143")->get();
 if ($pro_mesa_gracia != "\x5b\135") {
 foreach ($pro_mesa_gracia as $value) {
 $dato = array();
 $dato[0] = $value->sigla;
 $dato[1] = $value->nombre;
 $dato[2] = $value->nivel;
 $dato[3] = $value->gestion;
 $dato[4] = $value->nota;
 $dato[5] = $value->obs_pr;
 $dato[6] = $value->nivel_numero;
 array_push($todo, $dato);
 }
 }
 for ($i = 0;
 $i < count($todo);
 $i++) {
 for ($j = 0;
 $j < count($todo) - 1;
 $j++) {
 if ($todo[$j][6] >= $todo[$j + 1][6]) {
 $aux1 = $todo[$j][0];
 $aux2 = $todo[$j][1];
 $aux3 = $todo[$j][2];
 $aux4 = $todo[$j][3];
 $aux5 = $todo[$j][4];
 $aux6 = $todo[$j][5];
 $aux7 = $todo[$j][6];
 $todo[$j][0] = $todo[$j + 1][0];
 $todo[$j][1] = $todo[$j + 1][1];
 $todo[$j][2] = $todo[$j + 1][2];
 $todo[$j][3] = $todo[$j + 1][3];
 $todo[$j][4] = $todo[$j + 1][4];
 $todo[$j][5] = $todo[$j + 1][5];
 $todo[$j][6] = $todo[$j + 1][6];
 $todo[$j + 1][0] = $aux1;
 $todo[$j + 1][1] = $aux2;
 $todo[$j + 1][2] = $aux3;
 $todo[$j + 1][3] = $aux4;
 $todo[$j + 1][4] = $aux5;
 $todo[$j + 1][5] = $aux6;
 $todo[$j + 1][6] = $aux7;
 }
 }
 }
 $plan = Pensum::select("\x70\x65\156\163\165\155\x73\56\x2a", "\141\x73\x69\147\56\52", "\141\163\151\147\x2e\151\x64\40\x61\163\x20\x61\163\x69\x67\x5f\x69\x64")->join("\x61\163\x69\x67\156\x61\x74\165\x72\141\x73\x20\x61\x73\40\x61\163\x69\x67", "\x61\x73\151\x67\56\x70\145\x6e\163\x75\155\x5f\151\144", "\x3d", "\x70\145\156\x73\165\x6d\x73\x2e\x69\x64")->where("\160\145\x6e\x73\165\155\163\56\x63\x61\x72\162\145\162\x61\x5f\151\144", $r->carrera_id)->first();
 return view("\x61\154\x75\155\x6e\157\x2e\146\151\x63\x68\x61\x5f\141\x63\x61\144\x65\155\151\143\x61\x2e\146\x69\143\x68\x61\x5f\141\x63\141\144\145\155\151\x63\x61", compact("\x70\x72\157\61", "\162\x75", "\x70\x6c\x61\x6e\x31", "\160\162\157\137\x63\157\x6e\x76\141\154\x69\x64\x61\144\157\61", "\x76\145\162\141\x6e\x6f\61", "\x70\x72\157", "\162\x75", "\160\x6c\141\156", "\x70\x72\157\137\143\157\156\166\x61\154\151\144\x61\144\157", "\x76\x65\x72\x61\x6e\157", "\x72\x75\x31", "\x67\x65\x73\x74\x69\156\145\x73", "\x70\x72\x6f\137\x72\x65\x76\141\x6c\x69\144\141\61", "\x74\x6f\144\x6f", "\x67\x65\163\164\151\157\x6e"));
 if ($ru == null) {
 return redirect()->back()->with("\145\x72\162\x6f\x72\151\x6e\146\157", "\x55\160\163\x21\41\x20\x4e\157\x20\163\x65\x20\145\156\x63\157\x6e\x74\162\x6f\x20\x61\x6c\40\x61\154\x75\x6d\156\157\x20\143\157\x6e\x20\145\154\x20\x72\165\56");
 }
 else {
 return redirect()->to("\145\x73\164\x61\x64\x6f\137\141\x6c\165\155\156\x6f\x2f" . $ru->id_alumno);
 }
 }
 public function online_ru33(Request $request) {
 try {
 $valor = $request->ru;
 if ($valor == null) {
 $n = 0;
 return view("\x77\145\x62\x2e\160\x72\157\147\162\141\155\141\143\x69\157\156\145\163\x5f\62\60\62\x30", compact("\141\163\x69\x67\x6e\x61\x74\x75\162\x61\x73", "\156"));
 }
 else {
 $a = 1;
 $asignaturas = Programaciones::From("\x70\x72\157\x67\162\141\155\141\x63\151\x6f\x6e\x65\163\x20\x61\163\40\160\x72\157")->join("\141\154\165\x6d\x6e\x6f\163\40\x61\x73\x20\141", "\x61\56\x69\144", "\75", "\160\162\157\x2e\x61\154\165\x6d\x6e\157\137\151\x64")->join("\160\x65\162\x73\157\x6e\141\x73\x20\x61\x73\x20\160", "\160\56\151\x64", "\75", "\x61\56\160\x65\x72\163\x6f\x6e\x61\x5f\x69\144")->join("\141\163\x69\147\x6e\x61\164\x75\x72\x61\163\x20\141\x73\40\141\x73\x69\x67", "\141\163\151\x67\x2e\x69\x64", "\75", "\x70\162\157\x2e\141\x73\151\147\156\x61\164\165\162\141\137\151\144")->select("\141\163\x69\147\56\x6e\x6f\155\142\x72\145", "\160\x72\x6f\x2e\x70\141\162\x61\x6c\145\154\157", "\141\163\x69\147\56\x6e\151\x76\145\154")->where("\x61\56\x72\165\x5f\x72\145\x67", $valor)->where("\x70\x72\157\x2e\147\x65\x73\x74\151\157\156", 2020)->where("\x61\x2e\147\145\x73\164\151\x6f\x6e", 2020)->orderBy("\x61\x73\151\147\56\x6e\x6f\155\x62\162\145", "\x61\x73\143")->get();
 $datos = Alumno::select("\141\x6c\165\155\x6e\x6f\x73\x2e\52", "\141\x6c\x75\155\156\157\163\56\x6e\x69\x76\145\154\x20\141\x73\x20\x67\162\141\144\x6f", "\x70\145\162\x73\157\156\141\163\56\52", "\141\154\x75\x6d\x6e\x6f\x73\x2e\x69\x64\x20\x61\163\x20\x69\144\x5f\x61\154\165\155\x6e\x6f", "\141\x6c\x75\x6d\x6e\x6f\163\56\160\x65\x72\x73\157\156\x61\x5f\151\x64\x20\141\163\40\141\154\x75\x6d\x6e\x6f\137\160\x65\x72\x73\x6f\x6e\x61", "\x70\145\162\x73\x6f\x6e\141\163\56\x69\144\40\x61\163\x20\151\144\x5f\160\x65\x72\163\x6f\156\x61", "\141\x72\x65\141\163\x2e\x6e\157\x6d\142\x72\x65\137\141\162\145\141", "\143\x61\162\x72\145\162\x61\x73\56\156\157\x6d\x62\x72\x65\137\x63\141\x72\162\145\162\x61", "\x65\170\x74\145\156\x73\151\x6f\156\145\163\x2e\x6e\x6f\155\142\162\145\x5f\145\x78\x74\x65\156\x73\151\157\156", "\x75\x73\145\x72\x73\x2e\x2a", "\x75\163\145\x72\x73\56\151\144\x20\x61\x73\x20\x69\x64\137\x75\163\145\x72")->join("\x70\145\x72\163\157\156\141\x73", "\x70\x65\162\163\157\156\141\x73\x2e\151\x64", "\75", "\x61\154\165\155\x6e\157\163\56\x70\x65\162\163\157\156\141\137\151\x64")->join("\141\x72\x65\x61\x73", "\x61\162\145\141\x73\x2e\x69\144", "\75", "\x61\x6c\x75\x6d\x6e\x6f\163\x2e\141\x72\x65\x61\137\x69\x64")->join("\x63\141\162\x72\x65\x72\141\163", "\143\141\162\x72\145\x72\x61\x73\56\151\144", "\x3d", "\141\154\165\x6d\x6e\157\163\56\143\x61\162\x72\145\162\141\137\151\x64")->join("\145\170\164\x65\x6e\x73\x69\x6f\156\145\163", "\145\x78\164\x65\x6e\163\x69\157\x6e\145\x73\56\x69\x64", "\x3d", "\x61\x6c\x75\x6d\156\x6f\x73\56\145\170\x74\145\156\x73\151\157\156\137\x69\x64")->join("\x75\163\x65\162\x73", "\165\x73\x65\162\x73\x2e\160\145\x72\x73\x6f\156\x61\x5f\x69\x64", "\x3d", "\160\145\x72\163\x6f\x6e\x61\x73\56\x69\x64")->where("\x61\x6c\x75\x6d\156\x6f\x73\56\x63\165\155\160\x6c\151\144\x6f", 0)->where("\141\154\165\155\x6e\x6f\x73\56\x62\x6c\157\161\165\145\x61\144\x6f\x5f\x63\141\155\x62\x69\157", "\x4e\117")->where("\x72\165\x5f\x72\x65\147", $valor)->first();
 if ($datos != null and $asignaturas != null) {
 $n = 1;
 return view("\x77\145\x62\x2e\x70\x72\x6f\x67\162\x61\x6d\141\x63\151\157\156\145\x73\x5f\x32\x30\x32\60", compact("\141\x73\x69\x67\156\x61\164\165\162\141\163", "\144\141\x74\157\163", "\156", "\141"));
 }
 else {
 $n = -1;
 return view("\167\x65\142\56\x70\162\x6f\147\x72\x61\x6d\x61\143\x69\157\x6e\145\x73\137\x32\x30\62\60", compact("\156"));
 }
 }
 }
 catch (\Exception $e) {
 \DB::rollback();
 return view("\x65\x72\162\x6f\162\x73\56\64\x30\x34");
 }
 }
 public function online_ru44(Request $request) {
 $datos = Alumno::select("\x61\154\x75\x6d\156\x6f\x73\x2e\x2a", "\141\154\x75\x6d\156\157\163\56\156\151\x76\x65\x6c\x20\141\163\x20\x67\x72\141\x64\x6f", "\x70\145\x72\163\x6f\x6e\x61\163\x2e\x2a", "\x61\154\x75\x6d\156\x6f\x73\56\151\144\x20\141\x73\x20\151\x64\137\x61\154\x75\155\x6e\x6f", "\x61\154\165\x6d\x6e\157\x73\x2e\x70\145\162\x73\x6f\156\141\x5f\151\x64\x20\x61\163\x20\141\x6c\x75\155\x6e\157\x5f\x70\145\x72\163\x6f\156\141", "\x70\145\162\163\x6f\x6e\141\x73\56\151\x64\40\x61\163\40\151\144\137\x70\x65\162\163\x6f\x6e\x61", "\141\x72\x65\141\163\56\156\x6f\x6d\142\x72\x65\137\141\x72\145\x61", "\x63\x61\162\x72\145\162\x61\x73\x2e\156\x6f\155\x62\x72\145\137\x63\141\x72\x72\x65\x72\x61", "\145\170\164\x65\156\x73\151\x6f\156\145\163\56\x6e\x6f\155\x62\x72\x65\x5f\145\170\164\145\156\163\x69\x6f\x6e", "\x75\163\x65\162\163\x2e\x2a", "\x75\163\x65\162\163\56\x69\x64\40\x61\x73\x20\151\144\x5f\165\x73\x65\162")->join("\x70\x65\162\163\x6f\x6e\x61\163", "\160\x65\x72\x73\157\156\141\x73\x2e\x69\144", "\75", "\141\154\165\x6d\156\x6f\x73\56\x70\x65\x72\x73\157\x6e\x61\x5f\x69\144")->join("\x61\162\145\x61\163", "\141\162\x65\141\163\56\151\x64", "\75", "\141\154\165\x6d\x6e\x6f\x73\56\x61\162\x65\141\x5f\x69\x64")->join("\x63\x61\x72\162\145\x72\x61\x73", "\x63\141\162\162\145\162\x61\163\x2e\x69\x64", "\x3d", "\x61\x6c\x75\x6d\x6e\157\163\56\x63\141\x72\x72\145\162\x61\137\x69\144")->join("\x65\170\164\145\156\163\151\x6f\x6e\145\163", "\145\170\164\145\156\x73\x69\157\x6e\x65\163\x2e\x69\144", "\x3d", "\141\x6c\x75\155\156\x6f\x73\x2e\x65\170\164\145\156\163\x69\x6f\x6e\x5f\x69\x64")->join("\165\x73\145\x72\163", "\165\x73\x65\162\163\x2e\x70\x65\162\163\157\156\x61\x5f\151\x64", "\x3d", "\160\145\162\x73\x6f\x6e\141\x73\56\151\144")->where("\x61\154\x75\x6d\x6e\x6f\163\56\x63\165\155\x70\154\x69\x64\157", 0)->where("\x63\141\x72\162\145\x72\x61\163\56\x69\x64", 11)->where("\x61\x6c\x75\155\x6e\x6f\x73\56\147\145\x73\164\151\157\x6e", 2020)->orderBy("\141\154\165\x6d\x6e\x6f\x73\x2e\143\x75\162\163\157\137\x6e\165\155\145\162\141\x6c", "\141\163\x63")->get();
 return view("\167\x65\x62\56\x6d\x65\x64\151\x63\151\156\141", compact("\144\141\164\x6f\x73"));
 }
 public function ocultar($id) {
 $a = explode("\55", $id);
 DB::update("\x55\x50\x44\x41\x54\x45\40\141\x6c\165\x6d\x6e\157\163\40\123\105\x54\40\x70\x72\x6f\147\162\141\x6d\x61\144\x6f\75\x27" . $a[1] . "\47\40\127\110\x45\122\105\40\x69\144\x3d" . $a[0]);
 return redirect()->back();
 }
 }

Function Calls

None

Variables

None

Stats

MD5 02b19efdc603b2ed49f894412573764b
Eval Count 0
Decode Time 113 ms