public function CarrerasPorCursoToString($id)
 {
     $carreras = CarrerasPorCurso::model()->findAll("Curso_IdCurso=?", array($id));
     $stringCarreras = " ";
     foreach ($carreras as $carrerita) {
         $stringCarreras .= "#" . preg_replace('/\\s+/', '', $carrerita->carrera->NombreCarrera) . " ";
     }
     return $stringCarreras;
 }
Beispiel #2
0
 public function getAsesoresPorCarrera($idCurso)
 {
     $Curso = CarrerasPorCurso::model()->findAll("Curso_IdCurso=?", array($idCurso));
     $arregloCarrerasPorCurso = null;
     $contador2 = 0;
     foreach ($Curso as $cursito) {
         $arregloCarrerasPorCurso[$contador2] = $cursito->Carrera_IdCarrera;
         $contador2++;
     }
     return $arregloCarrerasPorCurso;
 }
                                    </div>
                                </div>
                                <div class="statistics">
                                <h3 class="heading-xs">Periodo Académico: <?php 
    echo $Curso->periodoAcademico->PeriodoConcatenado;
    ?>
 <span class="pull-right"><?php 
    echo CHtml::link('Mis Alumnos', array('UsuarioUnitec/MisAlumnos', 'Seccion' => $Curso->IdCurso), array('style' => "color: #FFFFFF "));
    ?>
</span></h3>
                                    <div class="progress progress-u progress-xxs">
                                        <div style="width: 50%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="67" role="progressbar" class="progress-bar progress-bar-light">
                                        </div>
                                    </div>
                                    <small><?php 
    echo CarrerasPorCurso::model()->CarrerasPorCursoToString($Curso->IdCurso);
    ?>
</small>
                                </div>            
                            </div>

<?php 
    if ($bandera % 2 == 1) {
        ?>
       </div> <!--/end row-->   

       </div><!--/end row-->



<?php 
 public function actionActualizarCarreraPorCurso()
 {
     date_default_timezone_set('America/Tegucigalpa');
     $Curso = CarrerasPorCurso::model()->findByPk($_POST['pk']);
     $Curso->Carrera_IdCarrera = $_POST['value'];
     $Curso->Save();
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return CarrerasPorCurso the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = CarrerasPorCurso::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }