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;
 }
示例#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;
 }
示例#3
0
                                    </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 actionCursos()
 {
     $CursoPrueba = new Curso();
     $Curso = new Curso('BusquedaCursosActivos');
     $CarrerasPorCurso = new CarrerasPorCurso('BusquedaCarrerasPorCurso');
     $Curso->unsetAttributes();
     $CarrerasPorCurso->unsetAttributes();
     if (isset($_GET['Curso'])) {
         $Curso->attributes = $_GET['Curso'];
     }
     if (isset($_GET['CarrerasPorCurso'])) {
         $CarrerasPorCurso->attributes = $_GET['CarrerasPorCurso'];
     }
     $this->render('Cursos', array('Curso' => $Curso, 'CarrerasPorCurso' => $CarrerasPorCurso, 'CursoPrueba' => $CursoPrueba));
 }
 /**
  * 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;
 }