@if ($test->exam_type == 'NSNT')
Question
@for($i=0; $i
{{$i+1}}
@if($questions[$i]->question_type == 'para')
@if ($para_count > 1)
@for($m=1; $m<=$para_count; $m++)
@endfor
@endif
@endif
@endfor
@elseif($test->exam_type)
@php
$i=0;
/* $section_data = json_decode($test->section_data, true);
$section_data = is_array($section_data) ? $section_data : []; */
@endphp
@foreach($section_data as $key => $value)
{{$value['section_name'] ?? $key}}
@if (isset($value['questions']) && count($value['questions']) > 0)
@foreach($value['questions'] as $key_id => $question)
@php
$collection = collect($data['questions'] ?? []);
$filtered = $collection->where('id', $question);
$question = $filtered->first();
@endphp
@if (!is_null($question))
@php
$default_class = 'outline-blue';
if(isset($answers) && $answers) {
if(array_key_exists($question->id, $answers)){
$default_class = 'green';
}
}
$para_count = 0;
if($question->question_type == 'para'){
$ques = json_decode($question->answers);
$para_count = is_array($ques) ? count($ques) : 0;
}
@endphp
@if($question->question_type == 'para')
@if ($para_count > 1)
@for($m=1; $m<=$para_count; $m++)
@endfor
@endif
@endif
@php
$i++;
@endphp
@endif
@endforeach
@endif
@endforeach
@endif