Commit 98db528779b9759b8a9464d2340b7ff98b0175b9

Authored by Wilmer Ramones
1 parent ae9087de9b
Exists in master

corregido errores de muestra de imagen de nuevo concurso de oposción, corregido …

…error ascender luego de haber aprobado concurso
app/Resources/views/memorando/adscripcion.html.twig
... ... @@ -26,13 +26,18 @@
26 26 {%endblock%}
27 27  
28 28 {% block cuerpo %}
  29 +
29 30 <p class="text-justify cuerpo-memo">
30 31 Reciba un cordial saludo bolivariano y revolucionario de parte del equipo
31 32 de trabajo de este Centro de Estudios Ambientales. La presente es para
32   - informar que este Centro reconoce, basado en su interés en el área de
  33 + informar que este Centro reconoce,
  34 + {% if adscripcion.idLineaInvestigacion %}
  35 + basado en su interés en el área de
33 36 <i>{{adscripcion.idLineaInvestigacion.idAreaInvestigacion |capitalize }}</i>
34 37 bajo la línea <i>{{adscripcion.idLineaInvestigacion}}</i>
35   - con su trabajo de investigación titulado <i>{{adscripcion.tituloTrabajo}}</i> para así dar
  38 + con su trabajo de investigación titulado <i>{{adscripcion.tituloTrabajo}}</i>
  39 + {% endif %}
  40 + para así dar
36 41 cumplimiento al artículo N° 91 de Reglamento General de la Universidad Bolivariana de
37 42 Venezuela, que estable en su segundo párrafo <i>"Estarán adscritos a cada Centro de Estudios
38 43 , los trabajadores académicos, según el interés, formación y experiencia desarrollada en su
... ...
src/AppBundle/Controller/AntiguedadController.php
... ... @@ -43,6 +43,13 @@ class AntiguedadController extends Controller {
43 43 */
44 44 public function serviciosAntiguedadIndexAction(){
45 45  
  46 + $adscripcion = $this->getDoctrine()->getRepository("AppBundle:Adscripcion")->findOneByIdRolInstitucion($this->getUser()->getIdRolInstitucion());
  47 +
  48 + if (!$adscripcion->getOposicion() ){
  49 + $this->addFlash('danger', 'Estimado docente el CEA le informa que para gozar de este servicio, debe haber aprobado concurso de oposición.');
  50 + return $this->redirect($this->generateUrl('cea_index'));
  51 + }
  52 +
46 53 $servicio = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy(array(
47 54 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion(),
48 55 'idServicioCe' => 1
... ...
src/AppBundle/Controller/AscensoController.php
... ... @@ -234,11 +234,19 @@ class AscensoController extends Controller
234 234 $nombreAscenso = md5(uniqid()).'.'.$constanciaAscenso->guessExtension();
235 235  
236 236 // Guardar el archivo y crear la miniatura de cada uno
  237 + if (!$concurso->getOposicion()){
237 238 $constanciaAscenso->move(
  239 + $this->container->getParameter('adscripcion_directory'),
  240 + $nombreAscenso
  241 + );
  242 + thumbnail2($nombreAscenso, $this->container->getParameter('adscripcion_directory'), $this->container->getParameter('ascenso_thumb_directory'));
  243 + }else{
  244 + $constanciaAscenso->move(
238 245 $this->container->getParameter('ascenso_directory'),
239 246 $nombreAscenso
240 247 );
241 248 thumbnail2($nombreAscenso, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory'));
  249 + }
242 250 if (!$concurso->getOposicion()){
243 251 $adscripcion->setOposicion($nombreAscenso);
244 252 }else{
... ... @@ -497,14 +505,14 @@ class AscensoController extends Controller
497 505  
498 506 if ($this->get('request')->request->get('tipo') == 2 ){
499 507 $ServicioAscenso = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy(array(
500   - 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion(),
  508 + 'idRolInstitucion' => $servicio->getIdRolInstitucion(),
501 509 'idServicioCe' => 5,
502 510 'idEstatus' => 1
503 511 ));
504 512  
505 513  
506 514 $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy(array(
507   - 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion(),
  515 + 'idRolInstitucion' => $servicio->getIdRolInstitucion(),
508 516 'idEstatus' => 1
509 517 ));
510 518  
... ...