Question | Correct Answer | {{$user->name}} Answer | Answer Explnation |
---|---|---|---|
{{ $a->question->question }} | {{ $a->answer }} | {{ $a->user_answer }} | {{ $a->question->answer_exp }} |
Total Questions | {{$user->name}}'s Marks | Per Question Mark | Total Marks |
---|---|---|---|
{{$count_questions}} | @php $mark = 0; $correct = collect(); @endphp @foreach ($answers as $answer) @if ($answer->answer == $answer->user_answer) @php $mark++; @endphp @endif @endforeach @php $correct = $mark*$topic->per_q_mark; @endphp {{$correct}} | {{$topic->per_q_mark}} | {{$topic->per_q_mark*$count_questions}} |