[Alba-desarrollo] SVN Alba r5221 - prosistem/alba/trunk/alba/apps/principal/modules/informes/actions

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Oct 17 20:51:58 CEST 2007


Author: josx
Date: 2007-10-17 15:51:58 -0300 (Wed, 17 Oct 2007)
New Revision: 5221

Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/acti=
ons.class.php
Log:
Modificaciones a la logica de los informes

Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/actio=
ns/actions.class.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/act=
ions.class.php	2007-10-17 14:39:59 UTC (rev 5220)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/act=
ions.class.php	2007-10-17 18:51:58 UTC (rev 5221)
@@ -306,22 +306,44 @@
     }
=20
=20
+    public function executeBusqueda() {
+        $informe =3D InformePeer::retrieveByPk($this->getRequestParamete=
r('id'));
+        $this->forward404Unless($informe);
+        $establecimiento_id =3D $this->getUser()->getAttribute('fk_estab=
lecimiento_id');
+
+        switch($informe->getTipoInforme()->getNombre()) {
+            case 'alumno': $this->redirect('informes/busquedaAlumnos?id=3D=
'.$informe->getId()); break;
+            default: $this->redirect('informes/busquedaAlumnos?id=3D'.$i=
nforme->getId());
+        }
+    }
+
+
+
     public function executeMostrar() {
         $informe =3D InformePeer::retrieveByPk($this->getRequestParamete=
r('id'));
         $this->forward404Unless($informe);
-
         $establecimiento_id =3D $this->getUser()->getAttribute('fk_estab=
lecimiento_id');
=20
-        $aAlumno =3D $this->_getTodosLosAlumnos($establecimiento_id);
+/*
+        if($informe->getVariables()) {
+        } else {
+*/
+        switch($informe->getTipoInforme()->getNombre()) {
+            case 'alumno':=20
+                            $alumno =3D AlumnoPeer::retrieveByPk($this->=
getRequestParameter('alumno_id'));
+                            $datos =3D $alumno->toArray();
+                            break;
=20
-        $datos =3D $aAlumno[0];
+            default: $this->forward404();
+        }
+
         $this->reporteTBSOO($informe->getAdjunto()->getRuta(), $informe-=
>getTipoInforme()->getNombre(), $datos);
-
         return sfview::NONE;
     }
=20
=20
=20
+
     public function executeBusquedaAlumnos() {
         $informe =3D InformePeer::retrieveByPk($this->getRequestParamete=
r('id'));
         $this->forward404Unless($informe);
@@ -337,7 +359,7 @@
         // llenando el combo de division segun establecimiento
         $establecimiento_id =3D $this->getUser()->getAttribute('fk_estab=
lecimiento_id');
         $optionsDivision =3D $this->_getDivisiones($establecimiento_id);
-      =20
+
         if ($this->getRequest()->getMethod() =3D=3D sfRequest::POST) {
             $aAlumno =3D $this->_getAlumnosPorDivision($division_id, $tx=
t);             // buscando alumnos
         }
@@ -347,14 +369,15 @@
         $this->division_id =3D $division_id;
         $this->txt =3D $txt;
         $this->aAlumno =3D $aAlumno;
-        $this->titulo =3D $informe->getNombre();
-//         $this->is =3D $informe=3D
+        $this->informe =3D $informe;
     }
=20
=20
=20
=20
     private function reporteTBSOO($archivo, $tipoinforme, $datos) {
+        // Aqu=C3=AD hay que verificar las variables que est=C3=A1n en O=
DT y verificar si existen=20
+        // en los datos que env=C3=ADo.
         define('BASE',sfConfig::get('sf_app_module_dir') .'/informes/' .=
sfConfig::get('sf_app_module_lib_dir_name').'/');
         require_once(BASE.'tbs_class_php5.php');
         require_once(BASE.'tbsooo_class.php');


--=20
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que est=E1 limpio.
For all your IT requirements visit: http://www.transtec.co.uk




Más información sobre la lista de distribución Alba-desarrollo