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 Auth; use..
Decoded Output download
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
use App\Alumno;
use App\AlumnoOps;
use App\Setting_globals;
use App\ProgramacionOps;
use App\LibretaOps;
use App\ValoresDetalles;
use App\Asignatura;
use App\Matriculas;
use App\Persona;
use App\Deposito;
use Redirect;
use App\Postulante;
use App\RequisitoAlumno;
use App\Requisito_postulantes;
use App\User;
use Validator;
use DB;
use App\Programaciones;
use App\MontoInscripcion;
use App\Convenio;
use App\Desistimiento;
use App\Pensum;
use App\Carrera;
use App\Convalidacion;
use App\Libreta_Regular;
use Illuminate\Support\Facades\Crypt;
use Hash;
use Caffeinated\Shinobi\Models\Role;
use Carbon\Carbon;
use App\Mesa;
use App\Docentes;
use App\CargaHoraria;
use App\Http\Controllers\AlumnoAntiguoController;
class MesaController extends Controller {
public function estado_mesa($id) {
try {
$dato = Alumno::select("tipo_alumno", "matriculado", "alumnos.id as alumno_id", "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")->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")->where("alumnos.bloqueado_cambio", "NO")->where("ru_reg", Alumno::find($id)->ru_reg)->orderBy("alumnos.id", "asc")->get();
$datos = $dato->where("cumplido", 0)->last();
$setting_mesa = Setting_globals::select("gestion_mesa")->first();
if ($datos->tipo_alumno == "nuevo" && $datos->matriculado == "NO") {
return redirect()->to("estado_alumno/" . $datos->alumno_id);
}
$cu = array();
$alumno_id = array();
foreach ($dato as $key => $value) {
$cu[] = $value->curso_numeral;
$alumno_id[] = $value->alumno_id;
}
$ultimo_curso = max($cu);
$alumno_ops_mesa = AlumnoOps::where("gestion", Setting_globals::find(1)->gestion_mesa)->where("ru_reg", $datos->ru_reg)->where("observacion", "EXAMEN DE MESA")->first();
if ($alumno_ops_mesa != null) {
$valor = ValoresDetalles::join("valores", "valores.id", "=", "valores_detalles.valor_id")->where("valores.concepto", "Matricula Examen de Mesa")->first();
$costo = $valor->costo;
$programacion_mesa = ProgramacionOps::select("programacion_ops.alumno_ops_id", "programacion_ops.gestion", "programacion_ops.etapa", "alumno_ops.re_programado", "matriculado")->join("alumno_ops", "alumno_ops.id", "=", "programacion_ops.alumno_ops_id")->where("alumno_ops.ru_reg", $datos->ru_reg)->where("alumno_ops.observacion", "EXAMEN DE MESA")->groupBy("programacion_ops.alumno_ops_id", "programacion_ops.gestion", "programacion_ops.etapa", "alumno_ops.re_programado", "matriculado")->orderBy("programacion_ops.gestion", "desc")->orderBy("programacion_ops.etapa", "desc")->get();
$matricula_mesa = Matriculas::select("matriculas.*", "alumnos.etapa")->join("alumnos", "alumnos.id", "=", "matriculas.alumno_id")->whereIn("alumnos.id", $alumno_id)->where("tipo_matricula", "Matricula Examen de Mesa")->orderBy("matriculas.gestion", "desc")->orderBy("alumnos.etapa", "desc")->get();
return view("mesa.estado", compact("datos", "programacion_mesa", "alumno_ops_mesa", "valor", "costo", "matricula_mesa", "setting_mesa"));
}
$resultado = (new AlumnoAntiguoController())->control_materias_general($datos, $alumno_id, null, "nota_mesa");
$materias_aprobadas = $resultado[0];
$materias_reprobadas = $resultado[1];
$optativas = $resultado[2];
$asignaturas_mension = $resultado[3];
$materias_control_ops = $resultado[5];
$habilitar_mesa = true;
$asignaturas = Asignatura::select("id", "nivel", "nombre", "paralelo", "asignaturas.id as asignatura_id")->whereNotIn("id", array_merge($materias_aprobadas, $optativas, $asignaturas_mension, $materias_control_ops))->where("pensum_id", $datos->plan_id)->where("nivel_numero", "<=", $ultimo_curso)->where("lista", 0)->where(function ($query) use($datos) {
if ($datos->grado_a == "LICENCIATURA") {
$query->where("asignaturas.grado_licenciatura", "SI");
}
elseif ($datos->grado_a == "TECNICO SUPERIOR") {
$query->where("asignaturas.grado_tecnico_superior", "SI");
}
elseif ($datos->grado_a == "TECNICO MEDIO") {
$query->where("asignaturas.grado_tecnico_medio", "SI");
}
elseif ($datos->grado_a == "AUXILIAR") {
$query->where("asignaturas.grado_auxiliar", "SI");
}
elseif ($datos->grado_a == "MANO DE OBRA CALIFICADA") {
$query->where("asignaturas.grado_modular", "SI");
}
$query->where("asignaturas.grado_titulacion", "NO");
}
)->orderby("nivel_numero", "asc")->orderBy("asignaturas.tipo", "asc")->orderBy("asignaturas.id", "asc")->get();
return view("mesa.estado", compact("datos", "asignaturas", "ultimo_curso", "setting_mesa", "habilitar_mesa", "materias_control_ops"));
}
catch (\Exception $e) {
return view("errors.404");
}
}
public function programar(Request $request) {
\DB::beginTransaction();
try {
if (!isset($request->asignatura) || count($request->asignatura) == 0) {
return redirect()->back()->with("infoerror", "SELECCIONE ALGUNA ASIGNATURA!!!");
}
if (count($request->asignatura) >= 2) {
return redirect()->back()->with("infoerror", "SELECCIONE SOLO UNA ASIGNATURAS!!!");
}
$alumno = Alumno::find($request->alumno);
$alumno_ops = new AlumnoOps();
$alumno_ops->ra = $alumno->ra;
$alumno_ops->ru_reg = $alumno->ru_reg;
$alumno_ops->gestion = Setting_globals::find(1)->gestion_mesa;
$alumno_ops->fecha = date("Y-m-d");
$alumno_ops->observacion = "EXAMEN DE MESA";
$alumno_ops->persona_id = $alumno->persona_id;
$alumno_ops->alumno_id = $alumno->id;
$alumno_ops->user_registro = Auth::user()->id;
if (isset($request->ultimo_curso) && $request->ultimo_curso != null) {
$alumno_ops->curso_ops = $request->ultimo_curso;
}
if ($request->registro_p != null) {
$alumno_ops->programacion_activa = "SI";
}
$alumno_ops->save();
$asignaturas = Asignatura::whereIn("id", $request->asignatura)->get();
$contado_paralelos = count($request->paralelo);
foreach ($asignaturas as $key => $value) {
$programacion = new ProgramacionOps();
for ($i = 0;
$i < $contado_paralelos;
$i++) {
$array_paralelo = explode("-", $request->paralelo[$i]);
if (in_array($value->id, $array_paralelo)) {
$programacion->paralelo = $array_paralelo[1];
}
}
$programacion->gestion = $alumno_ops->gestion;
$programacion->fecha = date("Y-m-d");
$programacion->alumno_ops_id = $alumno_ops->id;
$programacion->asignatura_id = $value->id;
$programacion->user_id = Auth::user()->id;
$programacion->observacion = "EXAMEN DE MESA";
$programacion->save();
$libreta = new LibretaOps();
$libreta->programacion_ops_id = $programacion->id;
$libreta->save();
}
$alumno_ops->programado = "SI";
$alumno_ops->update();
\DB::commit();
return redirect()->to("imprimir_programacion/" . $alumno_ops->id . "/M");
}
catch (\Exception $e) {
\DB::rollback();
return view("errors.404");
}
}
public function re_programar_estado($alumno_ops_id) {
try {
$alumno_ops = AlumnoOps::find($alumno_ops_id);
$programacion_gracia = ProgramacionOps::select("asignaturas.id as asignatura_id", "cancelado")->join("asignaturas", "asignaturas.id", "=", "programacion_ops.asignatura_id")->where("alumno_ops_id", $alumno_ops_id)->where("programacion_ops.observacion", "EXAMEN DE MESA")->get();
$asignatura_mesa = array();
foreach ($programacion_gracia as $value) {
$asignatura_mesa[] = $value->asignatura_id;
}
$datos = Alumno::select("tipo_alumno", "matriculado", "alumnos.id as alumno_id", "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")->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")->where("alumnos.bloqueado_cambio", "NO")->where("alumnos.id", $alumno_ops->alumno_id)->orderBy("alumnos.id", "asc")->first();
$alm_dato = Alumno::select("curso_numeral", "alumnos.id as alumno_id")->where("ru_reg", Alumno::find($alumno_ops->alumno_id)->ru_reg)->get();
if ($datos->tipo_alumno == "nuevo" && $datos->matriculado == "NO") {
return redirect()->to("estado_alumno/" . $datos->alumno_id);
}
$setting_mesa = Setting_globals::select("gestion_mesa")->first();
$cu = array();
$alumno_id = array();
foreach ($alm_dato as $key => $value) {
$cu[] = $value->curso_numeral;
$alumno_id[] = $value->alumno_id;
}
$resultado = (new AlumnoAntiguoController())->control_materias_general($datos, $alumno_id, null, "nota_mesa");
$materias_aprobadas = $resultado[0];
$materias_reprobadas = $resultado[1];
$optativas = $resultado[2];
$asignaturas_mension = $resultado[3];
$materias_control_ops = $resultado[5];
$asignaturas = Asignatura::select("id", "nivel", "nombre", "paralelo", "asignaturas.id as asignatura_id")->whereNotIn("id", array_merge($materias_aprobadas, $optativas, $asignaturas_mension))->where("pensum_id", $datos->plan_id)->where("nivel_numero", "<=", $alumno_ops->curso_ops)->where("lista", 0)->where(function ($query) use($datos) {
if ($datos->grado_a == "LICENCIATURA") {
$query->where("asignaturas.grado_licenciatura", "SI");
}
elseif ($datos->grado_a == "TECNICO SUPERIOR") {
$query->where("asignaturas.grado_tecnico_superior", "SI");
}
elseif ($datos->grado_a == "TECNICO MEDIO") {
$query->where("asignaturas.grado_tecnico_medio", "SI");
}
elseif ($datos->grado_a == "AUXILIAR") {
$query->where("asignaturas.grado_auxiliar", "SI");
}
elseif ($datos->grado_a == "MANO DE OBRA CALIFICADA") {
$query->where("asignaturas.grado_modular", "SI");
}
$query->where("asignaturas.grado_titulacion", "NO");
}
)->orderby("nivel_numero", "asc")->orderBy("asignaturas.tipo", "asc")->orderBy("asignaturas.id", "asc")->get();
return view("mesa.estado_re_programar", compact("datos", "asignaturas", "asignatura_mesa", "alumno_ops", "setting_mesa", "materias_control_ops"));
}
catch (\Exception $e) {
return view("errors.404");
}
}
public function re_programar_update(Request $request) {
\DB::beginTransaction();
try {
$alumno_ops = AlumnoOps::find($request->alumno_ops);
if (!isset($request->asignatura) || count($request->asignatura) == 0) {
return redirect()->back()->with("infoerror", "SELECCIONE ALGUNA ASIGNATURA!!!");
}
if (count($request->asignatura) >= 2) {
return redirect()->back()->with("infoerror", "SELECCIONE SOLO UNA ASIGNATURAS!!!");
}
$asignaturas = $request->asignatura;
$asig_m = ProgramacionOps::select("programacion_ops.id as prog_id", "asignaturas.id as asignatura_id", "cancelado")->join("asignaturas", "asignaturas.id", "=", "programacion_ops.asignatura_id")->where("alumno_ops_id", $alumno_ops->id)->where("programacion_ops.observacion", "EXAMEN DE MESA")->get();
$id_destroy = array();
$id_no_destroy = array();
foreach ($asig_m as $value) {
$po = ProgramacionOps::find($value->prog_id);
if ($asignaturas !== null) {
if (in_array($value->asignatura_id, $asignaturas)) {
if (($clave = array_search($value->asignatura_id, $asignaturas)) !== false) {
unset($asignaturas[$clave]);
}
}
else {
$id_destroy[] = $value->prog_id;
}
}
}
$asig_m_libreta = LibretaOps::select("libreta_ops.id as id_lib", "programacion_ops.id as programacion_id")->join("programacion_ops", "programacion_ops.id", "=", "libreta_ops.programacion_ops_id")->whereIn("programacion_ops_id", $id_destroy)->get();
$id_destroy_libreta = array();
$id_destroy_programacion = array();
foreach ($asig_m_libreta as $value_libreta) {
$id_destroy_libreta[] = $value_libreta->id_lib;
$id_destroy_programacion[] = $value_libreta->programacion_id;
}
LibretaOps::destroy($id_destroy_libreta);
ProgramacionOps::destroy($id_destroy_programacion);
$alumno_ops->re_programado = "SI";
$alumno_ops->update();
\DB::commit();
if (!isset($asignaturas) || count($asignaturas) == 0 || $asignaturas == null) {
return redirect()->to("estado_mesa/" . $alumno_ops->alumno_id)->with("info", "Las asignaturas fueron reprogramadas con exito!!");
}
$asignaturas_p = Asignatura::whereIn("id", $asignaturas)->get();
$contado_paralelos = count($request->paralelo);
foreach ($asignaturas_p as $key => $value) {
$programacion = new ProgramacionOps();
for ($i = 0;
$i < $contado_paralelos;
$i++) {
$array_paralelo = explode("-", $request->paralelo[$i]);
if (in_array($value->id, $array_paralelo)) {
$programacion->paralelo = $array_paralelo[1];
}
}
$programacion->gestion = $alumno_ops->gestion;
$programacion->fecha = date("Y-m-d");
$programacion->alumno_ops_id = $alumno_ops->id;
$programacion->asignatura_id = $value->id;
$programacion->user_id = Auth::user()->id;
if ($alumno_ops->matriculado == "SI") {
$programacion->cancelado = "SI";
}
$programacion->observacion = "EXAMEN DE MESA";
$programacion->save();
$libreta = new LibretaOps();
$libreta->programacion_ops_id = $programacion->id;
$libreta->save();
}
if ($request->registro_p != null) {
$alumno_ops->programacion_activa = "SI";
}
$alumno_ops->update();
\DB::commit();
return redirect()->to("estado_mesa/" . $alumno_ops->alumno_id)->with("info", "Las asignaturas fueron reprogramadas con exito!!");
}
catch (\Exception $e) {
\DB::rollback();
return redirect()->back();
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
use App\Alumno;
use App\AlumnoOps;
use App\Setting_globals;
use App\ProgramacionOps;
use App\LibretaOps;
use App\ValoresDetalles;
use App\Asignatura;
use App\Matriculas;
use App\Persona;
use App\Deposito;
use Redirect;
use App\Postulante;
use App\RequisitoAlumno;
use App\Requisito_postulantes;
use App\User;
use Validator;
use DB;
use App\Programaciones;
use App\MontoInscripcion;
use App\Convenio;
use App\Desistimiento;
use App\Pensum;
use App\Carrera;
use App\Convalidacion;
use App\Libreta_Regular;
use Illuminate\Support\Facades\Crypt;
use Hash;
use Caffeinated\Shinobi\Models\Role;
use Carbon\Carbon;
use App\Mesa;
use App\Docentes;
use App\CargaHoraria;
use App\Http\Controllers\AlumnoAntiguoController;
class MesaController extends Controller {
public function estado_mesa($id) {
try {
$dato = Alumno::select("\x74\x69\x70\x6f\x5f\x61\154\165\x6d\x6e\157", "\155\141\x74\162\151\x63\165\x6c\141\x64\x6f", "\x61\154\165\155\156\x6f\x73\x2e\151\x64\40\141\163\40\141\154\165\155\x6e\x6f\137\151\x64", "\x63\x75\x72\163\x6f\x5f\156\x75\x6d\145\x72\141\154", "\x70\x6c\141\x6e\137\x69\144", "\x61\x6c\165\155\x6e\157\163\56\156\x69\166\145\x6c\x20\x61\163\40\x67\x72\x61\x64\x6f\x5f\141", "\160\145\162\163\157\x6e\x61\163\56\x6e\x6f\155\x62\162\x65", "\x61\x70\x65\154\x6c\x69\x64\x6f\163", "\143\151\x5f\x70\145\x72\163\x6f\156\141", "\x67\145\156\x65\x72\157", "\141\x63\164\151\166\x61\x74\145\x64", "\162\x75\137\162\x65\x67", "\162\x61", "\141\154\165\x6d\156\157\x73\56\147\145\163\x74\x69\157\x6e", "\141\154\165\155\156\x6f\163\x2e\146\145\143\150\x61\x20\x61\163\x20\x66\x65\x63\x68\141\x5f\141\x6c\x75\155\156\157", "\156\157\x6d\x62\162\x65\137\141\x72\145\x61", "\156\157\x6d\x62\x72\x65\x5f\143\141\162\162\145\x72\x61", "\156\157\155\142\162\x65\x5f\145\x78\164\x65\x6e\x73\151\x6f\156", "\x79\145\x61\x72", "\x63\141\162\x72\x65\162\x61\137\160\141\x72\141\154\x65\x6c\141", "\164\151\160\157\x5f\151\x6e\x73\143\162\x69\160\143\x69\x6f\156", "\141\154\x75\x6d\156\x6f\163\56\x63\x75\x72\x73\157", "\x63\141\x6d\142\x69\157", "\164\x69\x70\157\137\x61\154\x75\155\156\157", "\x72\x65\160\162\x6f\x67\x72\x61\155\x61\144\157", "\x72\145\x70\162\x6f\x67\x72\141\x6d\x61\144\x6f", "\155\157\144\x61\x6c\151\144\x61\144\x5f\164\151\x74\x75\x6c\141\x63\x69\x6f\156\137\x69\144", "\x63\157\156\166\x65\x6e\151\157\x5f\x69\144", "\x6d\157\144\141\x6c\x69\144\x61\x64\x5f\141\143\x74\x69\x76\141")->join("\160\145\162\x73\157\x6e\141\163", "\160\x65\162\163\x6f\x6e\141\163\56\151\144", "\75", "\141\154\x75\155\x6e\157\163\x2e\160\x65\x72\x73\x6f\x6e\x61\137\x69\x64")->join("\x61\162\x65\141\163", "\x61\162\145\141\x73\x2e\151\144", "\75", "\x61\x6c\165\155\156\157\x73\56\x61\x72\x65\141\137\151\144")->join("\x63\x61\x72\x72\x65\162\x61\163", "\143\x61\x72\162\x65\162\x61\x73\x2e\151\144", "\75", "\x61\x6c\x75\x6d\x6e\157\163\56\x63\x61\162\x72\145\162\141\x5f\151\x64")->join("\x65\x78\164\x65\156\x73\151\157\x6e\x65\163", "\x65\170\164\145\x6e\x73\151\157\156\145\163\x2e\151\144", "\75", "\x61\154\x75\x6d\156\157\x73\56\145\x78\164\x65\156\163\x69\x6f\156\137\151\144")->join("\x75\163\145\162\x73", "\x75\163\145\x72\x73\x2e\160\145\162\x73\157\x6e\141\137\x69\144", "\75", "\x70\145\x72\x73\157\x6e\141\163\x2e\151\x64")->join("\160\145\156\x73\x75\155\x73", "\x70\x65\x6e\x73\x75\x6d\163\x2e\x69\144", "\75", "\141\x6c\x75\x6d\x6e\157\x73\x2e\x70\154\141\x6e\137\x69\144")->where("\x61\154\x75\x6d\156\x6f\x73\56\142\154\x6f\161\x75\x65\x61\144\157\137\143\141\155\142\151\x6f", "\116\x4f")->where("\x72\x75\137\x72\x65\147", Alumno::find($id)->ru_reg)->orderBy("\141\154\165\155\x6e\157\163\x2e\151\x64", "\x61\163\x63")->get();
$datos = $dato->where("\x63\x75\155\x70\x6c\151\144\157", 0)->last();
$setting_mesa = Setting_globals::select("\147\x65\x73\164\151\157\x6e\137\x6d\145\163\x61")->first();
if ($datos->tipo_alumno == "\156\x75\145\166\x6f" && $datos->matriculado == "\116\117") {
return redirect()->to("\x65\163\x74\x61\x64\x6f\137\x61\154\165\x6d\156\157\57" . $datos->alumno_id);
}
$cu = array();
$alumno_id = array();
foreach ($dato as $key => $value) {
$cu[] = $value->curso_numeral;
$alumno_id[] = $value->alumno_id;
}
$ultimo_curso = max($cu);
$alumno_ops_mesa = AlumnoOps::where("\147\145\163\164\x69\157\156", Setting_globals::find(1)->gestion_mesa)->where("\162\x75\137\x72\x65\147", $datos->ru_reg)->where("\x6f\x62\163\145\162\166\141\143\151\x6f\x6e", "\105\130\x41\x4d\105\x4e\40\104\x45\x20\x4d\105\123\x41")->first();
if ($alumno_ops_mesa != null) {
$valor = ValoresDetalles::join("\x76\141\x6c\157\x72\145\163", "\166\x61\154\x6f\162\145\163\x2e\x69\144", "\75", "\166\x61\154\x6f\x72\145\x73\137\144\x65\x74\141\154\x6c\x65\x73\56\166\141\x6c\157\x72\137\151\x64")->where("\166\141\x6c\x6f\x72\145\x73\x2e\x63\x6f\x6e\x63\145\x70\164\157", "\115\x61\164\x72\x69\x63\165\x6c\x61\x20\105\x78\141\155\145\x6e\40\144\145\40\x4d\145\x73\141")->first();
$costo = $valor->costo;
$programacion_mesa = ProgramacionOps::select("\160\x72\157\147\x72\141\155\141\143\x69\x6f\x6e\x5f\x6f\x70\163\x2e\141\x6c\x75\x6d\x6e\157\x5f\157\160\x73\x5f\151\144", "\160\x72\x6f\147\x72\x61\155\x61\143\151\x6f\x6e\x5f\157\x70\163\56\x67\145\x73\164\151\x6f\156", "\160\162\x6f\147\162\x61\x6d\141\143\x69\157\156\x5f\x6f\x70\x73\x2e\x65\164\x61\160\141", "\x61\154\x75\155\x6e\157\x5f\157\x70\x73\x2e\x72\145\137\x70\x72\x6f\147\162\x61\x6d\x61\144\157", "\x6d\141\x74\x72\151\x63\165\x6c\141\x64\157")->join("\x61\154\x75\155\156\x6f\x5f\157\160\x73", "\141\154\x75\x6d\156\157\137\157\x70\163\x2e\151\x64", "\x3d", "\x70\162\x6f\147\162\x61\155\141\143\151\x6f\x6e\x5f\157\x70\163\x2e\141\154\x75\155\x6e\157\x5f\157\160\163\x5f\151\144")->where("\141\x6c\x75\x6d\156\x6f\137\x6f\x70\x73\56\x72\165\x5f\x72\x65\147", $datos->ru_reg)->where("\141\154\x75\x6d\156\157\x5f\157\x70\163\x2e\157\142\x73\x65\x72\166\141\x63\151\157\156", "\x45\x58\x41\x4d\105\x4e\x20\104\x45\x20\x4d\105\x53\x41")->groupBy("\x70\x72\x6f\147\x72\141\155\141\x63\x69\157\156\137\157\160\x73\x2e\141\x6c\165\x6d\156\x6f\137\x6f\160\x73\137\x69\x64", "\x70\162\x6f\147\x72\141\x6d\141\x63\x69\157\156\137\x6f\x70\x73\x2e\x67\x65\x73\x74\151\x6f\156", "\160\162\157\147\162\141\155\x61\143\151\x6f\156\x5f\x6f\x70\x73\56\145\164\x61\160\141", "\x61\154\x75\155\x6e\157\137\157\x70\163\x2e\x72\x65\x5f\160\162\157\x67\x72\141\155\141\144\157", "\x6d\141\x74\x72\x69\x63\165\x6c\141\x64\157")->orderBy("\x70\x72\x6f\147\162\x61\x6d\x61\x63\151\157\x6e\x5f\157\x70\x73\56\x67\x65\x73\164\x69\x6f\x6e", "\x64\x65\x73\143")->orderBy("\160\162\x6f\x67\x72\141\x6d\x61\143\x69\157\x6e\137\x6f\160\x73\x2e\x65\164\x61\x70\x61", "\144\x65\x73\143")->get();
$matricula_mesa = Matriculas::select("\x6d\141\x74\162\x69\x63\165\x6c\141\163\56\x2a", "\141\x6c\x75\x6d\156\157\163\x2e\x65\x74\141\160\141")->join("\141\x6c\165\155\x6e\157\x73", "\141\154\165\155\x6e\157\163\56\x69\x64", "\75", "\155\141\x74\162\x69\143\165\154\x61\x73\x2e\141\x6c\165\x6d\x6e\157\137\151\x64")->whereIn("\x61\x6c\x75\155\x6e\157\163\x2e\x69\144", $alumno_id)->where("\164\x69\160\157\x5f\x6d\x61\164\162\151\143\165\x6c\x61", "\115\x61\x74\x72\x69\143\165\x6c\141\40\x45\170\x61\155\x65\156\40\x64\145\40\x4d\145\x73\141")->orderBy("\x6d\141\x74\162\x69\x63\165\154\141\163\x2e\147\x65\x73\164\x69\x6f\x6e", "\144\x65\x73\143")->orderBy("\x61\154\165\x6d\156\157\x73\56\x65\x74\x61\160\x61", "\144\x65\163\143")->get();
return view("\155\x65\163\141\x2e\145\x73\164\x61\x64\x6f", compact("\144\141\164\x6f\x73", "\x70\162\x6f\x67\x72\x61\155\141\143\151\x6f\x6e\137\155\145\x73\141", "\141\154\x75\x6d\156\157\x5f\x6f\x70\163\x5f\155\x65\163\141", "\166\141\x6c\x6f\162", "\143\157\x73\164\157", "\155\141\x74\x72\x69\143\x75\154\x61\x5f\x6d\x65\163\x61", "\x73\x65\164\x74\x69\156\x67\137\x6d\x65\x73\141"));
}
$resultado = (new AlumnoAntiguoController())->control_materias_general($datos, $alumno_id, null, "\x6e\x6f\164\141\x5f\x6d\145\x73\x61");
$materias_aprobadas = $resultado[0];
$materias_reprobadas = $resultado[1];
$optativas = $resultado[2];
$asignaturas_mension = $resultado[3];
$materias_control_ops = $resultado[5];
$habilitar_mesa = true;
$asignaturas = Asignatura::select("\151\144", "\x6e\x69\166\x65\x6c", "\x6e\157\x6d\142\162\145", "\160\141\162\x61\x6c\145\154\157", "\x61\x73\151\x67\156\141\164\165\162\x61\x73\x2e\x69\x64\40\x61\x73\x20\x61\163\x69\147\156\x61\164\165\x72\141\x5f\151\144")->whereNotIn("\151\144", array_merge($materias_aprobadas, $optativas, $asignaturas_mension, $materias_control_ops))->where("\x70\145\x6e\163\x75\x6d\x5f\x69\144", $datos->plan_id)->where("\x6e\x69\166\145\x6c\x5f\x6e\x75\155\x65\x72\x6f", "\x3c\75", $ultimo_curso)->where("\154\151\x73\x74\141", 0)->where(function ($query) use($datos) {
if ($datos->grado_a == "\x4c\111\103\105\116\103\111\101\124\x55\x52\101") {
$query->where("\141\163\x69\147\x6e\x61\x74\165\x72\x61\x73\x2e\147\162\141\x64\157\x5f\x6c\x69\143\145\156\143\151\141\164\165\x72\x61", "\x53\111");
}
elseif ($datos->grado_a == "\124\x45\103\116\111\103\x4f\40\123\125\120\x45\122\111\x4f\x52") {
$query->where("\141\163\151\147\156\x61\164\x75\x72\141\x73\56\x67\x72\x61\144\157\137\164\x65\143\x6e\151\x63\157\x5f\163\165\160\145\x72\x69\157\162", "\x53\x49");
}
elseif ($datos->grado_a == "\124\x45\x43\116\111\x43\x4f\x20\115\105\104\x49\x4f") {
$query->where("\141\163\151\147\156\141\164\x75\x72\141\163\56\x67\162\141\144\x6f\137\x74\x65\x63\156\151\x63\157\137\x6d\145\144\151\157", "\123\x49");
}
elseif ($datos->grado_a == "\101\125\x58\111\114\x49\101\122") {
$query->where("\x61\163\x69\x67\156\141\164\165\x72\141\x73\x2e\147\162\x61\144\157\x5f\141\x75\x78\x69\x6c\151\x61\162", "\123\x49");
}
elseif ($datos->grado_a == "\x4d\x41\116\117\40\104\x45\40\x4f\102\122\x41\40\x43\x41\x4c\x49\x46\111\103\x41\x44\101") {
$query->where("\141\163\x69\147\156\141\164\x75\x72\141\163\56\x67\x72\141\144\157\137\155\157\x64\165\x6c\141\x72", "\x53\x49");
}
$query->where("\x61\x73\151\x67\x6e\x61\164\x75\x72\141\x73\56\x67\x72\141\x64\x6f\137\164\151\164\165\154\x61\x63\x69\x6f\156", "\116\117");
}
)->orderby("\156\x69\x76\145\x6c\137\x6e\165\x6d\145\x72\x6f", "\x61\x73\x63")->orderBy("\x61\163\x69\147\156\x61\x74\x75\x72\x61\x73\x2e\164\151\x70\157", "\x61\x73\x63")->orderBy("\x61\163\151\x67\x6e\x61\164\165\x72\141\x73\x2e\x69\x64", "\141\163\x63")->get();
return view("\x6d\x65\163\141\x2e\145\163\x74\141\x64\x6f", compact("\x64\141\164\x6f\x73", "\x61\x73\151\147\x6e\x61\164\165\x72\x61\x73", "\x75\x6c\164\151\x6d\157\x5f\x63\165\x72\163\157", "\x73\x65\x74\164\151\156\147\137\155\x65\x73\141", "\x68\141\x62\151\154\151\x74\141\x72\137\155\145\163\141", "\155\141\164\x65\162\151\x61\x73\137\143\x6f\x6e\x74\x72\x6f\x6c\137\x6f\x70\163"));
}
catch (\Exception $e) {
return view("\145\x72\x72\157\162\x73\x2e\x34\60\x34");
}
}
public function programar(Request $request) {
\DB::beginTransaction();
try {
if (!isset($request->asignatura) || count($request->asignatura) == 0) {
return redirect()->back()->with("\151\x6e\146\x6f\145\x72\162\x6f\x72", "\x53\x45\114\105\x43\x43\111\x4f\116\105\40\101\114\x47\x55\x4e\101\x20\x41\123\x49\x47\116\x41\124\x55\x52\x41\41\41\41");
}
if (count($request->asignatura) >= 2) {
return redirect()->back()->with("\x69\156\x66\x6f\145\x72\162\157\162", "\123\x45\114\105\x43\103\111\x4f\x4e\x45\x20\x53\117\x4c\x4f\x20\125\x4e\101\40\101\x53\111\x47\x4e\101\124\x55\x52\101\123\x21\x21\x21");
}
$alumno = Alumno::find($request->alumno);
$alumno_ops = new AlumnoOps();
$alumno_ops->ra = $alumno->ra;
$alumno_ops->ru_reg = $alumno->ru_reg;
$alumno_ops->gestion = Setting_globals::find(1)->gestion_mesa;
$alumno_ops->fecha = date("\x59\55\x6d\x2d\144");
$alumno_ops->observacion = "\105\x58\101\x4d\105\x4e\x20\104\x45\40\115\105\x53\x41";
$alumno_ops->persona_id = $alumno->persona_id;
$alumno_ops->alumno_id = $alumno->id;
$alumno_ops->user_registro = Auth::user()->id;
if (isset($request->ultimo_curso) && $request->ultimo_curso != null) {
$alumno_ops->curso_ops = $request->ultimo_curso;
}
if ($request->registro_p != null) {
$alumno_ops->programacion_activa = "\x53\111";
}
$alumno_ops->save();
$asignaturas = Asignatura::whereIn("\x69\144", $request->asignatura)->get();
$contado_paralelos = count($request->paralelo);
foreach ($asignaturas as $key => $value) {
$programacion = new ProgramacionOps();
for ($i = 0;
$i < $contado_paralelos;
$i++) {
$array_paralelo = explode("\x2d", $request->paralelo[$i]);
if (in_array($value->id, $array_paralelo)) {
$programacion->paralelo = $array_paralelo[1];
}
}
$programacion->gestion = $alumno_ops->gestion;
$programacion->fecha = date("\131\x2d\155\55\x64");
$programacion->alumno_ops_id = $alumno_ops->id;
$programacion->asignatura_id = $value->id;
$programacion->user_id = Auth::user()->id;
$programacion->observacion = "\x45\x58\x41\115\x45\x4e\x20\104\x45\40\x4d\105\x53\x41";
$programacion->save();
$libreta = new LibretaOps();
$libreta->programacion_ops_id = $programacion->id;
$libreta->save();
}
$alumno_ops->programado = "\x53\x49";
$alumno_ops->update();
\DB::commit();
return redirect()->to("\151\155\x70\x72\x69\155\151\x72\x5f\160\162\157\147\x72\141\155\x61\x63\151\157\156\57" . $alumno_ops->id . "\57\x4d");
}
catch (\Exception $e) {
\DB::rollback();
return view("\x65\162\162\x6f\x72\163\56\x34\x30\x34");
}
}
public function re_programar_estado($alumno_ops_id) {
try {
$alumno_ops = AlumnoOps::find($alumno_ops_id);
$programacion_gracia = ProgramacionOps::select("\x61\x73\x69\x67\x6e\x61\x74\x75\162\141\163\56\x69\x64\40\141\163\x20\x61\163\151\x67\x6e\x61\164\165\162\141\x5f\x69\144", "\143\141\156\x63\x65\154\x61\x64\x6f")->join("\141\x73\151\147\156\x61\164\x75\162\141\x73", "\x61\x73\x69\x67\x6e\141\164\x75\162\141\x73\56\151\144", "\x3d", "\x70\x72\157\147\x72\141\155\x61\x63\151\x6f\x6e\137\x6f\x70\163\x2e\x61\163\151\x67\x6e\141\164\x75\x72\141\x5f\x69\x64")->where("\x61\x6c\165\x6d\156\157\137\x6f\160\163\x5f\x69\x64", $alumno_ops_id)->where("\x70\162\157\x67\162\x61\155\x61\143\x69\157\x6e\x5f\x6f\160\x73\56\x6f\142\x73\145\162\166\141\143\151\157\156", "\105\x58\x41\115\x45\116\x20\104\105\40\x4d\105\x53\x41")->get();
$asignatura_mesa = array();
foreach ($programacion_gracia as $value) {
$asignatura_mesa[] = $value->asignatura_id;
}
$datos = Alumno::select("\164\x69\160\x6f\x5f\141\154\x75\155\156\157", "\155\x61\164\x72\x69\143\x75\x6c\141\144\157", "\141\x6c\165\x6d\x6e\157\163\56\151\x64\40\x61\x73\x20\141\154\x75\155\156\157\x5f\151\144", "\143\x75\162\x73\157\x5f\156\x75\x6d\145\x72\x61\154", "\x70\154\141\x6e\x5f\151\144", "\x61\154\x75\x6d\156\x6f\163\56\156\x69\166\x65\154\x20\x61\163\x20\x67\162\141\144\x6f\x5f\141", "\160\x65\162\x73\157\156\x61\163\56\x6e\157\x6d\x62\162\x65", "\141\160\145\x6c\x6c\151\x64\157\163", "\x63\151\x5f\160\145\162\163\x6f\x6e\141", "\x67\145\156\x65\162\157", "\x61\x63\164\151\x76\141\x74\145\x64", "\x72\x75\137\162\x65\x67", "\x72\141", "\x61\x6c\165\x6d\156\x6f\x73\x2e\147\145\163\x74\151\157\x6e", "\141\154\x75\155\156\x6f\x73\x2e\x66\x65\143\150\141\x20\x61\163\x20\146\x65\x63\150\141\x5f\x61\154\x75\155\156\157", "\x6e\x6f\155\142\x72\x65\137\141\162\x65\141", "\x6e\157\155\x62\x72\x65\x5f\143\141\162\x72\145\x72\x61", "\x6e\x6f\x6d\x62\162\145\x5f\x65\170\x74\145\156\x73\151\157\x6e", "\x79\x65\141\162", "\143\141\x72\x72\145\x72\x61\x5f\160\x61\x72\141\154\x65\x6c\141", "\x74\151\x70\x6f\137\151\156\163\x63\162\151\160\143\151\157\x6e", "\141\x6c\165\155\x6e\x6f\163\56\143\x75\x72\x73\157", "\x63\x61\x6d\x62\x69\x6f", "\164\x69\x70\x6f\x5f\141\154\x75\x6d\156\x6f", "\162\x65\x70\162\x6f\147\x72\x61\x6d\141\x64\x6f", "\x72\145\160\x72\x6f\x67\x72\x61\155\x61\144\x6f", "\155\157\x64\x61\x6c\x69\144\141\144\x5f\x74\151\164\165\154\x61\143\x69\157\156\137\x69\144", "\x63\x6f\156\x76\x65\x6e\151\x6f\137\x69\x64", "\155\x6f\x64\141\154\x69\144\x61\144\137\x61\x63\164\x69\166\141")->join("\160\145\x72\x73\157\x6e\x61\163", "\x70\x65\x72\x73\157\x6e\x61\x73\56\x69\144", "\75", "\x61\154\x75\x6d\156\157\x73\x2e\x70\145\162\x73\157\x6e\141\137\x69\144")->join("\x61\x72\145\x61\x73", "\141\x72\145\141\x73\56\151\x64", "\75", "\x61\154\x75\x6d\x6e\x6f\x73\56\141\x72\145\141\137\151\144")->join("\x63\141\162\162\x65\x72\x61\x73", "\143\141\162\x72\145\x72\x61\x73\x2e\151\144", "\75", "\141\x6c\165\x6d\x6e\x6f\163\x2e\143\x61\x72\162\x65\162\x61\x5f\151\144")->join("\x65\x78\x74\x65\156\163\x69\157\x6e\145\x73", "\x65\170\x74\x65\x6e\x73\151\x6f\156\145\163\x2e\x69\144", "\75", "\x61\154\x75\x6d\156\x6f\x73\56\x65\170\164\145\156\163\151\157\x6e\x5f\x69\144")->join("\165\x73\145\162\163", "\x75\163\x65\162\163\56\160\145\162\163\x6f\x6e\x61\137\151\144", "\75", "\160\145\x72\163\x6f\x6e\141\x73\x2e\x69\x64")->join("\160\x65\x6e\x73\165\155\x73", "\x70\145\156\x73\165\155\163\x2e\x69\x64", "\x3d", "\141\x6c\165\x6d\156\157\x73\x2e\x70\x6c\x61\x6e\137\x69\x64")->where("\141\x6c\x75\x6d\156\x6f\163\56\x62\x6c\x6f\x71\x75\x65\x61\144\x6f\137\x63\x61\155\x62\x69\x6f", "\116\117")->where("\141\x6c\x75\155\x6e\157\163\56\x69\144", $alumno_ops->alumno_id)->orderBy("\x61\x6c\x75\155\156\157\x73\x2e\x69\144", "\x61\163\143")->first();
$alm_dato = Alumno::select("\143\x75\162\163\x6f\137\x6e\165\x6d\145\x72\141\154", "\141\154\x75\155\x6e\157\163\x2e\x69\x64\40\141\163\x20\x61\x6c\x75\155\156\157\137\151\x64")->where("\x72\x75\x5f\162\x65\147", Alumno::find($alumno_ops->alumno_id)->ru_reg)->get();
if ($datos->tipo_alumno == "\x6e\165\145\x76\x6f" && $datos->matriculado == "\116\x4f") {
return redirect()->to("\145\163\164\141\x64\157\137\141\154\165\155\156\x6f\57" . $datos->alumno_id);
}
$setting_mesa = Setting_globals::select("\x67\x65\x73\x74\x69\x6f\x6e\137\x6d\145\163\141")->first();
$cu = array();
$alumno_id = array();
foreach ($alm_dato as $key => $value) {
$cu[] = $value->curso_numeral;
$alumno_id[] = $value->alumno_id;
}
$resultado = (new AlumnoAntiguoController())->control_materias_general($datos, $alumno_id, null, "\156\x6f\x74\x61\x5f\x6d\145\x73\141");
$materias_aprobadas = $resultado[0];
$materias_reprobadas = $resultado[1];
$optativas = $resultado[2];
$asignaturas_mension = $resultado[3];
$materias_control_ops = $resultado[5];
$asignaturas = Asignatura::select("\151\x64", "\x6e\x69\166\x65\154", "\156\157\155\142\x72\145", "\x70\x61\x72\141\x6c\145\154\157", "\x61\163\151\x67\156\141\164\165\x72\141\x73\x2e\x69\144\40\x61\163\40\141\163\x69\147\x6e\141\x74\165\x72\x61\137\151\x64")->whereNotIn("\151\x64", array_merge($materias_aprobadas, $optativas, $asignaturas_mension))->where("\160\x65\x6e\163\x75\155\137\x69\144", $datos->plan_id)->where("\x6e\151\166\x65\154\x5f\156\x75\155\x65\x72\x6f", "\x3c\75", $alumno_ops->curso_ops)->where("\154\151\x73\164\x61", 0)->where(function ($query) use($datos) {
if ($datos->grado_a == "\114\x49\103\x45\116\103\111\101\124\x55\122\101") {
$query->where("\141\x73\x69\147\x6e\141\164\165\162\x61\x73\56\147\x72\141\x64\157\137\154\151\143\145\156\143\151\141\164\x75\x72\x61", "\x53\x49");
}
elseif ($datos->grado_a == "\124\x45\x43\x4e\111\103\x4f\40\123\x55\120\105\x52\x49\x4f\122") {
$query->where("\141\163\x69\x67\x6e\141\x74\x75\162\x61\163\56\147\x72\x61\x64\x6f\137\164\145\143\x6e\x69\143\x6f\x5f\163\165\x70\145\162\151\157\162", "\123\111");
}
elseif ($datos->grado_a == "\x54\x45\103\x4e\x49\x43\117\40\115\x45\104\111\x4f") {
$query->where("\141\x73\x69\147\x6e\141\x74\x75\x72\141\163\56\147\x72\x61\x64\x6f\137\x74\x65\x63\156\x69\143\x6f\137\x6d\145\x64\151\157", "\x53\x49");
}
elseif ($datos->grado_a == "\x41\x55\x58\x49\114\111\x41\122") {
$query->where("\x61\x73\151\x67\x6e\141\x74\165\162\x61\163\56\147\162\x61\x64\x6f\137\x61\165\170\x69\x6c\x69\x61\x72", "\123\x49");
}
elseif ($datos->grado_a == "\115\x41\116\x4f\40\104\x45\x20\117\102\122\x41\40\x43\101\x4c\111\x46\x49\x43\x41\104\101") {
$query->where("\x61\x73\x69\x67\x6e\141\x74\165\x72\141\x73\56\147\x72\x61\x64\157\x5f\155\157\144\x75\154\x61\x72", "\x53\x49");
}
$query->where("\141\x73\151\x67\156\x61\164\165\x72\141\163\x2e\x67\162\141\144\x6f\x5f\x74\151\x74\x75\154\141\143\151\x6f\x6e", "\116\117");
}
)->orderby("\x6e\x69\x76\145\154\137\156\x75\155\145\162\157", "\141\x73\x63")->orderBy("\141\163\151\x67\x6e\x61\x74\x75\x72\x61\163\56\164\151\x70\157", "\141\163\x63")->orderBy("\x61\163\151\x67\x6e\141\x74\x75\162\141\163\56\151\144", "\141\163\x63")->get();
return view("\155\x65\x73\141\x2e\145\x73\164\x61\x64\x6f\x5f\x72\145\x5f\160\x72\157\147\162\x61\155\x61\x72", compact("\144\141\x74\x6f\163", "\x61\x73\x69\x67\156\x61\x74\x75\162\x61\163", "\x61\x73\x69\x67\156\x61\x74\x75\162\141\x5f\155\145\163\141", "\141\x6c\x75\155\156\x6f\x5f\157\160\163", "\163\x65\x74\x74\151\x6e\x67\137\155\145\163\141", "\x6d\141\x74\145\162\151\x61\x73\x5f\143\157\156\x74\x72\x6f\x6c\x5f\157\160\x73"));
}
catch (\Exception $e) {
return view("\145\162\x72\157\x72\163\x2e\x34\x30\x34");
}
}
public function re_programar_update(Request $request) {
\DB::beginTransaction();
try {
$alumno_ops = AlumnoOps::find($request->alumno_ops);
if (!isset($request->asignatura) || count($request->asignatura) == 0) {
return redirect()->back()->with("\151\156\146\x6f\145\x72\x72\157\x72", "\123\x45\114\x45\x43\x43\111\x4f\116\x45\x20\x41\114\107\x55\116\101\40\x41\123\111\107\116\x41\x54\125\x52\101\41\41\41");
}
if (count($request->asignatura) >= 2) {
return redirect()->back()->with("\151\x6e\146\x6f\x65\x72\162\157\162", "\123\x45\x4c\105\x43\x43\111\x4f\116\105\x20\x53\x4f\114\117\40\x55\116\101\x20\x41\x53\x49\107\x4e\101\124\125\x52\x41\123\x21\x21\x21");
}
$asignaturas = $request->asignatura;
$asig_m = ProgramacionOps::select("\160\162\157\147\162\x61\155\x61\x63\x69\157\156\x5f\157\x70\x73\x2e\151\x64\40\141\163\40\x70\x72\x6f\147\x5f\151\x64", "\141\x73\151\x67\156\141\x74\165\162\141\163\56\151\144\40\x61\x73\x20\141\163\x69\147\156\x61\x74\165\162\x61\137\x69\x64", "\x63\x61\x6e\x63\145\154\141\144\x6f")->join("\141\163\x69\147\x6e\141\x74\165\162\141\x73", "\141\163\x69\x67\x6e\141\164\165\162\141\x73\56\151\x64", "\75", "\160\x72\x6f\147\x72\141\x6d\x61\143\x69\157\x6e\x5f\157\160\x73\56\141\163\x69\x67\156\x61\164\x75\162\x61\x5f\x69\x64")->where("\141\154\x75\155\x6e\x6f\137\157\160\x73\x5f\x69\144", $alumno_ops->id)->where("\160\x72\x6f\x67\162\x61\155\141\x63\x69\157\156\137\x6f\x70\163\56\x6f\x62\x73\x65\162\166\141\143\151\x6f\x6e", "\105\130\101\115\x45\116\x20\x44\105\40\x4d\x45\x53\x41")->get();
$id_destroy = array();
$id_no_destroy = array();
foreach ($asig_m as $value) {
$po = ProgramacionOps::find($value->prog_id);
if ($asignaturas !== null) {
if (in_array($value->asignatura_id, $asignaturas)) {
if (($clave = array_search($value->asignatura_id, $asignaturas)) !== false) {
unset($asignaturas[$clave]);
}
}
else {
$id_destroy[] = $value->prog_id;
}
}
}
$asig_m_libreta = LibretaOps::select("\x6c\151\142\x72\145\164\141\137\x6f\160\x73\56\x69\144\x20\x61\163\x20\x69\144\137\x6c\151\x62", "\160\x72\x6f\x67\x72\141\x6d\141\x63\151\157\x6e\137\157\160\x73\x2e\x69\144\40\141\x73\40\x70\162\157\x67\162\141\155\141\x63\x69\157\x6e\137\x69\x64")->join("\160\162\x6f\147\x72\x61\x6d\141\143\x69\x6f\156\137\157\x70\x73", "\x70\x72\157\x67\162\x61\x6d\x61\143\151\157\156\x5f\157\x70\163\56\151\x64", "\x3d", "\x6c\151\x62\x72\x65\x74\x61\x5f\157\160\x73\56\160\162\157\147\x72\x61\155\141\143\151\x6f\x6e\x5f\157\160\x73\x5f\151\x64")->whereIn("\160\162\x6f\147\x72\x61\155\x61\143\x69\x6f\156\x5f\x6f\160\x73\137\151\x64", $id_destroy)->get();
$id_destroy_libreta = array();
$id_destroy_programacion = array();
foreach ($asig_m_libreta as $value_libreta) {
$id_destroy_libreta[] = $value_libreta->id_lib;
$id_destroy_programacion[] = $value_libreta->programacion_id;
}
LibretaOps::destroy($id_destroy_libreta);
ProgramacionOps::destroy($id_destroy_programacion);
$alumno_ops->re_programado = "\123\x49";
$alumno_ops->update();
\DB::commit();
if (!isset($asignaturas) || count($asignaturas) == 0 || $asignaturas == null) {
return redirect()->to("\x65\163\x74\141\x64\x6f\137\x6d\145\163\x61\x2f" . $alumno_ops->alumno_id)->with("\x69\x6e\146\157", "\x4c\141\x73\x20\x61\x73\x69\x67\x6e\x61\x74\165\162\x61\163\x20\146\x75\145\x72\157\x6e\x20\162\145\x70\162\x6f\147\162\x61\x6d\141\x64\x61\163\x20\143\157\x6e\x20\x65\x78\151\164\157\x21\41");
}
$asignaturas_p = Asignatura::whereIn("\x69\144", $asignaturas)->get();
$contado_paralelos = count($request->paralelo);
foreach ($asignaturas_p as $key => $value) {
$programacion = new ProgramacionOps();
for ($i = 0;
$i < $contado_paralelos;
$i++) {
$array_paralelo = explode("\55", $request->paralelo[$i]);
if (in_array($value->id, $array_paralelo)) {
$programacion->paralelo = $array_paralelo[1];
}
}
$programacion->gestion = $alumno_ops->gestion;
$programacion->fecha = date("\x59\55\155\55\144");
$programacion->alumno_ops_id = $alumno_ops->id;
$programacion->asignatura_id = $value->id;
$programacion->user_id = Auth::user()->id;
if ($alumno_ops->matriculado == "\x53\x49") {
$programacion->cancelado = "\123\x49";
}
$programacion->observacion = "\x45\x58\x41\x4d\105\x4e\x20\x44\105\x20\x4d\x45\123\x41";
$programacion->save();
$libreta = new LibretaOps();
$libreta->programacion_ops_id = $programacion->id;
$libreta->save();
}
if ($request->registro_p != null) {
$alumno_ops->programacion_activa = "\123\111";
}
$alumno_ops->update();
\DB::commit();
return redirect()->to("\x65\163\x74\141\144\157\137\x6d\145\x73\x61\x2f" . $alumno_ops->alumno_id)->with("\x69\156\x66\x6f", "\114\x61\163\x20\141\x73\151\147\x6e\141\164\x75\x72\x61\x73\x20\146\165\x65\x72\157\156\40\162\145\x70\162\x6f\x67\162\141\155\x61\144\141\x73\x20\x63\x6f\x6e\40\145\x78\151\164\x6f\x21\x21");
}
catch (\Exception $e) {
\DB::rollback();
return redirect()->back();
}
}
}
Function Calls
None |
Stats
MD5 | 11a63c8019b907aaa331d652f2d45e28 |
Eval Count | 0 |
Decode Time | 83 ms |