diff --git a/app/Resources/views/base_acta.html.twig b/app/Resources/views/base_acta.html.twig index 3831244..d309f5a 100644 --- a/app/Resources/views/base_acta.html.twig +++ b/app/Resources/views/base_acta.html.twig @@ -91,7 +91,7 @@
ACTA DE ASCENSO A LA CATEGORÍA ACADÉMICA
+ACTA DE ASCENSO A LA CATEGORÍA ACADÉMICA {% block categoria0 %}{% endblock %}
INFORME DE PERTINENCIA DE TRABAJO ESPECIAL DE GRADO O INVESTIGACIÓN
Miembros del Comité Académico designado por el Consejo Universitario de la Universidad Bolivariana de Venezuela conforme a la Resolución N° {% block resolucion %}{% endblock %}, para valorar, - CONTEXTUALIZACIÓN, PRESENTACIÓN Y ARTICULACIÓN DEL Trabajo de Ascenso presentado por la - Profesora: {% block docente %} {% endblock %} bajo la Modalidad de {% block modalidad1 %} {% endblock %} + CONTEXTUALIZACIÓN, PRESENTACIÓN Y ARTICULACIÓN DEL Trabajo de Ascenso presentado por el/la + Profesor/a: {% block docente %} {% endblock %} bajo la Modalidad de {% block modalidad1 %} {% endblock %} a los fines de su Ascenso en el Escalafón Universitario a la Categoría de {% block categoria1 %}{% endblock %} dejan constancia de lo siguiente:
@@ -116,14 +116,26 @@Por considerar: _______________________________________________________________________________________ _______________________________________________________________________________________ __________________________________________________________________________________
+ {% else %} + Por cosiderar:Tipo de Trabajo de Ascneso: {{ ascenso.tipoTrabajoInvestigacion }}
{% if ascenso.tipoTrabajoInvestigacion == 'tesis' %} - {% if ascenso.tesisUbv %} + {% if not ascenso.tesisUbv %}Debe tener informe de pertinencia debido a que es una tesis fuera de UBV
{% else %} diff --git a/app/Resources/views/cea/ascenso_mostar.html.twig b/app/Resources/views/cea/ascenso_mostar.html.twig index e2c2354..3566589 100644 --- a/app/Resources/views/cea/ascenso_mostar.html.twig +++ b/app/Resources/views/cea/ascenso_mostar.html.twig @@ -157,7 +157,7 @@Escalafón Solicita: {{ ascenso.idEscalafones.nombre }}
{% set anadirJurado = false %} - {% if (ascenso.tesisUbv or ascenso.tipoTrabajoInvestigacion == 'investigacion') %} + {% if not ascenso.tesisUbv or ascenso.tipoTrabajoInvestigacion == 'investigacion' %}Tipo de Trabajo de Ascneso: {{ ascenso.tipoTrabajoInvestigacion }}
{% if ascenso.tipoTrabajoInvestigacion == 'tesis' %} - {% if ascenso.tesisUbv %} + {% if not ascenso.tesisUbv %}Debe tener informe de pertinencia debido a que es una tesis fuera de UBV
{% else %} diff --git a/app/Resources/views/memorando/acta_defensa_pertinencia.html.twig b/app/Resources/views/memorando/acta_defensa_pertinencia.html.twig index c77739f..3ce7378 100644 --- a/app/Resources/views/memorando/acta_defensa_pertinencia.html.twig +++ b/app/Resources/views/memorando/acta_defensa_pertinencia.html.twig @@ -30,6 +30,19 @@ {{ ascenso.tituloTrabajo }} {% endblock %} +{% block tituloPertinencia %} + {{ pertinencia.tituloPertinencia }} +{% endblock %} + +{% block lugarDefensa %} + {{ pertinencia.lugarPertinencia }} +{% endblock %} + +{% block fechaDefensa %} + {{ pertinencia.fechaDefensa | date('d-m-Y') }} +{% endblock %} + + {% block titulo2 %} {{ ascenso.tituloTrabajo }} {% endblock %} diff --git a/src/AppBundle/Controller/AscensoController.php b/src/AppBundle/Controller/AscensoController.php index 2f57f32..f55c200 100644 --- a/src/AppBundle/Controller/AscensoController.php +++ b/src/AppBundle/Controller/AscensoController.php @@ -9,6 +9,7 @@ namespace AppBundle\Controller; +use AppBundle\Entity\AscensoPertinencia; use AppBundle\Entity\AscensoTutores; use AppBundle\Entity\DocumentosVerificados; use Symfony\Component\Form\Extension\Core\Type\BirthdayType; @@ -154,6 +155,18 @@ class AscensoController extends Controller if (!$form->get('pertinencia')->getData()) { $form->get('pertinencia')->addError(new FormError('La tesis al ser fuera de la UBV debe incluir un informe de pertinencia')); } + + if (!$form->get('titulo_pertinencia')->getData()) { + $form->get('titulo_pertinencia')->addError(new FormError('La tesis al ser fuera de la UBV debe incluir el titulo del informe de pertinencia')); + } + + if (!$form->get('lugar_pertinencia')->getData()) { + $form->get('pertinencia')->addError(new FormError('La tesis al ser fuera de la UBV debe incluir el lugar donde se defendió')); + } + + if (!$form->get('fecha_defensa')->getData()) { + $form->get('pertinencia')->addError(new FormError('La tesis al ser fuera de la UBV debe incluir la fecha de defensa')); + } } }else if ($form->get('tipoTrabajoInvestigacion')->getData() === "investigacion"){ @@ -253,7 +266,7 @@ class AscensoController extends Controller $ascenso->setTituloTrabajo($form->get('titulo_trabajo')->getData()); $ascenso->setTipoTrabajoInvestigacion($form->get('tipoTrabajoInvestigacion')->getData()); - $ascenso->setTesisUbv($form->get('tesisUbv')->getData()); + $ascenso->setTesisUbv(!$form->get('tesisUbv')->getData()); $ascenso->setNombreNucelo($form->get('nombreNucleo')->getData()); $ascenso->setIdEscalafones($nueva_escala); $ascenso->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(2)); @@ -273,6 +286,14 @@ class AscensoController extends Controller if ($form->get('pertinencia')->getData()){ + + $pertinencia = new AscensoPertinencia(); + $pertinencia->setIdAscenso($ascenso); + $pertinencia->setTituloPertinencia($form->get('titulo_pertinencia')->getData()); + $pertinencia->setLugarPertinencia($form->get('lugar_pertinencia')->getData()); + $pertinencia->setFechaDefensa($form->get('fecha_defensa')->getData()); + + $em->persist($pertinencia); $constanciaPertinencia = $form->get('pertinencia')->getData(); $nombrePertinencia = md5(uniqid()).'.'.$constanciaPertinencia->guessExtension(); @@ -1099,6 +1120,7 @@ $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy( 'idRolInstitucion' => $servicio->getIdRolInstitucion(), 'idEstatus' => 1 )); + $pertinencia = $this->getDoctrine()->getRepository("AppBundle:AscensoPertinencia")->findOneByIdAscenso($ascenso); $eje = $ascenso->getIdRolInstitucion()->getIdInstitucion()->getIdEjeParroquia()->getIdEje()->getNombre(); $estado = $ascenso->getIdRolInstitucion()->getIdInstitucion()->getIdEjeParroquia()->getIdParroquia()->getIdMunicipio()->getIdEstado()->getNombre(); $tutores = $ascenso->getTutores(); @@ -1120,8 +1142,6 @@ $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy( $presidente = $tutor; } - - } @@ -1134,18 +1154,19 @@ $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy( 'resolucion' => $resolucion, 'presidente' => $presidente, 'categoria' => $escalafones, - 'jurados' => $tutores + 'jurados' => $tutores, + 'pertinencia' => $pertinencia )); }else if (!$ascenso->getTesisUbv()) { - - return $this->render('memorando/acta_defensa_investigacion.html.twig', array( + return $this->render('memorando/acta_defensa_pertinencia.html.twig', array( 'ascenso' => $ascenso, 'eje' => $eje, 'estado' => $estado, 'resolucion' => $resolucion, 'presidente' => $presidente, 'categoria' => $escalafones, - 'jurados' => $tutores + 'jurados' => $tutores, + 'pertinencia' => $pertinencia )); }else{ @@ -1156,7 +1177,8 @@ $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy( 'resolucion' => $resolucion, 'presidente' => $presidente, 'categoria' => $escalafones, - 'jurados' => $tutores + 'jurados' => $tutores, + 'pertinencia' => $pertinencia )); } diff --git a/src/AppBundle/Entity/AscensoPertinencia.php b/src/AppBundle/Entity/AscensoPertinencia.php new file mode 100644 index 0000000..b9a5d75 --- /dev/null +++ b/src/AppBundle/Entity/AscensoPertinencia.php @@ -0,0 +1,166 @@ +id; + } + + /** + * Set tituloPertinencia + * + * @param string $tituloPertinencia + * @return AscensoPertinencia + */ + public function setTituloPertinencia($tituloPertinencia) + { + $this->tituloPertinencia = $tituloPertinencia; + + return $this; + } + + /** + * Get tituloPertinencia + * + * @return string + */ + public function getTituloPertinencia() + { + return $this->tituloPertinencia; + } + + /** + * Set lugarPertinencia + * + * @param string $lugarPertinencia + * @return AscensoPertinencia + */ + public function setLugarPertinencia($lugarPertinencia) + { + $this->lugarPertinencia = $lugarPertinencia; + + return $this; + } + + /** + * Get lugarPertinencia + * + * @return string + */ + public function getLugarPertinencia() + { + return $this->lugarPertinencia; + } + + /** + * Set fechaDefensa + * + * @param \DateTime $fechaDefensa + * @return AscensoPertinencia + */ + public function setFechaDefensa($fechaDefensa) + { + $this->fechaDefensa = $fechaDefensa; + + return $this; + } + + /** + * Get fechaDefensa + * + * @return \DateTime + */ + public function getFechaDefensa() + { + return $this->fechaDefensa; + } + + /** + * Set idAscenso + * + * @param \AppBundle\Entity\Ascenso $idAscenso + * @return AscensoPertinencia + */ + public function setIdAscenso(\AppBundle\Entity\Ascenso $idAscenso) + { + $this->idAscenso = $idAscenso; + + return $this; + } + + /** + * Get idAscenso + * + * @return \AppBundle\Entity\Ascenso + */ + public function getIdAscenso() + { + return $this->idAscenso; + } +} diff --git a/src/AppBundle/Form/AscensoType.php b/src/AppBundle/Form/AscensoType.php index b4ecb37..87c38f7 100644 --- a/src/AppBundle/Form/AscensoType.php +++ b/src/AppBundle/Form/AscensoType.php @@ -9,8 +9,10 @@ namespace AppBundle\Form; +use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Validator\Constraints\File; use Symfony\Component\Validator\Constraints\NotBlank; +use Symfony\Component\Validator\Constraints\Date; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -229,6 +231,55 @@ class AscensoType extends AbstractType )) ) )) + ->add('titulo_pertinencia', TextType::class, array( + 'label' => 'Título del informe de pertinencia', + 'label_attr' => array( + 'style' => 'display:none;', + 'class' => 'esc_pertinencia' + ), + 'required' => false, + 'attr' => array( + 'style' => 'display:none;', + 'class' => 'esc_pertinencia' + ), + 'constraints' => array( + new NotBlank(), + ) + )) + ->add('lugar_pertinencia', TextType::class, array( + 'label' => 'Lugar de defensa de la Tesis', + 'label_attr' => array( + 'style' => 'display:none;', + 'class' => 'esc_pertinencia' + ), + 'required' => false, + 'attr' => array( + 'style' => 'display:none;', + 'class' => 'esc_pertinencia' + ), + 'constraints' => array( + new NotBlank(), + ) + )) + ->add('fecha_defensa', DateType::class, array( + 'widget' => 'choice', + 'label' => 'Fecha defensa', + 'label_attr' => array( + 'style' => 'display:none;', + 'class' => 'esc_pertinencia form-group' + ), + 'attr' => array( + 'style' => 'display:none;', + 'class' => 'esc_pertinencia' + ), + 'placeholder' => array( + 'year' => 'Año', 'month' => 'Mes', 'day' => 'Día', + ), + 'constraints' => array( + new NotBlank(), + new Date() + ) + )) ->add('send', SubmitType::class, array( 'label' => 'Crear Solicitud de Ascenso', 'attr' => array(