update: update: order of questions between multiple choice and fill-in on assessment result teacher
This commit is contained in:
parent
792af42743
commit
b7b1981ec5
|
|
@ -418,7 +418,13 @@
|
|||
|
||||
<!-- List Jawaban -->
|
||||
<ul class="list-group mt-4">
|
||||
@foreach ($questions as $index => $question)
|
||||
@php
|
||||
$questionTypeOrder = ['multiple_choice' => 1, 'ordering' => 2, 'essay' => 3];
|
||||
$sortedQuestions = collect($questions)->sortBy(function ($q) use ($questionTypeOrder) {
|
||||
return $questionTypeOrder[$q->type] ?? 999;
|
||||
})->values();
|
||||
@endphp
|
||||
@foreach ($sortedQuestions as $index => $question)
|
||||
@php
|
||||
$answer = $question->answers->first();
|
||||
$isCorrect = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user