@include('student.test.layouts.common.nav')

{{$test->title}}

  • Time Left For This Section :
  • 00 : 00 : 00
  • @if ($canUsePause)
  • Pause & Exit
  • @endif

@include('student.test.layouts.common.information_right')
{!! Form::open(array( 'id'=> 'test-form', 'autocomplete'=> 'nope', 'spellcheck'=> 'false' )) !!}
@php $questionHasVideo = FALSE; $total_para_ques = 0; $numberQuestion = 0; @endphp @foreach($section_data as $key=> $value) @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 if(!$questionHasVideo){ if($question->question_type=='video'){ $questionHasVideo = TRUE; } } $display_question = 'display:none;'; $previous_answers = []; $time_spent = 0; if($current_question_id){ if($current_question_id == $question->id) { $display_question = 'display:block;'; }else{ $display_question = 'display:none;'; } } if($current_state){ if(array_key_exists($question->id, $current_state)){ $previous_answers = $current_state[$question->id]->answers; $time_spent = $current_state[$question->id]->time_spent; } } @endphp @endif @endforeach @endif @endforeach
{!! Form::close() !!}

@include('student.test.layouts.common.footer')
@push('script') @php $questionAnswered = json_encode([]); $questionNotAnswers = json_encode([]); $questionMark = json_encode([]); $questionReview = json_encode([]); $current_section = 0; $out_of_test = 0; $is_pause = 0; if (is_null($last_answer->current_question_id)) { $current_hours = $section_timings[0]['hrs'] ?? 0; $current_minutes = $section_timings[0]['minutes'] ?? 0; $current_seconds = 0; $current_section_key = $sections[0] ?? null; }else{ $current_hours = is_null($last_answer->current_hour) ? (int)$section_timings[0]['hrs'] : $last_answer->current_hour; $current_minutes = is_null($last_answer->current_minute) ? (int)$section_timings[0]['minutes'] : $last_answer->current_minute; $current_seconds = is_null($last_answer->current_second) ? 0 : $last_answer->current_second; if (isset($last_answer->current_section)) { $current_section = isset($sections[$last_answer->current_section]) ? $last_answer->current_section : 0; } if (empty($last_answer->current_section_key)){ $current_section_key = $sections[0] ?? null; }else{ $current_section_key = $last_answer->current_section_key; } $questionAnswered = json_decode($last_answer->question_answered, true); $questionAnswered = json_encode(is_array($questionAnswered) ? $questionAnswered : []); $questionNotAnswers = json_decode($last_answer->question_not_answers, true); $questionNotAnswers = json_encode(is_array($questionNotAnswers) ? $questionNotAnswers : []); $questionMark = json_decode($last_answer->question_marks, true); $questionMark = json_encode(is_array($questionMark) ? $questionMark : []); $questionReview = json_decode($last_answer->question_review ?? null, true); $questionReview = json_encode(is_array($questionReview) ? $questionReview : []); $out_of_test = $last_answer->out_of_test ?? 0; if(!is_null($test) && !is_null($test->test_quiz_questions) && $test->type != 1) $is_pause = $test->test_quiz_questions->is_pause; } @endphp @endpush