Permalink
Browse files

mostrar solo los grados del ciclo lectivo actual

  • Loading branch information...
1 parent e7f3ab4 commit 8692535f9d560ff898be4b7c74ae783f334a74c9 @ftoledo ftoledo committed Feb 26, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 apps/principal/modules/informes/actions/actions.class.php
@@ -735,8 +735,16 @@ function isNotAssocArray($arr) {
private function _getDivisiones($establecimiento_id) {
$optionsDivision = array();
$criteria = new Criteria();
+ $criteria->addJoin(DivisionPeer::FK_ANIO_ID, AnioPeer::ID);
+ $criteria->addJoin(DivisionPeer::FK_TURNO_ID, TurnoPeer::ID);
+ $criteria->addJoin(TurnoPeer::FK_CICLOLECTIVO_ID, CiclolectivoPeer::ID);
+
$criteria->add(AnioPeer::FK_ESTABLECIMIENTO_ID, $establecimiento_id);
+ $criteria->add(TurnoPeer::FK_CICLOLECTIVO_ID, $this->getUser()->getAttribute('fk_ciclolectivo_id'));
+
+ $criteria->addAscendingOrderByColumn(AnioPeer::ORDEN);
$criteria->addAscendingOrderByColumn(DivisionPeer::ORDEN);
+
$divisiones = DivisionPeer::doSelectJoinAnio($criteria);
$optionsDivision[''] = "";
foreach ($divisiones as $division) {
@@ -917,4 +925,4 @@ public function executeAyuda() {
}
}
-?>
+?>

0 comments on commit 8692535

Please sign in to comment.