@extends('layouts.new-app') @section('content')
{!! Form::evaluationAudioBlock($chapter) !!}
@include('faculty')
{{ ucwords($chapter_name) }}
{!! Form::open(['route'=>'save.exam', 'method'=>'POST', 'id'=>'formExam']) !!} {!! Form::hidden('chapter_id', $chapter, []) !!}
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
@endforeach
@if(isset($noexam)) @endif *Note: Need to score 100% before proceeding to next chapter, Retake evaluation if needed
{!! Form::close() !!}
@if($chapter != 10) @if($active == 1) GO TO CHAPTER {{ $chapter+1 }} @else GO TO CHAPTER {{ $chapter+1 }} @endif @else @if($active == 1) TAKE FINAL EVALUATION @else TAKE FINAL EVALUATION @endif @endif
{{ Form::hidden('operator', 1, ['id'=>'operator']) }} {{ Form::hidden('chapter', $chapter, ['id'=>'chapter']) }} {{ Form::hidden('slide', 'test', ['id'=>'slide']) }} @endsection