public function actionIndex()
 {
     $count = LimeSurveyLocal::model()->count();
     $step = 0;
     while ($step * self::STEP_SIZE < $count) {
         $criteria = new CDbCriteria();
         $criteria->limit = self::STEP_SIZE;
         $criteria->offset = self::STEP_SIZE * $step;
         $this->processSurveys(LimeSurveyLocal::model()->findAll($criteria));
         $step++;
     }
     $count = LimeSurveyRemote::model()->count();
     $step = 0;
     while ($step * self::STEP_SIZE < $count) {
         $criteria = new CDbCriteria();
         $criteria->limit = self::STEP_SIZE;
         $criteria->offset = self::STEP_SIZE * $step;
         $this->processSurveys(LimeSurveyRemote::model()->findAll($criteria));
         $step++;
     }
 }
예제 #2
0
 /**
  * Retrieves a list of models based on the current search/filter conditions.
  *
  * Typical usecase:
  * - Initialize the model fields with values from filter form.
  * - Execute this method to get CActiveDataProvider instance which will filter
  * models according to data in model fields.
  * - Pass data provider to CGridView, CListView or any similar widget.
  *
  * @return CActiveDataProvider the data provider that can return the models
  * based on the search/filter conditions.
  */
 public function search()
 {
     // @todo Please modify the following code to remove attributes that should not be searched.
     $criteria = new CDbCriteria();
     $criteria->join = "INNER JOIN " . LimeSurveyLanguagesettingLocal::model()->tableName() . " t2 ON t2.surveyls_survey_id = t.sid";
     return new MultiLocatedSurveysDataProvider(array(LimeSurveyLocal::model(), LimeSurveyRemote::model()), array('criteria' => $criteria, 'pagination' => array('pageSize' => 20)));
 }
예제 #3
0
    echo LimeSurveyLocal::model()->getAttributeLabel(LimeSurvey::LOCATION_LOCAL);
    ?>
                    </option>
                    <option data-href="<?php 
    echo $this->createUrl("/user/view", array('id' => $model->id, 'type' => LimeSurvey::LOCATION_REMOTE));
    ?>
"
                            value="<?php 
    echo LimeSurvey::LOCATION_REMOTE;
    ?>
" <?php 
    echo $curType == LimeSurvey::LOCATION_REMOTE ? 'selected="selected"' : "";
    ?>
>
                        <?php 
    echo LimeSurveyRemote::model()->getAttributeLabel(LimeSurvey::LOCATION_REMOTE);
    ?>
                    </option>
                </select>

            </td>
            <td>
                <?php 
    $addUrl = $this->createUrl('/user/addSurvey', array('id' => $model->id));
    ?>
                <a class="addSurvey" data-title="Добавить" title="" data-toggle="tooltip" href="<?php 
    echo $addUrl;
    ?>
"
                   data-original-title="Добавить">
                    <span class="glyphicon glyphicon-plus"></span>