Tes Minat & Potensi Aktivitas: Tes Minat Anak — Aktivitas Apa yang Paling Menarik Bagimu?
- Updated: Agustus 28, 2026
![]()
Soal '+(currentIdx+1)+' dari '+questions.length+':
'+q.q+'
';
q.options.forEach((opt, idx) => {
const sel = userAnswers[currentIdx] === idx ? 'selected' : '';
html += '';
});
html += ''+q.q+'
';
if(currentIdx > 0) html += '';
if(currentIdx < questions.length - 1) html += '';
else html += '';
html += '
';
document.getElementById('quizBody').innerHTML = html;
}
function selectOpt(idx) { userAnswers[currentIdx] = idx; renderQ(); }
function nextQ() { if(currentIdx < questions.length - 1) { currentIdx++; renderQ(); } }
function prevQ() { if(currentIdx > 0) { currentIdx--; renderQ(); } }
function submitQuiz() {
clearInterval(timerInterval);
let correct = 0;
questions.forEach((q, idx) => { if(userAnswers[idx] === q.ans) correct++; });
let score = Math.round((correct / questions.length) * 100);
let passed = score >= passingScore;
let reviewHtml = '';
questions.forEach((q, idx) => {
const isCorrect = userAnswers[idx] === q.ans;
reviewHtml += `
Soal #${idx+1}: ${isCorrect?'Jawaban Benar':'Jawaban Salah'}
${q.q}
Jawaban Anda: ${q.options[userAnswers[idx]] || 'Tidak Dijawab'} | Kunci: ${q.options[q.ans]}
${q.exp ? `Pembahasan: ${q.exp}
Hasil Akhir Ujian
${score}
${passed?'LULUS (MEMENUHI SYARAT)':'TIDAK LULUS'}
Total Benar: ${correct} dari ${questions.length} Soal (Passing Grade: ${passingScore}%)



