@php function kodeInstitusi($author, $id) { // Ambil 3 huruf konsonan pertama dari nama penulis $consonants = preg_replace('/[aeiouAEIOU\s]/', '', $author); $kode = strtoupper(substr($consonants, 0, 3)); return $kode ?: 'XXX'; } @endphp @php $logoPath = $globalSettings['logo_path'] ?? null; $siteName = $globalSettings['site_name'] ?? config('app.name', 'PSPA-UEU'); @endphp @foreach($questions as $q)
|
{{ $siteName }}
{{ $q->institution }}
|
| KODE SOAL | {{ $q->question_code }}_{{ kodeInstitusi($q->author_name, $q->id) }}_{{ str_pad($q->id, 2, '0', STR_PAD_LEFT) }} |
| Tinjauan-1 | {{ $q->review_1 }} |
| Tinjauan-2 | {{ $q->review_2 }} |
| Tinjauan-3 | {{ $q->review_3 }} |
| Tinjauan-4 | {{ $q->review_4 }} |
| Tinjauan-5 | {{ $q->review_5 }} |
| Tinjauan-6 | {{ $q->review_6 }} |
| Vignette | {!! $q->vignette !!} |
| Pertanyaan | {!! $q->question !!} |
| Pilihan Jawaban |
A. {!! $q->option_a !!} B. {!! $q->option_b !!} C. {!! $q->option_c !!} D. {!! $q->option_d !!} E. {!! $q->option_e !!} |
| Kunci Jawaban | {{ $q->correct_answer }} |
| Penulis Soal | {{ $q->author_name }} |
| Bagian/Departemen | {{ $q->department }} |
| Asal institusi | {{ $q->institution }} |
| Referensi literatur | {!! nl2br(e(is_array($q->references) ? str_replace(['[',']','"'], '', json_encode($q->references, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT)) : (str_replace(['[',']','"'], '', $q->references ?? '')))) !!} |
| Kata kunci | {{ $q->keywords }} |
| Perhitungan kunci & distraktor | {!! nl2br(e(is_array($q->calculation_explanation) ? json_encode($q->calculation_explanation, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT) : ($q->calculation_explanation ?? ''))) !!} |