Commit db7d694d748ec56ca05c47fb93a1f26ae29bde37

Authored by Wilmer
1 parent af700872e0
Exists in master

crea una gran modificacion al añadir datos sobre el tipo de defensa de pertienen…

…cia asociado a su acta de defensa
app/Resources/views/base_acta.html.twig
... ... @@ -91,7 +91,7 @@
91 91  
92 92 <div class="row">
93 93 <div class="text-center"><br>
94   - <p><strong>ACTA DE ASCENSO A LA CATEGORÍA ACADÉMICA</strong></p>
  94 + <p><strong>ACTA DE ASCENSO A LA CATEGORÍA ACADÉMICA {% block categoria0 %}{% endblock %}</strong></p>
95 95 <p><strong>INFORME DE PERTINENCIA DE TRABAJO ESPECIAL DE GRADO O INVESTIGACIÓN</strong></p><br>
96 96 </div>
97 97 </div>
... ... @@ -107,8 +107,8 @@
107 107 <p class="cuerpo-memo">
108 108 Miembros del Comité Académico designado por el Consejo Universitario de la Universidad Bolivariana de
109 109 Venezuela conforme a la Resolución N° {% block resolucion %}{% endblock %}, para valorar,
110   - CONTEXTUALIZACIÓN, PRESENTACIÓN Y ARTICULACIÓN DEL Trabajo de Ascenso presentado por la
111   - Profesora: {% block docente %} {% endblock %} bajo la Modalidad de {% block modalidad1 %} {% endblock %}
  110 + CONTEXTUALIZACIÓN, PRESENTACIÓN Y ARTICULACIÓN DEL Trabajo de Ascenso presentado por el/la
  111 + Profesor/a: {% block docente %} {% endblock %} bajo la Modalidad de {% block modalidad1 %} {% endblock %}
112 112 a los fines de su Ascenso en el Escalafón Universitario a la Categoría de {% block categoria1 %}{% endblock %}
113 113 dejan constancia de lo siguiente:
114 114 </p>
... ... @@ -116,14 +116,26 @@
116 116 <li>
117 117 Actuó como Coordinador(a) del Comité Académico el (la) Profesor(a) {% block presidente %}{% endblock %}
118 118 </li>
119   -
  119 + {% if ascenso.tipoTrabajoInvestigacion == 'tesis' and not ascenso.tesisUbv %}
120 120 <li>
121   - Se revisó, por cada uno de los Miembros del Comité Académico, el Trabajo de
122   - Investigación como Trabajo de Ascenso, titulado: {% block titulo %}{% endblock %}
  121 + Se revisó, por cada uno de los Miembros del Comité Académico, el Informe de
  122 + Pertinencia como Trabajo de Ascenso, titulado: <strong>Informe de Pertinencia:</strong>
  123 + {% block tituloPertinencia %}{% endblock %}. Y consignado por el/la autor/a conjuntamente con el
  124 + Trabajo de Grado o Investigación, titulado:{% block titulo %}{% endblock %}.<br>
  125 +
  126 + Defendido y aprobado en la Universidad o Instituto de Investigación: {% block lugarDefensa %}{% endblock %},
  127 + conforme a lo establecido en el Acta con Veredicto o Aval Aprobado, de fecha {% block fechaDefensa %}{% endblock %}
  128 + (se anexa Acta Veredicto o Aval).
123 129 </li>
  130 + {% else %}
  131 + <li>
  132 + Se revisó, por cada uno de los Miembros del Comité Académico, el Trabajo de
  133 + Investigación como Trabajo de Ascenso, titulado: {% block titulo2 %}{% endblock %}
  134 + </li>
  135 + {% endif %}
124 136  
125 137 <li>
126   - Reunidos el día ____ de ________ de 20____, en Sede: Eje Geopolítico {% block eje %}{% endblock %}, UBV {% block estado %}{% endblock %}, a las _______,
  138 + Reunidos el día ____ de _______________ de 20____, en Sede: Eje Geopolítico {% block eje %}{% endblock %}, UBV {% block estado %}{% endblock %}, a las _______,
127 139 se dio lugar la instalación del Acto Académico Público a fin de proceder a la presentación con
128 140 el/la autor(a) y el Comité Académico de conformidad con lo establecido en la Ley de Universidades
129 141 y el Reglamento Interno de la Universidad Bolivariana de Venezuela para los/as Trabajadores/as
... ... @@ -192,10 +204,17 @@
192 204 Decisión: De conformidad con la Ley de Universidades y el Reglamento Interno de la
193 205 Universidad Bolivariana de Venezuela para los/as Trabajadores/as Académicos/as a
194 206 optar a la Categoría de profesores/as: {% block categoria3 %}{% endblock %} se acordó
195   - por: _____________ la decisión de: __________ el Trabajo de Investigación.
  207 + por: _____________ la decisión de: __________ el Trabajo de Investigación.<br>
  208 + {% if ascenso.tipoTrabajoInvestigacion == 'investigacion' %}
196 209 <p>Por considerar: _______________________________________________________________________________________
197 210 _______________________________________________________________________________________
198 211 __________________________________________________________________________________</p>
  212 + {% else %}
  213 + Por cosiderar:<br>
  214 + Es consono con las políticas de estado y los fundamentos epistémicos de la UBV.
  215 + _______________________________________________________________________Plasma la pertinencia
  216 + de las políticas de formación para realizar un diplomado dirigido a los nuevos docentes.
  217 + {% endif %}
199 218 </li>
200 219  
201 220 <li>
... ...
app/Resources/views/cea/acta_defensa_mostar.html.twig
... ... @@ -160,7 +160,7 @@
160 160 {% set anadirJurado = false %}
161 161 {% set actualizado = false %}
162 162 {% set resolucion = "" %}
163   - {% if (ascenso.tesisUbv or ascenso.tipoTrabajoInvestigacion == 'investigacion') %}
  163 + {% if not ascenso.tesisUbv or ascenso.tipoTrabajoInvestigacion == 'investigacion' %}
164 164 <h4>Jurados propuestos por el Docente</h4>
165 165 {% set anadirJurado = true %}
166 166 {% set cantidadJurado = 6 %}
... ... @@ -242,7 +242,7 @@
242 242 <input type="text" class="form-control" value="{{ascenso.tituloTrabajo}}" />
243 243 <p><strong>Tipo de Trabajo de Ascneso:</strong> {{ ascenso.tipoTrabajoInvestigacion }} </p>
244 244 {% if ascenso.tipoTrabajoInvestigacion == 'tesis' %}
245   - {% if ascenso.tesisUbv %}
  245 + {% if not ascenso.tesisUbv %}
246 246 <p>Debe tener informe de pertinencia debido a que
247 247 es una tesis fuera de UBV</p>
248 248 {% else %}
... ...
app/Resources/views/cea/ascenso_mostar.html.twig
... ... @@ -157,7 +157,7 @@
157 157  
158 158 <p><strong>Escalafón Solicita:</strong> {{ ascenso.idEscalafones.nombre }} </p>
159 159 {% set anadirJurado = false %}
160   - {% if (ascenso.tesisUbv or ascenso.tipoTrabajoInvestigacion == 'investigacion') %}
  160 + {% if not ascenso.tesisUbv or ascenso.tipoTrabajoInvestigacion == 'investigacion' %}
161 161 <h4>Jurados propuestos por el Docente</h4>
162 162 {% set anadirJurado = true %}
163 163 {% set cantidadJurado = 6 %}
... ... @@ -215,7 +215,7 @@
215 215 <input type="text" class="form-control" value="{{ascenso.tituloTrabajo}}" />
216 216 <p><strong>Tipo de Trabajo de Ascneso:</strong> {{ ascenso.tipoTrabajoInvestigacion }} </p>
217 217 {% if ascenso.tipoTrabajoInvestigacion == 'tesis' %}
218   - {% if ascenso.tesisUbv %}
  218 + {% if not ascenso.tesisUbv %}
219 219 <p>Debe tener informe de pertinencia debido a que
220 220 es una tesis fuera de UBV</p>
221 221 {% else %}
... ...
app/Resources/views/memorando/acta_defensa_pertinencia.html.twig
... ... @@ -30,6 +30,19 @@
30 30 {{ ascenso.tituloTrabajo }}
31 31 {% endblock %}
32 32  
  33 +{% block tituloPertinencia %}
  34 + {{ pertinencia.tituloPertinencia }}
  35 +{% endblock %}
  36 +
  37 +{% block lugarDefensa %}
  38 + {{ pertinencia.lugarPertinencia }}
  39 +{% endblock %}
  40 +
  41 +{% block fechaDefensa %}
  42 + {{ pertinencia.fechaDefensa | date('d-m-Y') }}
  43 +{% endblock %}
  44 +
  45 +
33 46 {% block titulo2 %}
34 47 {{ ascenso.tituloTrabajo }}
35 48 {% endblock %}
... ...
src/AppBundle/Controller/AscensoController.php
... ... @@ -9,6 +9,7 @@
9 9 namespace AppBundle\Controller;
10 10  
11 11  
  12 +use AppBundle\Entity\AscensoPertinencia;
12 13 use AppBundle\Entity\AscensoTutores;
13 14 use AppBundle\Entity\DocumentosVerificados;
14 15 use Symfony\Component\Form\Extension\Core\Type\BirthdayType;
... ... @@ -154,6 +155,18 @@ class AscensoController extends Controller
154 155 if (!$form->get('pertinencia')->getData()) {
155 156 $form->get('pertinencia')->addError(new FormError('La tesis al ser fuera de la UBV debe incluir un informe de pertinencia'));
156 157 }
  158 +
  159 + if (!$form->get('titulo_pertinencia')->getData()) {
  160 + $form->get('titulo_pertinencia')->addError(new FormError('La tesis al ser fuera de la UBV debe incluir el titulo del informe de pertinencia'));
  161 + }
  162 +
  163 + if (!$form->get('lugar_pertinencia')->getData()) {
  164 + $form->get('pertinencia')->addError(new FormError('La tesis al ser fuera de la UBV debe incluir el lugar donde se defendió'));
  165 + }
  166 +
  167 + if (!$form->get('fecha_defensa')->getData()) {
  168 + $form->get('pertinencia')->addError(new FormError('La tesis al ser fuera de la UBV debe incluir la fecha de defensa'));
  169 + }
157 170 }
158 171  
159 172 }else if ($form->get('tipoTrabajoInvestigacion')->getData() === "investigacion"){
... ... @@ -253,7 +266,7 @@ class AscensoController extends Controller
253 266  
254 267 $ascenso->setTituloTrabajo($form->get('titulo_trabajo')->getData());
255 268 $ascenso->setTipoTrabajoInvestigacion($form->get('tipoTrabajoInvestigacion')->getData());
256   - $ascenso->setTesisUbv($form->get('tesisUbv')->getData());
  269 + $ascenso->setTesisUbv(!$form->get('tesisUbv')->getData());
257 270 $ascenso->setNombreNucelo($form->get('nombreNucleo')->getData());
258 271 $ascenso->setIdEscalafones($nueva_escala);
259 272 $ascenso->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(2));
... ... @@ -273,6 +286,14 @@ class AscensoController extends Controller
273 286  
274 287  
275 288 if ($form->get('pertinencia')->getData()){
  289 +
  290 + $pertinencia = new AscensoPertinencia();
  291 + $pertinencia->setIdAscenso($ascenso);
  292 + $pertinencia->setTituloPertinencia($form->get('titulo_pertinencia')->getData());
  293 + $pertinencia->setLugarPertinencia($form->get('lugar_pertinencia')->getData());
  294 + $pertinencia->setFechaDefensa($form->get('fecha_defensa')->getData());
  295 +
  296 + $em->persist($pertinencia);
276 297  
277 298 $constanciaPertinencia = $form->get('pertinencia')->getData();
278 299 $nombrePertinencia = md5(uniqid()).'.'.$constanciaPertinencia->guessExtension();
... ... @@ -1099,6 +1120,7 @@ $ascenso = $this-&gt;getDoctrine()-&gt;getRepository(&#39;AppBundle:Ascenso&#39;)-&gt;findOneBy(
1099 1120 'idRolInstitucion' => $servicio->getIdRolInstitucion(),
1100 1121 'idEstatus' => 1
1101 1122 ));
  1123 + $pertinencia = $this->getDoctrine()->getRepository("AppBundle:AscensoPertinencia")->findOneByIdAscenso($ascenso);
1102 1124 $eje = $ascenso->getIdRolInstitucion()->getIdInstitucion()->getIdEjeParroquia()->getIdEje()->getNombre();
1103 1125 $estado = $ascenso->getIdRolInstitucion()->getIdInstitucion()->getIdEjeParroquia()->getIdParroquia()->getIdMunicipio()->getIdEstado()->getNombre();
1104 1126 $tutores = $ascenso->getTutores();
... ... @@ -1120,8 +1142,6 @@ $ascenso = $this-&gt;getDoctrine()-&gt;getRepository(&#39;AppBundle:Ascenso&#39;)-&gt;findOneBy(
1120 1142 $presidente = $tutor;
1121 1143 }
1122 1144  
1123   -
1124   -
1125 1145 }
1126 1146  
1127 1147  
... ... @@ -1134,18 +1154,19 @@ $ascenso = $this-&gt;getDoctrine()-&gt;getRepository(&#39;AppBundle:Ascenso&#39;)-&gt;findOneBy(
1134 1154 'resolucion' => $resolucion,
1135 1155 'presidente' => $presidente,
1136 1156 'categoria' => $escalafones,
1137   - 'jurados' => $tutores
  1157 + 'jurados' => $tutores,
  1158 + 'pertinencia' => $pertinencia
1138 1159 ));
1139 1160 }else if (!$ascenso->getTesisUbv()) {
1140   -
1141   - return $this->render('memorando/acta_defensa_investigacion.html.twig', array(
  1161 + return $this->render('memorando/acta_defensa_pertinencia.html.twig', array(
1142 1162 'ascenso' => $ascenso,
1143 1163 'eje' => $eje,
1144 1164 'estado' => $estado,
1145 1165 'resolucion' => $resolucion,
1146 1166 'presidente' => $presidente,
1147 1167 'categoria' => $escalafones,
1148   - 'jurados' => $tutores
  1168 + 'jurados' => $tutores,
  1169 + 'pertinencia' => $pertinencia
1149 1170 ));
1150 1171  
1151 1172 }else{
... ... @@ -1156,7 +1177,8 @@ $ascenso = $this-&gt;getDoctrine()-&gt;getRepository(&#39;AppBundle:Ascenso&#39;)-&gt;findOneBy(
1156 1177 'resolucion' => $resolucion,
1157 1178 'presidente' => $presidente,
1158 1179 'categoria' => $escalafones,
1159   - 'jurados' => $tutores
  1180 + 'jurados' => $tutores,
  1181 + 'pertinencia' => $pertinencia
1160 1182 ));
1161 1183 }
1162 1184  
... ...
src/AppBundle/Entity/AscensoPertinencia.php
... ... @@ -0,0 +1,166 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: Wilmer Ramones
  5 + * Date: 29/06/16
  6 + * Time: 07:52 AM
  7 + */
  8 +
  9 +namespace AppBundle\Entity;
  10 +
  11 +use Doctrine\ORM\Mapping as ORM;
  12 +use Symfony\Component\Validator\Constraints as Assert;
  13 +
  14 +/**
  15 + * AscensoPertinencia
  16 + *
  17 + * @ORM\Table(name="ascenso_pertinencia")
  18 + * @ORM\Entity
  19 + */
  20 +class AscensoPertinencia
  21 +{
  22 +
  23 + /**
  24 + * @var integer
  25 + *
  26 + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador de la Tabla"})
  27 + * @ORM\Id
  28 + * @ORM\GeneratedValue(strategy="IDENTITY")
  29 + * @ORM\SequenceGenerator(sequenceName="adscripcion_id_seq", allocationSize=1, initialValue=1)
  30 + */
  31 + private $id;
  32 +
  33 +
  34 + /**
  35 + * @var \AppBundle\Entity\Ascenso
  36 + *
  37 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Ascenso", inversedBy="tutores")
  38 + * @ORM\JoinColumns({
  39 + * @ORM\JoinColumn(name="id_ascenso", referencedColumnName="id", nullable=false)
  40 + * })
  41 + */
  42 + protected $idAscenso;
  43 +
  44 +
  45 +
  46 + /**
  47 + * @ORM\Column(name="titulo_pertinencia", type="string", nullable=false, options={"comment" = "Título del informe de pertinencia"})
  48 + */
  49 + private $tituloPertinencia;
  50 +
  51 + /**
  52 + * @ORM\Column(name="lugar_pertinencia", type="string", nullable=false, options={"comment" = "Lugar donde defendió"})
  53 + */
  54 + private $lugarPertinencia;
  55 +
  56 +
  57 + /** @ORM\Column(type="date", name="fecha_defensa", nullable=false, options={"comment" = "Fecha de la defensa"})
  58 + * @Assert\Date()
  59 + */
  60 + private $fechaDefensa;
  61 +
  62 +
  63 +
  64 +
  65 + /**
  66 + * Get id
  67 + *
  68 + * @return integer
  69 + */
  70 + public function getId()
  71 + {
  72 + return $this->id;
  73 + }
  74 +
  75 + /**
  76 + * Set tituloPertinencia
  77 + *
  78 + * @param string $tituloPertinencia
  79 + * @return AscensoPertinencia
  80 + */
  81 + public function setTituloPertinencia($tituloPertinencia)
  82 + {
  83 + $this->tituloPertinencia = $tituloPertinencia;
  84 +
  85 + return $this;
  86 + }
  87 +
  88 + /**
  89 + * Get tituloPertinencia
  90 + *
  91 + * @return string
  92 + */
  93 + public function getTituloPertinencia()
  94 + {
  95 + return $this->tituloPertinencia;
  96 + }
  97 +
  98 + /**
  99 + * Set lugarPertinencia
  100 + *
  101 + * @param string $lugarPertinencia
  102 + * @return AscensoPertinencia
  103 + */
  104 + public function setLugarPertinencia($lugarPertinencia)
  105 + {
  106 + $this->lugarPertinencia = $lugarPertinencia;
  107 +
  108 + return $this;
  109 + }
  110 +
  111 + /**
  112 + * Get lugarPertinencia
  113 + *
  114 + * @return string
  115 + */
  116 + public function getLugarPertinencia()
  117 + {
  118 + return $this->lugarPertinencia;
  119 + }
  120 +
  121 + /**
  122 + * Set fechaDefensa
  123 + *
  124 + * @param \DateTime $fechaDefensa
  125 + * @return AscensoPertinencia
  126 + */
  127 + public function setFechaDefensa($fechaDefensa)
  128 + {
  129 + $this->fechaDefensa = $fechaDefensa;
  130 +
  131 + return $this;
  132 + }
  133 +
  134 + /**
  135 + * Get fechaDefensa
  136 + *
  137 + * @return \DateTime
  138 + */
  139 + public function getFechaDefensa()
  140 + {
  141 + return $this->fechaDefensa;
  142 + }
  143 +
  144 + /**
  145 + * Set idAscenso
  146 + *
  147 + * @param \AppBundle\Entity\Ascenso $idAscenso
  148 + * @return AscensoPertinencia
  149 + */
  150 + public function setIdAscenso(\AppBundle\Entity\Ascenso $idAscenso)
  151 + {
  152 + $this->idAscenso = $idAscenso;
  153 +
  154 + return $this;
  155 + }
  156 +
  157 + /**
  158 + * Get idAscenso
  159 + *
  160 + * @return \AppBundle\Entity\Ascenso
  161 + */
  162 + public function getIdAscenso()
  163 + {
  164 + return $this->idAscenso;
  165 + }
  166 +}
... ...
src/AppBundle/Form/AscensoType.php
... ... @@ -9,8 +9,10 @@
9 9  
10 10 namespace AppBundle\Form;
11 11  
  12 +use Symfony\Component\Form\Extension\Core\Type\DateType;
12 13 use Symfony\Component\Validator\Constraints\File;
13 14 use Symfony\Component\Validator\Constraints\NotBlank;
  15 +use Symfony\Component\Validator\Constraints\Date;
14 16  
15 17 use Symfony\Component\Form\AbstractType;
16 18 use Symfony\Component\Form\FormBuilderInterface;
... ... @@ -229,6 +231,55 @@ class AscensoType extends AbstractType
229 231 ))
230 232 )
231 233 ))
  234 + ->add('titulo_pertinencia', TextType::class, array(
  235 + 'label' => 'Título del informe de pertinencia',
  236 + 'label_attr' => array(
  237 + 'style' => 'display:none;',
  238 + 'class' => 'esc_pertinencia'
  239 + ),
  240 + 'required' => false,
  241 + 'attr' => array(
  242 + 'style' => 'display:none;',
  243 + 'class' => 'esc_pertinencia'
  244 + ),
  245 + 'constraints' => array(
  246 + new NotBlank(),
  247 + )
  248 + ))
  249 + ->add('lugar_pertinencia', TextType::class, array(
  250 + 'label' => 'Lugar de defensa de la Tesis',
  251 + 'label_attr' => array(
  252 + 'style' => 'display:none;',
  253 + 'class' => 'esc_pertinencia'
  254 + ),
  255 + 'required' => false,
  256 + 'attr' => array(
  257 + 'style' => 'display:none;',
  258 + 'class' => 'esc_pertinencia'
  259 + ),
  260 + 'constraints' => array(
  261 + new NotBlank(),
  262 + )
  263 + ))
  264 + ->add('fecha_defensa', DateType::class, array(
  265 + 'widget' => 'choice',
  266 + 'label' => 'Fecha defensa',
  267 + 'label_attr' => array(
  268 + 'style' => 'display:none;',
  269 + 'class' => 'esc_pertinencia form-group'
  270 + ),
  271 + 'attr' => array(
  272 + 'style' => 'display:none;',
  273 + 'class' => 'esc_pertinencia'
  274 + ),
  275 + 'placeholder' => array(
  276 + 'year' => 'Año', 'month' => 'Mes', 'day' => 'Día',
  277 + ),
  278 + 'constraints' => array(
  279 + new NotBlank(),
  280 + new Date()
  281 + )
  282 + ))
232 283 ->add('send', SubmitType::class, array(
233 284 'label' => 'Crear Solicitud de Ascenso',
234 285 'attr' => array(
... ...