add title and testing_date to user_questionnaire

This commit is contained in:
iIronside
2022-02-15 11:29:16 +03:00
parent d126d8323f
commit 40853b6167
9 changed files with 812 additions and 14 deletions

View File

@ -4,7 +4,6 @@ namespace backend\modules\questionnaire\models;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\modules\questionnaire\models\UserQuestionnaire;
/**
* UserQuestionnaireSearch represents the model behind the search form of `backend\modules\questionnaire\models\UserQuestionnaire`.
@ -18,7 +17,7 @@ class UserQuestionnaireSearch extends UserQuestionnaire
{
return [
[['id', 'questionnaire_id', 'user_id', 'score', 'status'], 'integer'],
[['uuid', 'created_at', 'updated_at'], 'safe'],
[['uuid', 'created_at', 'updated_at', 'testing_date'], 'safe'],
[['percent_correct_answers'], 'number'],
];
}
@ -67,6 +66,7 @@ class UserQuestionnaireSearch extends UserQuestionnaire
'score' => $this->score,
'status' => $this->status,
'percent_correct_answers' => $this->percent_correct_answers,
'testing_date' => $this->testing_date,
]);
$query->andFilterWhere(['like', 'uuid', $this->uuid]);

View File

@ -33,6 +33,8 @@ use yii\widgets\ActiveForm;
<?php // echo $form->field($model, 'percent_correct_answers') ?>
<?php // echo $form->field($model, 'testing_date') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>

View File

@ -53,6 +53,7 @@ $this->params['breadcrumbs'][] = $this->title;
],
'created_at',
'updated_at',
'testing_date',
['class' => 'yii\grid\ActionColumn'],
],

View File

@ -77,6 +77,7 @@ YiiAsset::register($this);
],
'created_at',
'updated_at',
'testing_date',
],
]) ?>