 }})
{!! Form::open(['route'=>'save.exam', 'method'=>'POST', 'id'=>'formExam']) !!}
{!! Form::hidden('chapter_id', $chapter, []) !!}
@endforeach
{!! Form::close() !!}
Chapter {{$chapter}} - Evaluation Score: @if(!is_null($exam)) {{ $exam->correct }}/{{ $exam->questions }} @if($exam->correct == $exam->questions) Success @php $active = 1; @endphp @else Retake @php $active = 0; @endphp @endif @else 0/{{ count($questions) }} @php $active = 0; $noexam = 1; @endphp @endif {!! Form::hidden('noexam', isset($noexam)?$noexam:0, ['id'=>'noexam']) !!} @php function checking($exdetails, $qid, $qc, $opt) { if($exdetails != []) { if(isset($exdetails[$qid]) && $qc == $opt && $exdetails[$qid] == $qc) { return 'checked disabled'; } elseif(isset($exdetails[$qid]) && $exdetails[$qid] == $opt) { return 'checked disabled'; } else { return 'disabled'; } } else { return 'disabled'; } } function checkingClass($exdetails, $qid, $qc, $opt) { if($exdetails != []) { if(isset($exdetails[$qid]) && $qc == $opt && $exdetails[$qid] == $qc) { return 'green-text'; } elseif(isset($exdetails[$qid]) && $exdetails[$qid] == $opt) { return 'red-text'; } else { return ''; } } else { return ''; } } @endphp
@foreach ($questions as $key=>$question){{ $key+1 }}. {{ $question->question }}
@foreach ($question->options as $ansr => $item)
{{
$item->option }}
@endforeach
@if(isset($noexam))
@endif
*Note: Need to score 100% before proceeding to next chapter, Retake evaluation if needed