Skip to content

Commit

Permalink
Fixed issue #10823: Can't read the timing data
Browse files Browse the repository at this point in the history
Dev: Striped table
  • Loading branch information
olleharstedt committed Apr 4, 2016
1 parent ae5438b commit 147bbdd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions application/controllers/admin/responses.php
Expand Up @@ -1429,9 +1429,17 @@ public function time($iSurveyID)
}
*/

// Set number of page
if (isset($_GET['pageSize']))
{
Yii::app()->user->setState('pageSize',(int)$_GET['pageSize']);
}


//interview Time statistics
$aData['model'] = SurveyTimingDynamic::model($iSurveyID);

$aData['pageSize'] = 10;
$aData['statistics'] = SurveyTimingDynamic::model($iSurveyID)->statistics();
$aData['num_total_answers'] = SurveyDynamic::model($iSurveyID)->count();
$aData['num_completed_answers'] = SurveyDynamic::model($iSurveyID)->count('submitdate IS NOT NULL');
Expand Down
8 changes: 6 additions & 2 deletions application/views/admin/responses/browsetimerow_view.php
Expand Up @@ -35,16 +35,20 @@
'dataProvider' => $model->search($iSurveyID, $language),

// Number of row per page selection
'id' => 'survey-grid',
'id' => 'time-grid',
'emptyText'=>gT('No surveys found.'),
'itemsCssClass' => 'table-striped',

'summaryText'=>gT('Displaying {start}-{end} of {count} result(s).').' '. sprintf(gT('%s rows per page'),
CHtml::dropDownList(
'pageSize',
10,
$pageSize,
Yii::app()->params['pageSizeOptions'],
array('class'=>'changePageSize form-control', 'style'=>'display: inline; width: auto'))),

'ajaxUpdate' => true,
'afterAjaxUpdate' => 'doToolTip',

'columns' => array_merge($columns,
array(array(
'header' => '',
Expand Down

0 comments on commit 147bbdd

Please sign in to comment.