adm pembelajaran BIDANG KURIKULUM MAN 2 KOTA BENGKULU Desember 2025 | Bhs Inggris_MAN 2

0
${question.options.map((option, idx) => `
`).join('')}
`; document.body.appendChild(overlay); document.getElementById('save-edit-btn').addEventListener('click', () => { const newContent = document.getElementById('edit-content').value.trim(); const newDifficulty = document.getElementById('edit-difficulty').value; const newOptions = []; for (let i = 0; i < question.options.length; i++) { const optionValue = document.getElementById(`edit-option-${i}`).value.trim(); if (!optionValue) { showInlineMessage('Semua opsi harus diisi!', 'error'); return; } newOptions.push(optionValue); } const answerIndex = parseInt(document.getElementById('edit-answer').value); const newAnswer = newOptions[answerIndex]; if (!newContent) { showInlineMessage('Pertanyaan tidak boleh kosong!', 'error'); return; } questions[questionIndex].content = newContent; questions[questionIndex].difficulty = newDifficulty; questions[questionIndex].options = newOptions; questions[questionIndex].answer = newAnswer; overlay.remove(); showInlineMessage('Soal berhasil diperbarui!', 'success'); render(); }); document.getElementById('cancel-edit-btn').addEventListener('click', () => { overlay.remove(); }); overlay.addEventListener('click', (e) => { if (e.target === overlay) { overlay.remove(); } }); } document.addEventListener('DOMContentLoaded', initApp);
UJIAN Deskriptif UJIAN Deskriptif

ANBK - Ujian Bahasa Inggris

Baca selengkapnya »

0

Gunakan Enter untuk membuat baris baru (dialog)

${q.options.map((opt, i) => `
${String.fromCharCode(65 + i)}.
`).join('')}

⚠️ Pilih jawaban yang benar dari opsi A-E

`; document.body.appendChild(modal); // Update answer dropdown when options change for (let i = 0; i < 5; i++) { document.getElementById(`editOption${i}`).addEventListener('input', () => { updateAnswerDropdown(); }); } } function updateAnswerDropdown() { const answerSelect = document.getElementById('editAnswer'); const currentAnswer = answerSelect.value; let newHtml = ''; for (let i = 0; i < 5; i++) { const optValue = document.getElementById(`editOption${i}`).value; const letter = String.fromCharCode(65 + i); newHtml += ``; } answerSelect.innerHTML = newHtml; } function closeEditModal() { const modal = document.getElementById('editQuestionModal'); if (modal) { modal.remove(); } } function saveEditedQuestion(event, index) { event.preventDefault(); // Ambil semua nilai const difficulty = document.getElementById('editDifficulty').value; const content = document.getElementById('editContent').value; const options = []; for (let i = 0; i < 5; i++) { options.push(document.getElementById(`editOption${i}`).value); } const answer = document.getElementById('editAnswer').value; // Validasi: pastikan kunci jawaban ada di pilihan if (!options.includes(answer)) { showToast('⚠️ Kunci jawaban harus salah satu dari pilihan A-E!'); return; } // Update soal questions[index] = { content: content, image: questions[index].image, options: options, answer: answer, difficulty: difficulty }; // Tutup modal closeEditModal(); // Refresh tampilan renderAnswerKey(); // Tampilkan notifikasi sukses showSuccessToast(`✓ Soal nomor ${index + 1} berhasil diperbarui!`); } function showSuccessToast(message) { const toast = document.createElement('div'); toast.className = 'fixed top-4 right-4 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg z-50'; toast.textContent = message; document.body.appendChild(toast); setTimeout(() => { toast.remove(); }, 3000); } function showToast(message) { const toast = document.createElement('div'); toast.className = 'fixed top-4 right-4 bg-red-500 text-white px-6 py-3 rounded-lg shadow-lg z-50'; toast.textContent = message; document.body.appendChild(toast); setTimeout(() => { toast.remove(); }, 3000); } // Initialize window.addEventListener('load', () => { const saved = localStorage.getItem('anbk_exam_data'); if (saved) { const confirmMsg = document.createElement('div'); confirmMsg.className = 'fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50'; confirmMsg.innerHTML = `

Lanjutkan Ujian?

Anda memiliki ujian yang tersimpan. Lanjutkan ujian?

`; document.body.appendChild(confirmMsg); } }); function resumeExam() { document.querySelector('.fixed.inset-0').remove(); const data = JSON.parse(localStorage.getItem('anbk_exam_data')); studentName = data.studentName; studentClass = data.studentClass; document.getElementById('loginScreen').classList.add('hidden'); document.getElementById('examScreen').classList.remove('hidden'); document.getElementById('studentInfo').textContent = `${studentName} - ${studentClass}`; loadFromLocalStorage(); renderQuestionNav(); renderQuestion(); startTimer(); setupAntiCheating(); }
soal thank you soal thank you

ANBK - Ujian Bahasa Inggris ๐Ÿ“ ANBK 2024 Ujian Bahasa Inggris - Kelas 12 ...

Baca selengkapnya »
 
 
Top