[Alba-desarrollo] SVN Alba r5765 - in prosistem/alba/trunk/alba: apps/principal/modules apps/principal/modules/anio/actions apps/principal/modules/anio/config apps/principal/modules/carrera apps/principal/modules/carrera/actions apps/principal/modules/carrera/config apps/principal/modules/carrera/templates apps/principal/modules/carrera/validate apps/principal/modules/division/actions apps/principal/modules/division/config apps/principal/modules/division/templates apps/principal/modules/relAnioActividad/actions apps/principal/modules/relAnioActividad/config apps/principal/modules/relAnioActividad/templates apps/principal/templates config data/sql lib/model

commits en pressenter.com.ar commits en pressenter.com.ar
Lun Jul 28 21:30:38 CEST 2008


Author: josx
Date: 2008-07-28 16:30:37 -0300 (Mon, 28 Jul 2008)
New Revision: 5765

Added:
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/actions/
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/config/
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/config/generator.yml
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/config/security.yml
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/templates/
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/templates/_edit_header.php
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/validate/
   prosistem/alba/trunk/alba/apps/principal/modules/carrera/validate/edit.yml
   prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_carrera.php
   prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_carrera.php
   prosistem/alba/trunk/alba/lib/model/Carrera.php
   prosistem/alba/trunk/alba/lib/model/CarreraPeer.php
Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/anio/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/anio/config/generator.yml
   prosistem/alba/trunk/alba/apps/principal/modules/division/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml
   prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/config/generator.yml
   prosistem/alba/trunk/alba/apps/principal/templates/menu.php
   prosistem/alba/trunk/alba/config/schema.yml
   prosistem/alba/trunk/alba/data/sql/actualizacion_1.0_luego.sql
   prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
   prosistem/alba/trunk/alba/data/sql/datos_ejemplo_update_seq.sql
Log:
Se Agrega a cada establecimiento la posibilidad de disponer de varias carreras. Se ha modificado la carga de grados/a?\195?\177os, divisiones/secciones y actividades por grado (posibilidad de filtrado). Adem?\195?\161s se agrego un nuevo modulo Carreras.

Modified: prosistem/alba/trunk/alba/apps/principal/modules/anio/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/anio/actions/actions.class.php	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/apps/principal/modules/anio/actions/actions.class.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -34,8 +34,8 @@
 {
 
     protected function addFiltersCriteria ($c) {
+        parent::addFiltersCriteria($c);
         $c->add(AnioPeer::FK_ESTABLECIMIENTO_ID,$this->getUser()->getAttribute('fk_establecimiento_id'));
-    
     }
     
     protected function saveAnio ($anio) {

Modified: prosistem/alba/trunk/alba/apps/principal/modules/anio/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/anio/config/generator.yml	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/apps/principal/modules/anio/config/generator.yml	2008-07-28 19:30:37 UTC (rev 5765)
@@ -7,10 +7,11 @@
         descripcion: { name: Descripción , params: size=40 }
         orden: { name: Orden , params: size=2 }
         fk_establecimiento_id: { name: Establecimiento }
+        fk_carrera_id: { name: Carrera }
     
     edit:
         title: " "
-        display: [descripcion, orden]
+        display: [descripcion, fk_carrera_id, orden]
         actions:
             _delete: -
             _save: -
@@ -19,8 +20,9 @@
                     
     list:
         title: Listado de Años
-        display: [ =descripcion , orden ]
-        sort: descripcion
+        display: [ =descripcion , carrera, orden ]
+        sort: orden
+        filters: [ fk_carrera_id ]
         object_actions:
             _edit:      -
             _delete:    -

Added: prosistem/alba/trunk/alba/apps/principal/modules/carrera/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/carrera/actions/actions.class.php	                        (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/carrera/actions/actions.class.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -0,0 +1,41 @@
+<?php
+/**
+ *    This file is part of Alba.
+ *
+ *    Alba is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    Alba is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with Alba; if not, write to the Free Software
+ *    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+
+/**
+ * carrera actions.
+ *
+ * @package    alba
+ * @subpackage carrera
+ * @author     Your name here
+ * @version    SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z josx $
+ */
+class carreraActions extends autocarreraActions
+{
+    protected function addFiltersCriteria ($c) {
+        $c->add(CarreraPeer::FK_ESTABLECIMIENTO_ID,$this->getUser()->getAttribute('fk_establecimiento_id'));
+    }
+
+    protected function saveCarrera ($carrera) {
+        $carrera->setFkEstablecimientoId($this->getUser()->getAttribute('fk_establecimiento_id'));
+        $carrera->save();
+    }
+}
+
+?>

Added: prosistem/alba/trunk/alba/apps/principal/modules/carrera/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/carrera/config/generator.yml	                        (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/carrera/config/generator.yml	2008-07-28 19:30:37 UTC (rev 5765)
@@ -0,0 +1,26 @@
+generator:
+  class:              sfPropelAdminGenerator
+  param:
+    model_class:      Carrera
+    theme:            default
+    fields:
+        descripcion: { name: Descripci&oacute;n , params: size=40 }
+        orden: { name: Orden , params: size=2 }
+        fk_establecimiento_id: { name: Establecimiento }
+    
+    edit:
+        title: " "
+        display: [descripcion, orden]
+        actions:
+            _delete: -
+            _save: -
+            _list: -
+            _save_and_add: -
+                    
+    list:
+        title: Listado de Carreras
+        display: [ =descripcion , orden ]
+        sort: orden
+        object_actions:
+            _edit:      -
+            _delete:    -   

Added: prosistem/alba/trunk/alba/apps/principal/modules/carrera/config/security.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/carrera/config/security.yml	                        (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/carrera/config/security.yml	2008-07-28 19:30:37 UTC (rev 5765)
@@ -0,0 +1,3 @@
+all:
+    is_secure: on
+    credentials: carrera

Added: prosistem/alba/trunk/alba/apps/principal/modules/carrera/templates/_edit_header.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/carrera/templates/_edit_header.php	                        (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/carrera/templates/_edit_header.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -0,0 +1 @@
+<h1><?php echo ($sf_params->get('action') == "create")?"Ingresar Carrera":"Modificar Carrera";?></h1>

Added: prosistem/alba/trunk/alba/apps/principal/modules/carrera/validate/edit.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/carrera/validate/edit.yml	                        (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/carrera/validate/edit.yml	2008-07-28 19:30:37 UTC (rev 5765)
@@ -0,0 +1,27 @@
+methods:
+  post:       
+    - "carrera{descripcion}"
+    
+fillin:
+    enabled:       on
+      
+names:
+    carrera{descripcion}:
+        required:     Yes
+        required_msg: El campo descripci&oacute;n es obligatorio
+        validators: caracteresMaximos255, validarUnico
+    
+caracteresMaximos255:
+    class:  sfStringValidator
+    param:
+        max: 255
+        max_error: La m&aacute;xima cantidad de caracteres permitida es de 255
+
+validarUnico:
+    class:    sfCustomUniqueValidator
+    param:
+        class: Carrera
+        nb_fields:  2
+        field_1:    fk_establecimiento_id
+        field_2:    descripcion        
+        custom_unique_error:     El a&ntilde;o que intenta agregar ya existe en el mismo establecimiento!

Modified: prosistem/alba/trunk/alba/apps/principal/modules/division/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/division/actions/actions.class.php	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/apps/principal/modules/division/actions/actions.class.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -37,6 +37,38 @@
         $this->redirect('alumno/list?filters%5Bdivision%5D='.$this->getRequestParameter('id').'&filter=filtrar');
     }
 
+    protected function addFiltersCriteria($c) {
+        if (isset($this->filters['fk_anio_id_is_empty'])) {
+            $criterion = $c->getNewCriterion(DivisionPeer::FK_ANIO_ID, '');
+            $criterion->addOr($c->getNewCriterion(DivisionPeer::FK_ANIO_ID, null, Criteria::ISNULL));
+            $c->add($criterion);
+        }  else if (isset($this->filters['fk_anio_id']) && $this->filters['fk_anio_id'] !== '') {
+            $c->add(DivisionPeer::FK_ANIO_ID, $this->filters['fk_anio_id']);
+        }
+
+        if (isset($this->filters['fk_orientacion_id_is_empty'])) {
+            $criterion = $c->getNewCriterion(DivisionPeer::FK_ORIENTACION_ID, '');
+            $criterion->addOr($c->getNewCriterion(DivisionPeer::FK_ORIENTACION_ID, null, Criteria::ISNULL));
+            $c->add($criterion);
+        } else if (isset($this->filters['fk_orientacion_id']) && $this->filters['fk_orientacion_id'] !== '') {
+            $c->add(DivisionPeer::FK_ORIENTACION_ID, $this->filters['fk_orientacion_id']);
+        }
+
+        if (isset($this->filters['fk_turno_id_is_empty'])) {
+           $criterion = $c->getNewCriterion(DivisionPeer::FK_TURNO_ID, '');
+           $criterion->addOr($c->getNewCriterion(DivisionPeer::FK_TURNO_ID, null, Criteria::ISNULL));
+           $c->add($criterion);
+        }
+        else if (isset($this->filters['fk_turno_id']) && $this->filters['fk_turno_id'] !== '') {
+           $c->add(DivisionPeer::FK_TURNO_ID, $this->filters['fk_turno_id']);
+        }
+
+        if (isset($this->filters['carrera']) && $this->filters['carrera'] !== '') {
+            $c->add(AnioPeer::FK_CARRERA_ID, $this->filters['carrera']);
+            $c->addJoin(AnioPeer::ID, DivisionPeer::FK_ANIO_ID);
+        }
+    }
+
 }
 
 ?>

Modified: prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml	2008-07-28 19:30:37 UTC (rev 5765)
@@ -25,5 +25,5 @@
             _edit:      -
             _delete:    -
             alumnosPorDivision:  { name: Alumnos por Division, action: alumnosPorDivision, icon: small/alumnos.png } 
-        filters: [ fk_anio_id, fk_orientacion_id, fk_turno_id ]
+        filters: [ _carrera, fk_anio_id, fk_orientacion_id, fk_turno_id ]
 

Added: prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_carrera.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_carrera.php	                        (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_carrera.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -0,0 +1,12 @@
+<?php 
+    $c = new Criteria(); 
+    $c->add(CarreraPeer::FK_ESTABLECIMIENTO_ID, $sf_user->getAttribute('fk_establecimiento_id'));
+    $c->addAscendingOrderByColumn(CarreraPeer::ORDEN);
+    $carreras = CarreraPeer::doSelect($c);
+    $optionsCarreras = array();
+    $optionsCarreras[""] = "--Seleccione un Carrera--";   
+    foreach ($carreras as $carrera) {
+        $optionsCarreras[$carrera->getId()] = $carrera->getDescripcion();
+    }
+    echo select_tag('filters[carrera]', options_for_select($optionsCarreras, isset($filters['carrera']) ? $filters['carrera'] : null )) ;
+?>

Modified: prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/actions/actions.class.php	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/actions/actions.class.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -63,5 +63,45 @@
         }
 
     }
+
+    protected function addFiltersCriteria($c) {
+
+        if (isset($this->filters['fk_anio_id_is_empty']))
+        {
+            $criterion = $c->getNewCriterion(RelAnioActividadPeer::FK_ANIO_ID, '');
+            $criterion->addOr($c->getNewCriterion(RelAnioActividadPeer::FK_ANIO_ID, null, Criteria::ISNULL));
+            $c->add($criterion);
+        }
+        else if (isset($this->filters['fk_anio_id']) && $this->filters['fk_anio_id'] !== '')
+        {
+            $c->add(RelAnioActividadPeer::FK_ANIO_ID, $this->filters['fk_anio_id']);
+        }
+        if (isset($this->filters['fk_actividad_id_is_empty']))
+        {
+            $criterion = $c->getNewCriterion(RelAnioActividadPeer::FK_ACTIVIDAD_ID, '');
+            $criterion->addOr($c->getNewCriterion(RelAnioActividadPeer::FK_ACTIVIDAD_ID, null, Criteria::ISNULL));
+            $c->add($criterion);
+        }
+        else if (isset($this->filters['fk_actividad_id']) && $this->filters['fk_actividad_id'] !== '')
+        {
+            $c->add(RelAnioActividadPeer::FK_ACTIVIDAD_ID, $this->filters['fk_actividad_id']);
+        }
+        if (isset($this->filters['fk_orientacion_id_is_empty']))
+        {
+            $criterion = $c->getNewCriterion(RelAnioActividadPeer::FK_ORIENTACION_ID, '');
+            $criterion->addOr($c->getNewCriterion(RelAnioActividadPeer::FK_ORIENTACION_ID, null, Criteria::ISNULL));
+            $c->add($criterion);
+        }
+        else if (isset($this->filters['fk_orientacion_id']) && $this->filters['fk_orientacion_id'] !== '')
+        {
+            $c->add(RelAnioActividadPeer::FK_ORIENTACION_ID, $this->filters['fk_orientacion_id']);
+        }
+
+        if (isset($this->filters['carrera']) && $this->filters['carrera'] !== '') {
+            $c->add(AnioPeer::FK_CARRERA_ID, $this->filters['carrera']);
+            $c->addJoin(AnioPeer::ID, RelAnioActividadPeer::FK_ANIO_ID);
+        }
+    }
+
 }
-?>
\ No newline at end of file
+?>

Modified: prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/config/generator.yml	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/config/generator.yml	2008-07-28 19:30:37 UTC (rev 5765)
@@ -22,5 +22,5 @@
         object_actions:
             _edit:      -
             _delete:    -
-        filters: [ fk_anio_id, fk_actividad_id, fk_orientacion_id ]
+        filters: [ _carrera, fk_anio_id, fk_actividad_id, fk_orientacion_id ]
 

Added: prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_carrera.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_carrera.php	                        (rev 0)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_carrera.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -0,0 +1,12 @@
+<?php 
+    $c = new Criteria(); 
+    $c->add(CarreraPeer::FK_ESTABLECIMIENTO_ID, $sf_user->getAttribute('fk_establecimiento_id'));
+    $c->addAscendingOrderByColumn(CarreraPeer::ORDEN);
+    $carreras = CarreraPeer::doSelect($c);
+    $optionsCarreras = array();
+    $optionsCarreras[""] = "--Seleccione un Carrera--";   
+    foreach ($carreras as $carrera) {
+        $optionsCarreras[$carrera->getId()] = $carrera->getDescripcion();
+    }
+    echo select_tag('filters[carrera]', options_for_select($optionsCarreras, isset($filters['carrera'])? $filters['carrera']: null ) ) ;
+?>

Modified: prosistem/alba/trunk/alba/apps/principal/templates/menu.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/templates/menu.php	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/apps/principal/templates/menu.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -100,7 +100,8 @@
         </li>
 	    <li><span></span><a href="#">Gesti&oacute;n Escolar</a>
             <ul>
-	            <li><span></span><?php echo link_to("Definir Grados/A&ntilde;os","anio")?></li>
+                <li><span></span><?php echo link_to("Definir Carrera","carrera")?></li>
+                <li><span></span><?php echo link_to("Definir Grados/A&ntilde;os","anio")?></li>
                 <li><span></span><?php echo link_to("Definir Orientaciones","orientacion")?></li>
 	            <li><span></span><?php echo link_to("Definir Secciones/Divisiones","division")?></li>
 	            <li><span></span><?php echo link_to("Asignar Alumno a Secci&oacute;n/Divisi&oacute;n","relAlumnoDivision/create")?></li>

Modified: prosistem/alba/trunk/alba/config/schema.yml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.yml	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/config/schema.yml	2008-07-28 19:30:37 UTC (rev 5765)
@@ -1320,6 +1320,28 @@
     fecha: 
       type: timestamp
       required: true
+  carrera:
+    _attributes:
+      idMethod: native
+    id:
+      type: integer
+      required: true
+      autoIncrement: true
+      primaryKey: true
+    fk_establecimiento_id: 
+      type: integer
+      required: true
+      default: 0
+      foreignTable: establecimiento
+      foreignReference: id
+    descripcion: 
+      type: varchar
+      size: 255
+      required: true
+    orden: 
+      type: INTEGER
+      required: false
+      default: 0
   anio: 
     _attributes: 
       idMethod: native
@@ -1334,6 +1356,12 @@
       default: 0
       foreignTable: establecimiento
       foreignReference: id
+    fk_carrera_id: 
+      type: integer
+      required: true
+      default: 0
+      foreignTable: carrera
+      foreignReference: id 
     descripcion: 
       type: varchar
       size: 255

Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0_luego.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0_luego.sql	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0_luego.sql	2008-07-28 19:30:37 UTC (rev 5765)
@@ -46,5 +46,22 @@
 
 ALTER TABLE `docente` ADD `observacion` TEXT NULL AFTER `psicofisico`;
 
+
+--CREATE SEQUENCE "carrera_seq"; // esto es para postgres
+CREATE TABLE "carrera"
+(
+    "id" INTEGER  NOT NULL,
+    "fk_establecimiento_id" INTEGER default 0 NOT NULL,
+    "descripcion" VARCHAR(255)  NOT NULL,
+    "orden" INTEGER default 0,
+    PRIMARY KEY ("id")
+);
+
+ALTER TABLE "carrera" ADD CONSTRAINT "carrera_FK_1" FOREIGN KEY ("fk_establecimiento_id") REFERENCES "establecimiento" ("id");
+
+ALTER TABLE "anio" ADD "fk_carrera_id" INTEGER default 0 NOT NULL;
+ALTER TABLE "anio" ADD CONSTRAINT "anio_FK_2" FOREIGN KEY ("fk_carrera_id") REFERENCES "carrera" ("id")
+
+
 # This restores the fkey checks, after having unset them earlier
 SET FOREIGN_KEY_CHECKS = 1;

Modified: prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql	2008-07-28 19:30:37 UTC (rev 5765)
@@ -141,6 +141,7 @@
 INSERT INTO modulo (id, nombre, titulo, descripcion, activo) VALUES (48, 'rolResponsable', 'Rol Responsables', 'Roles de los Resposables de Alumos', true);
 INSERT INTO modulo (id, nombre, titulo, descripcion, activo) VALUES (49, 'orientacion','Orientacion','Orientacion de los grados', true);
 INSERT INTO modulo (id, nombre, titulo, descripcion, activo) VALUES (50, 'tiponivel','Tipo de Nivel','', true);
+INSERT INTO modulo (id, nombre, titulo, descripcion, activo) VALUES (51, 'carrera','','', true);
 
 -- 
 -- Volcar la base de datos para la tabla espacio
@@ -262,7 +263,7 @@
 INSERT INTO permiso (id,nombre, descripcion, credencial, fk_modulo_id) VALUES (60, 'rolResponsable', 'Rol de Responsables', 'rolResponsable', 48);
 INSERT INTO permiso (id, nombre, descripcion, credencial, fk_modulo_id) VALUES (61, 'orientacion', 'Orientacion', 'orientacion', 49);
 INSERT INTO permiso (id, nombre, descripcion, credencial, fk_modulo_id) VALUES (62, 'tiponivel', 'Tipo de Nivel', 'niveltipo', 50);
-
+INSERT INTO permiso (id, nombre, descripcion, credencial, fk_modulo_id) VALUES (63, 'carrera', '', 'carrera', 51);
 -- 
 -- Volcar la base de datos para la tabla preferencia
 -- 
@@ -346,6 +347,7 @@
 INSERT INTO rel_rol_permiso (id, fk_rol_id, fk_permiso_id) VALUES (47, 2, 34);
 INSERT INTO rel_rol_permiso (id, fk_rol_id, fk_permiso_id) VALUES (48, 2, 36);
 INSERT INTO rel_rol_permiso (id, fk_rol_id, fk_permiso_id) VALUES (49, 2, 35);
+INSERT INTO rel_rol_permiso (id, fk_rol_id, fk_permiso_id) VALUES (50, 2, 63);
 
 -- 
 -- Volcar la base de datos para la tabla rel_usuario_permiso
@@ -408,6 +410,7 @@
 INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (211, 1, 60);
 INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (216, 1, 61);
 INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (217, 1, 62);
+INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (218, 1, 63);
 
 --Usuario 2
 INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (52, 2, 1);
@@ -463,6 +466,8 @@
 INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (102, 2, 57);
 INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (212, 2, 60);
 INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (215, 2, 61);
+INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (219, 2, 62);
+INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (220, 2, 63);
 
 --Usuario 3
 INSERT INTO rel_usuario_permiso (id, fk_usuario_id, fk_permiso_id) VALUES (213, 3, 60);
@@ -3073,17 +3078,25 @@
 -- Volcar la base de datos para la tabla examen
 -- 
 
+
 -- 
+-- Volcar la base de datos para la tabla carrera
+-- 
+
+INSERT INTO carrera (id, fk_establecimiento_id, descripcion, orden)  VALUES ( 1, 1, 'Escuela Primaria Básica', 10);
+
+
+-- 
 -- Volcar la base de datos para la tabla anio
 -- 
 
-INSERT INTO anio (id, fk_establecimiento_id, descripcion, orden) VALUES (1, 1, 'Primer Grado', 10);
-INSERT INTO anio (id, fk_establecimiento_id, descripcion, orden) VALUES (2, 1, 'Segundo Grado ', 20);
-INSERT INTO anio (id, fk_establecimiento_id, descripcion, orden) VALUES (3, 1, 'Tercer Grado', 30);
-INSERT INTO anio (id, fk_establecimiento_id, descripcion, orden) VALUES (4, 1, 'Cuarto Grado', 40);
-INSERT INTO anio (id, fk_establecimiento_id, descripcion, orden) VALUES (5, 1, 'Quinto grado', 50);
-INSERT INTO anio (id, fk_establecimiento_id, descripcion, orden) VALUES (6, 1, 'Sexto Grado', 60);
-INSERT INTO anio (id, fk_establecimiento_id, descripcion, orden) VALUES (7, 1, 'Séptimo Grado', 70);
+INSERT INTO anio (id, fk_establecimiento_id, fk_carrera_id ,descripcion, orden) VALUES (1, 1, 1, 'Primer Grado', 10);
+INSERT INTO anio (id, fk_establecimiento_id, fk_carrera_id ,descripcion, orden) VALUES (2, 1, 1, 'Segundo Grado ', 20);
+INSERT INTO anio (id, fk_establecimiento_id, fk_carrera_id ,descripcion, orden) VALUES (3, 1, 1, 'Tercer Grado', 30);
+INSERT INTO anio (id, fk_establecimiento_id, fk_carrera_id ,descripcion, orden) VALUES (4, 1, 1, 'Cuarto Grado', 40);
+INSERT INTO anio (id, fk_establecimiento_id, fk_carrera_id ,descripcion, orden) VALUES (5, 1, 1, 'Quinto grado', 50);
+INSERT INTO anio (id, fk_establecimiento_id, fk_carrera_id ,descripcion, orden) VALUES (6, 1, 1, 'Sexto Grado', 60);
+INSERT INTO anio (id, fk_establecimiento_id, fk_carrera_id ,descripcion, orden) VALUES (7, 1, 1, 'Séptimo Grado', 70);
 
 -- 
 -- Volcar la base de datos para la tabla division

Modified: prosistem/alba/trunk/alba/data/sql/datos_ejemplo_update_seq.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/datos_ejemplo_update_seq.sql	2008-07-28 19:25:52 UTC (rev 5764)
+++ prosistem/alba/trunk/alba/data/sql/datos_ejemplo_update_seq.sql	2008-07-28 19:30:37 UTC (rev 5765)
@@ -12,8 +12,8 @@
 ALTER SEQUENCE organizacion_seq RESTART WITH 2;
 ALTER SEQUENCE establecimiento_seq RESTART WITH 2;
 ALTER SEQUENCE usuario_seq RESTART WITH 5;
-ALTER SEQUENCE modulo_seq RESTART WITH 51;
-ALTER SEQUENCE permiso_seq RESTART WITH 63;
+ALTER SEQUENCE modulo_seq RESTART WITH 52;
+ALTER SEQUENCE permiso_seq RESTART WITH 64;
 ALTER SEQUENCE rel_usuario_permiso_seq RESTART WITH 57;
 ALTER SEQUENCE tipoinforme_seq RESTART WITH 3;
 ALTER SEQUENCE adjunto_seq RESTART WITH 11;
@@ -22,8 +22,8 @@
 ALTER SEQUENCE preferencia_seq RESTART WITH 2;
 ALTER SEQUENCE rol_seq RESTART WITH 3;
 ALTER SEQUENCE rel_establecimiento_locacion_seq RESTART WITH 3;
-ALTER SEQUENCE rel_rol_permiso_seq RESTART WITH 50;
-ALTER SEQUENCE rel_usuario_permiso_seq RESTART WITH 218;
+ALTER SEQUENCE rel_rol_permiso_seq RESTART WITH 51;
+ALTER SEQUENCE rel_usuario_permiso_seq RESTART WITH 221;
 ALTER SEQUENCE cuenta_seq RESTART WITH 42;
 ALTER SEQUENCE alumno_seq RESTART WITH 64;
 ALTER SEQUENCE rol_responsable_seq RESTART WITH 4;
@@ -45,6 +45,7 @@
 ALTER SEQUENCE boletin_conceptual_seq RESTART WITH 1141;
 ALTER SEQUENCE actividad_seq RESTART WITH 17;
 ALTER SEQUENCE boletin_actividades_seq RESTART WITH 428;
+ALTER SEQUENCE carrera_seq RESTART WITH 2;
 ALTER SEQUENCE anio_seq RESTART WITH 8;
 ALTER SEQUENCE division_seq RESTART WITH 22;
 ALTER SEQUENCE repeticion_seq RESTART WITH 5;

Added: prosistem/alba/trunk/alba/lib/model/Carrera.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/Carrera.php	                        (rev 0)
+++ prosistem/alba/trunk/alba/lib/model/Carrera.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * Subclass for representing a row from the 'carrera' table.
+ *
+ * 
+ *
+ * @package lib.model
+ */ 
+class Carrera extends BaseCarrera
+{
+    public function __toString() {
+        return $this->getDescripcion();
+    }
+}

Added: prosistem/alba/trunk/alba/lib/model/CarreraPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/CarreraPeer.php	                        (rev 0)
+++ prosistem/alba/trunk/alba/lib/model/CarreraPeer.php	2008-07-28 19:30:37 UTC (rev 5765)
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * Subclass for performing query and update operations on the 'carrera' table.
+ *
+ * 
+ *
+ * @package lib.model
+ */ 
+class CarreraPeer extends BaseCarreraPeer
+{
+}




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