title = 'Анкеты пользователей'; $this->params['breadcrumbs'][] = $this->title; ?>

'btn btn-success']) ?>

$dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], [ 'attribute' => 'questionnaire_id', 'filter' => \yii\helpers\ArrayHelper::map(backend\modules\questionnaire\models\Questionnaire::find()->all(), 'id', 'title'), 'value' => function($model){ return $model->getQuestionnaireTitle(); } ], [ 'attribute' => 'user_id', 'filter' => \yii\helpers\ArrayHelper::map(\common\models\User::find()->all(), 'id', 'username'), 'value' => function($model){ return $model->getUserName(); } ], 'score', [ 'attribute' => 'percent_correct_answers', 'value' => function($model) { $percent = $model->percent_correct_answers * 100; return $percent . '%'; } ], [ 'attribute' => 'status', 'format' => 'raw', 'filter' => \common\helpers\StatusHelper::statusList(), 'value' => function ($model) { return \common\helpers\StatusHelper::statusLabel($model->status); }, ], 'created_at', 'updated_at', ['class' => 'yii\grid\ActionColumn'], ], ]); ?>