SVN Alba r5221 - prosistem/alba/trunk/alba/apps/principal/modules/informes/actions
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/actions.class.php Log: Modificaciones a la logica de los informes Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php =================================================================== --- prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php 2007-10-17 14:39:59 UTC (rev 5220) +++ prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php 2007-10-17 18:51:58 UTC (rev 5221) @@ -306,22 +306,44 @@ } + public function executeBusqueda() { + $informe = InformePeer::retrieveByPk($this->getRequestParameter('id')); + $this->forward404Unless($informe); + $establecimiento_id = $this->getUser()->getAttribute('fk_establecimiento_id'); + + switch($informe->getTipoInforme()->getNombre()) { + case 'alumno': $this->redirect('informes/busquedaAlumnos?id='.$informe->getId()); break; + default: $this->redirect('informes/busquedaAlumnos?id='.$informe->getId()); + } + } + + + public function executeMostrar() { $informe = InformePeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($informe); - $establecimiento_id = $this->getUser()->getAttribute('fk_establecimiento_id'); - $aAlumno = $this->_getTodosLosAlumnos($establecimiento_id); +/* + if($informe->getVariables()) { + } else { +*/ + switch($informe->getTipoInforme()->getNombre()) { + case 'alumno': + $alumno = AlumnoPeer::retrieveByPk($this->getRequestParameter('alumno_id')); + $datos = $alumno->toArray(); + break; - $datos = $aAlumno[0]; + default: $this->forward404(); + } + $this->reporteTBSOO($informe->getAdjunto()->getRuta(), $informe->getTipoInforme()->getNombre(), $datos); - return sfview::NONE; } + public function executeBusquedaAlumnos() { $informe = InformePeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($informe); @@ -337,7 +359,7 @@ // llenando el combo de division segun establecimiento $establecimiento_id = $this->getUser()->getAttribute('fk_establecimiento_id'); $optionsDivision = $this->_getDivisiones($establecimiento_id); - + if ($this->getRequest()->getMethod() == sfRequest::POST) { $aAlumno = $this->_getAlumnosPorDivision($division_id, $txt); // buscando alumnos } @@ -347,14 +369,15 @@ $this->division_id = $division_id; $this->txt = $txt; $this->aAlumno = $aAlumno; - $this->titulo = $informe->getNombre(); -// $this->is = $informe= + $this->informe = $informe; } private function reporteTBSOO($archivo, $tipoinforme, $datos) { + // Aquí hay que verificar las variables que están en ODT y verificar si existen + // en los datos que envío. 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'); -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que est� limpio. For all your IT requirements visit: http://www.transtec.co.uk
participants (1)
-
commits@pressenter.com.ar