$preguntaEspesifica = new PreguntaEspecifica();
$preguntasEspesificas = $preguntaEspesifica->findAll();
$count = 0;
foreach ($preguntasEspesificas as $value) {
    ?>
 
                                            <tr id="tr<?php 
    echo $count;
    ?>
">
                                                <td id="gp<?php 
    echo $count;
    ?>
">
                                                    <?php 
    $grupo = new GrupoPreguntas();
    $grupos = $grupo->findByAttributes(array('id_grupo_preguntas' => $value->idPreguntaMadre->id_grupo_preguntas));
    echo $grupos->nombre;
    ?>
      
                                                </td>

                                                <td id="pe<?php 
    echo $count;
    ?>
">
                                                    <?php 
    echo $value->id_pregunta_especifica;
    ?>
                
                                                </td>
 /**
  * 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 GrupoPreguntas the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = GrupoPreguntas::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #3
0
                    <h3 class="no-margin"><i class="fa fa-list-alt"></i> Listado de Grupo de Preguntas</h3>
                </div>
                <div class="modal-body padding-20" style="overflow-x: hidden; overflow-y: auto">
                    <form >
                        <table id="tablaDetallesProcesos" class="table table-bordered table-striped" style="width:100%;">
                            <thead class="text-center">
                                <tr>

                                    <th>Grupo de Preguntas</th>                                                                     
                                    <th>Cuestionario</th> 
                                    <th>DescripciĆ³n</th>   
                                </tr>
                            </thead>
                            <tbody class="text-center">
                                <?php 
$grupPreg = new GrupoPreguntas();
$gruposPreguntas = $grupPreg->findAll();
foreach ($gruposPreguntas as $value) {
    ?>
 
                                    <tr>

                                        <td>
                                            <?php 
    echo $value->nombre;
    ?>
                
                                        </td>
                                        <td>
                                            <?php 
    echo $value->idCuestionario->nombre;