Advanced Certification Exam
Test your knowledge with this comprehensive assessment.
Total Questions
-
Duration
150 min
Passing Score
50%
Detailed Review
Yes
Important Instructions
- You have exactly 2 hours 30 minutes to complete the exam
- Total - questions to attempt
- After submission, detailed explanations for all questions will be shown
- The exam will auto-submit when time expires
- Ensure stable internet before starting for best results
Question 1 of -
Review all your answers before submitting.
Exam Submitted Successfully!
Your exam has been evaluated. Review your answers and learn from detailed explanations below.
0%
Your Score
Correct Answers
0
Total Questions
-
Time Taken
0:00
Status
-
Exam Name:
-
Student Name:
-
District:
-
Submission Date:
-
Required to Pass:
-
Google Form Status:
Submitting...
Detailed Question Review & Explanations
⏰ TIME OVER! Exam auto-submitted.`; }, 500); } // ==================== QUIZ ENGINE ==================== function startExam() { const btn = document.getElementById('startExamBtn'); if (btn && btn.disabled) return; const nameInput = document.getElementById('studentName'); const rollInput = document.getElementById('rollNumber'); const nameError = document.getElementById('nameError'); const rollError = document.getElementById('rollError'); nameInput.classList.remove('error'); nameError.classList.remove('show'); rollInput.classList.remove('error'); rollError.classList.remove('show'); let valid = true; const nameVal = nameInput.value.trim(); const rollVal = rollInput.value.trim(); if (!nameVal) { nameInput.classList.add('error'); nameError.classList.add('show'); nameInput.focus(); valid = false; } if (!rollVal) { rollInput.classList.add('error'); rollError.classList.add('show'); if (valid) rollInput.focus(); valid = false; } if (!valid) return; state.studentName = nameVal; state.rollNumber = rollVal; state.examStarted = true; if (btn) { btn.disabled = true; btn.innerHTML = ` Starting... `; } showLoading('Preparing your exam...'); setTimeout(() => { hideLoading(); const startScreen = document.getElementById('startScreen'); const quizContainer = document.getElementById('quizContainer'); const examBar = document.getElementById('examBar'); if (startScreen) startScreen.style.display = 'none'; if (quizContainer) quizContainer.classList.add('active'); if (examBar) examBar.classList.add('active'); document.body.classList.add('exam-active'); startTimer(); setupAutoSave(); renderQuestion(); }, 800); } function setupAutoSave() { state.autoSaveInterval = setInterval(() => { if (!state.examSubmitted) saveAnswers(); }, 30000); } function renderQuestion() { if (!QUESTIONS[state.currentQuestionIndex]) return; const question = QUESTIONS[state.currentQuestionIndex]; safeSetText('currentQuestion', state.currentQuestionIndex + 1); safeSetText('questionText', question.question); const container = document.getElementById('optionsContainer'); if (!container) return; // ===================================================== // FIX: Update options IN-PLACE without rebuilding DOM // This prevents scroll-to-top glitch on selection // ===================================================== const existingOptions = container.querySelectorAll('.option'); const needsRebuild = existingOptions.length !== question.options.length; if (needsRebuild) { // First render or question changed — build fresh container.innerHTML = ''; question.options.forEach((option, index) => { const div = document.createElement('div'); div.className = 'option'; div.dataset.index = index; div.innerHTML = ` `; if (!state.examSubmitted && !state.locked) { div.addEventListener('click', (e) => { e.preventDefault(); selectOption(index); }); div.addEventListener('touchend', (e) => { e.preventDefault(); e.stopPropagation(); selectOption(index); }, { passive: false }); } container.appendChild(div); }); } // Always update classes only (no DOM rebuild = no scroll glitch) const savedAnswer = state.answers[state.currentQuestionIndex]; container.querySelectorAll('.option').forEach((div, index) => { // Reset classes div.className = 'option'; if (savedAnswer === index) div.classList.add('selected'); if (state.examSubmitted || state.locked) div.classList.add('disabled'); }); updateNavigation(); updateProgressBar(); } // Track last rendered question to know when to rebuild let _lastRenderedQuestionIndex = -1; function renderQuestion() { if (!QUESTIONS[state.currentQuestionIndex]) return; const question = QUESTIONS[state.currentQuestionIndex]; const questionChanged = _lastRenderedQuestionIndex !== state.currentQuestionIndex; safeSetText('currentQuestion', state.currentQuestionIndex + 1); // Only update question text if question changed if (questionChanged) { safeSetText('questionText', question.question); } const container = document.getElementById('optionsContainer'); if (!container) return; const existingOptions = container.querySelectorAll('.option'); const needsRebuild = questionChanged || existingOptions.length !== question.options.length; if (needsRebuild) { // Rebuild DOM only when question actually changes container.innerHTML = ''; question.options.forEach((option, index) => { const div = document.createElement('div'); div.className = 'option'; div.dataset.optIndex = index; div.innerHTML = ` `; if (!state.examSubmitted && !state.locked) { div.addEventListener('click', (e) => { e.preventDefault(); selectOption(index); }); div.addEventListener('touchend', (e) => { e.preventDefault(); e.stopPropagation(); selectOption(index); }, { passive: false }); } container.appendChild(div); }); _lastRenderedQuestionIndex = state.currentQuestionIndex; } // ===================================================== // FIX: Only update CSS classes, never rebuild the DOM // This is the key fix — no innerHTML = no scroll jump // ===================================================== const savedAnswer = state.answers[state.currentQuestionIndex]; container.querySelectorAll('.option').forEach((div) => { const idx = parseInt(div.dataset.optIndex); div.className = 'option'; if (savedAnswer === idx) div.classList.add('selected'); if (state.examSubmitted || state.locked) div.classList.add('disabled'); }); updateNavigation(); updateProgressBar(); } function selectOption(optionIndex) { if (state.examSubmitted || state.locked) return; // Save the answer state.answers[state.currentQuestionIndex] = optionIndex; saveAnswers(); // ===================================================== // FIX: Only update classes, NO full re-render // This completely eliminates the scroll glitch // ===================================================== const container = document.getElementById('optionsContainer'); if (!container) return; container.querySelectorAll('.option').forEach((div) => { const idx = parseInt(div.dataset.optIndex); div.className = 'option'; if (optionIndex === idx) div.classList.add('selected'); }); } function updateNavigation() { const prevBtn = document.getElementById('prevBtn'); const nextBtn = document.getElementById('nextBtn'); if (prevBtn) prevBtn.disabled = state.currentQuestionIndex === 0; if (nextBtn) nextBtn.disabled = state.currentQuestionIndex === QUESTIONS.length - 1; } function updateProgressBar() { const bar = document.getElementById('progressBar'); if (bar) bar.style.width = `${((state.currentQuestionIndex + 1) / QUESTIONS.length) * 100}%`; } function nextQuestion() { if (state.currentQuestionIndex < QUESTIONS.length - 1) { state.currentQuestionIndex++; renderQuestion(); // Scroll to top of question card only on navigation const card = document.querySelector('.question-card'); if (card) card.scrollIntoView({ behavior: 'smooth', block: 'start' }); } } function prevQuestion() { if (state.currentQuestionIndex > 0) { state.currentQuestionIndex--; renderQuestion(); const card = document.querySelector('.question-card'); if (card) card.scrollIntoView({ behavior: 'smooth', block: 'start' }); } } // ==================== SUBMISSION ==================== function submitExam() { if (state.examSubmitted || state.locked) return; const attempted = state.answers.filter(a => a !== null).length; const total = QUESTIONS.length; const unattempted = total - attempted; let confirmMsg = `📋 FINAL CONFIRMATION\n\nExam: ${EXAM_CONFIG.EXAM_NAME}\n`; confirmMsg += `Attempted: ${attempted} out of ${total} questions`; if (unattempted > 0) confirmMsg += `\n⚠️ Unattempted: ${unattempted} questions`; confirmMsg += `\n\nClick OK to submit.`; if (!confirm(confirmMsg)) return; clearInterval(state.timerInterval); clearInterval(state.autoSaveInterval); state.examSubmitted = true; state.locked = true; const submitBtn = document.getElementById('submitExamBtn'); if (submitBtn) { submitBtn.disabled = true; submitBtn.textContent = 'Submitting...'; } showLoading('Submitting your exam...'); const results = calculateResults(); state.submissionResults = results; setTimeout(() => { hideLoading(); const statusEl = document.getElementById('examStatus'); if (statusEl) statusEl.querySelector('span').textContent = 'SUBMITTED'; const quizContainer = document.getElementById('quizContainer'); if (quizContainer) quizContainer.classList.remove('active'); document.getElementById('resultScreen').classList.add('active'); document.body.classList.remove('exam-active'); const examBar = document.getElementById('examBar'); if (examBar) examBar.classList.remove('active'); showExamResults(results); // Silent background form submission — student doesn't see retry details submitFormSilently(results); window.scrollTo({ top: 0, behavior: 'smooth' }); }, 600); } // ==================== SILENT FORM SUBMISSION ==================== // Submits to Google Form silently in background without showing retries to student function submitFormSilently(results) { updateFormStatus('submitting'); const onStatus = (status, retryNum) => { // Only update the small status text in result info — no visible badges to student updateFormStatus(status); if (status === 'success' || status === 'fallback') { // Silent success — no popup console.log('Form submitted successfully.'); } else if (status === 'failed') { // Will retry when internet available — silent console.warn('Form submission pending, will retry on reconnect.'); } }; state.formSubmitter.submitWithRetry(results, onStatus); } function calculateResults() { const total = QUESTIONS.length; let score = 0; for (let i = 0; i < total; i++) { if (state.answers[i] === QUESTIONS[i].correctAnswer) score++; } const percentage = Math.round((score / total) * 100); const status = percentage >= EXAM_CONFIG.PASSING_PERCENTAGE ? 'PASSED' : 'FAILED'; const required = Math.ceil((EXAM_CONFIG.PASSING_PERCENTAGE / 100) * total); const elapsed = (EXAM_CONFIG.EXAM_DURATION * 60) - state.remainingTime; const min = Math.floor(elapsed / 60); const sec = elapsed % 60; const timeTaken = `${min}:${String(sec).padStart(2,'0')}`; return { examId: EXAM_CONFIG.EXAM_ID, examName: EXAM_CONFIG.EXAM_NAME, studentName: state.studentName, rollNumber: state.rollNumber, score, total, percentage, timeTaken, status, requiredToPass: required, submissionDate: new Date().toLocaleString(), answers: [...state.answers] }; } function showExamResults(results) { safeSetText('resultExamTitle', results.examName); safeSetText('resultName', results.studentName); safeSetText('resultRoll', results.rollNumber); safeSetText('correctAnswers', results.score); safeSetText('totalQuestionsResult', results.total); safeSetText('resultPercentage', `${results.percentage}%`); safeSetText('timeTaken', results.timeTaken); safeSetText('resultStatus', results.status); safeSetText('submissionDate', results.submissionDate); safeSetText('requiredToPass', `${results.requiredToPass} out of ${results.total} questions`); const statusEl = document.getElementById('resultStatus'); if (statusEl) { statusEl.className = 'detail-value ' + (results.status === 'PASSED' ? 'pass' : 'fail'); } const iconEl = document.getElementById('resultIcon'); if (iconEl) { if (results.status === 'PASSED') { iconEl.className = 'result-icon pass'; } else { iconEl.className = 'result-icon fail'; iconEl.innerHTML = ` `; } } showQuestionReview(); } // ==================== QUESTION REVIEW ==================== function showQuestionReview() { const container = document.getElementById('questionsReviewContainer'); if (!container) return; container.innerHTML = ''; QUESTIONS.forEach((question, index) => { const studentAnswer = state.answers[index]; const isCorrect = studentAnswer === question.correctAnswer; const notAttempted = studentAnswer === null; const div = document.createElement('div'); div.className = `question-review ${isCorrect ? 'correct' : 'incorrect'}`; const answerItems = question.options.map((opt, optIdx) => { let cls = 'answer-item'; let tag = ''; const isCorrectOpt = optIdx === question.correctAnswer; const isSelected = studentAnswer === optIdx; if (isCorrectOpt && isSelected) { cls += ' correct-answer'; tag = ' ✅ (Your correct answer)'; } else if (isSelected && !isCorrectOpt) { cls += ' wrong-selected'; tag = ' ❌ (Your answer)'; } else if (isCorrectOpt) { cls += ' correct-answer'; tag = ' ✅ (Correct answer)'; } return `
${String.fromCharCode(65 + optIdx)}
${opt}${tag}
Key Points to Remember
-
${question.tips.map(t => `
- ${t} `).join('')}
Question ${index + 1}
${isCorrect ? '✅ Correct' : notAttempted ? '⭕ Not Attempted' : '❌ Incorrect'}
${question.question}
${answerItems}
Detailed Explanation
${question.explanation}
${tipsHtml}