move ScoreCalculator fom helpers to services
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use common\helpers\ScoreCalculatorHelper;
|
||||
use common\services\ScoreCalculatorService;
|
||||
use common\helpers\AnswerHelper;
|
||||
use common\helpers\StatusHelper;
|
||||
use yii\bootstrap\Modal;
|
||||
@ -23,20 +23,8 @@ $this->params['breadcrumbs'][] = ['label' => 'User Questionnaires', 'url' => ['i
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
YiiAsset::register($this);
|
||||
?>
|
||||
|
||||
<?php
|
||||
//$this->registerJs(
|
||||
// '$("document").ready(function(){
|
||||
// $("#new_note").on("pjax:end", function() {
|
||||
// $.pjax.reload({container:"#user_responses"}); //Reload GridView
|
||||
// });
|
||||
// });'
|
||||
//);
|
||||
?>
|
||||
<div class="user-questionnaire-view">
|
||||
|
||||
<!-- --><?php //var_dump($model->setPercentCorrectAnswers(4)); die();?>
|
||||
|
||||
<p>
|
||||
<?= Html::a('Список', ['index'], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
@ -98,7 +86,7 @@ YiiAsset::register($this);
|
||||
'class' => 'btn btn-success',
|
||||
],
|
||||
]);
|
||||
if(ScoreCalculatorHelper::checkAnswerFlagsForNull($model))
|
||||
if(ScoreCalculatorService::checkAnswerFlagsForNull($model))
|
||||
{
|
||||
echo 'Ответы проверены. Посчитать баллы?';
|
||||
echo Html::a('Посчитать баллы', ['calculate-score', 'id' => $model->id], [
|
||||
@ -169,5 +157,4 @@ YiiAsset::register($this);
|
||||
]);
|
||||
?>
|
||||
<?php Pjax::end(); ?>
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user