Commit 956f6282 authored by Шакарим Сапа's avatar Шакарим Сапа

Merge remote-tracking branch 'origin/master'

parents 426dadeb 79b7450c
...@@ -120,12 +120,8 @@ class TestController extends \common\components\BaseController ...@@ -120,12 +120,8 @@ 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 = 0; $i <= $test->questions - 1; $i++)
{ {
$pq = new QuestionPassing; $pq = new QuestionPassing;
...@@ -138,18 +134,16 @@ class TestController extends \common\components\BaseController ...@@ -138,18 +134,16 @@ class TestController extends \common\components\BaseController
{ {
$s = false; $s = false;
} }
print_r(\yii\widgets\ActiveForm::validate($pq));
} }
die();
if($s) if($s)
{ {
$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