test

parent 37bf567d
...@@ -120,10 +120,6 @@ class TestController extends \common\components\BaseController ...@@ -120,10 +120,6 @@ class TestController extends \common\components\BaseController
// Чистим старые вопросы // Чистим старые вопросы
QuestionPassing::deleteAll(['passing_id' => $passing->id]); QuestionPassing::deleteAll(['passing_id' => $passing->id]);
print_r($questions);
echo '<hr>';
$s = true; $s = true;
for ($i = 1; $i <= $test->questions; $i++) for ($i = 1; $i <= $test->questions; $i++)
{ {
...@@ -139,6 +135,7 @@ class TestController extends \common\components\BaseController ...@@ -139,6 +135,7 @@ class TestController extends \common\components\BaseController
$s = false; $s = false;
} }
echo $questions[$i]->id . '<br>';
print_r(\yii\widgets\ActiveForm::validate($pq)); print_r(\yii\widgets\ActiveForm::validate($pq));
...@@ -150,6 +147,10 @@ class TestController extends \common\components\BaseController ...@@ -150,6 +147,10 @@ class TestController extends \common\components\BaseController
{ {
$transaction->commit(); $transaction->commit();
} }
else
{
throw new NotFoundHttpException('The requested page does not exist.');
}
if ($passing->end_date === null && $passing->status === Passing::STARTED) if ($passing->end_date === null && $passing->status === Passing::STARTED)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment