mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 20:01:07 +03:30
change TestResultController
This commit is contained in:
@@ -125,7 +125,7 @@ class TestResultController extends Controller
|
||||
if(is_array($Value) && in_array($Option->id,$Value)){
|
||||
$InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id, 'input_id' => $InputChild->id, 'option_id' => $Option->id]);
|
||||
}
|
||||
if ($Input['type'] == 'Radiobutton' && $Option->id == $Value) {
|
||||
if ($InputChild['type'] == 'Radiobutton' && $Option->id == $Value) {
|
||||
$InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id, 'input_id' => $InputChild->id, 'option_id' => $Option->id]);
|
||||
}
|
||||
}
|
||||
@@ -242,6 +242,7 @@ class TestResultController extends Controller
|
||||
$TestResult[$input->name.'_'.$input->id] = $value->value;
|
||||
}
|
||||
}
|
||||
|
||||
$ImagesPath = [];
|
||||
if (count($TestResult->TitleImage)) {
|
||||
foreach ($TestResult->TitleImage as $Key => $TitleImage) {
|
||||
@@ -308,7 +309,7 @@ class TestResultController extends Controller
|
||||
if(is_array($Value) && in_array($Option->id,$Value)){
|
||||
$InputValueObj = InputValue::create(['test_result_id' => $TestResult->id, 'input_id' => $InputChild->id, 'option_id' => $Option->id]);
|
||||
}
|
||||
if ($Input['type'] == 'Radiobutton' && $Option->id == $Value) {
|
||||
if ($InputChild['type'] == 'Radiobutton' && $Option->id == $Value) {
|
||||
$InputValueObj = InputValue::create(['test_result_id' => $TestResult->id, 'input_id' => $InputChild->id, 'option_id' => $Option->id]);
|
||||
}
|
||||
}
|
||||
@@ -321,7 +322,7 @@ class TestResultController extends Controller
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////Images
|
||||
$images = '';
|
||||
if (count($TestResult->TitleImage))
|
||||
if (count($TestResult->TitleImage) && $request->imgs != null)
|
||||
{
|
||||
$images = $TestResult->TitleImage;
|
||||
foreach ($images as $key => $image) {
|
||||
|
||||
Reference in New Issue
Block a user