Choose Group for "{{$subject->name}}" Exam
@php
$objectives = $subject->questions()->whereIn('id',$questionIds)->where('status','public')->where('type','Objective')->get();
$subjectives = $subject->questions()->whereIn('id',$questionIds)->where('status','public')->where('type','Subjective')->get();
@endphp
@if(count($objectives)>0 || count($subjectives)>0)
@if(count($objectives)>0)
@php
$objectivesIds = $subject->questions()->whereIn('id',$questionIds)->where('status','public')->where('type','Objective')->select('id')->get();
$studentQuestions = \App\OnlineExam\StudentQuestion::where('student_id',$student->id)->whereIn('subject_question_id',$objectivesIds)->count();
if ($studentQuestions>0){
$pageNo = $studentQuestions+1;
$objectiveExamLink = url()->current().'/startObjective?page='.$pageNo;
}else{
$objectiveExamLink = url()->current().'/startObjective';
}
@endphp
@endif
@if(count($subjectives)>0)
@php
$subjectivesIds = $subject->questions()->whereIn('id',$questionIds)->where('status','public')->where('type','Subjective')->select('id')->get();
$studentQuestions = \App\OnlineExam\StudentQuestion::where('student_id',$student->id)->whereIn('subject_question_id',$objectivesIds)->count();
if ($studentQuestions>0){
$pageNo = $studentQuestions+1;
$objectiveExamLink = url()->current().'/startObjective?page='.$pageNo;
}else{
$objectiveExamLink = url()->current().'/startObjective';
}
@endphp
@endif