update: update: order of questions between multiple choice and fill-in on assessment result teacher
This commit is contained in:
parent
4ba05f9e1b
commit
d4ee39fc8c
|
|
@ -418,7 +418,13 @@
|
||||||
|
|
||||||
<!-- List Jawaban -->
|
<!-- List Jawaban -->
|
||||||
<ul class="list-group mt-4">
|
<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
|
@php
|
||||||
$answer = $question->answers->first();
|
$answer = $question->answers->first();
|
||||||
$isCorrect = false;
|
$isCorrect = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user