Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.

219d517ae4" }, body: JSON.stringify(data) }) .then(response => response.json()) .then(data => { if (data.success && data.correct) { if (feedbackEl) { feedbackEl.textContent = data.message; feedbackEl.style.color = "green"; } try { const container = feedbackEl ? feedbackEl.closest('.tutor-chess-board-container') : null; updateTurnIndicator(container, chess); } catch(e) {} // Auto-select "True" try { const container = feedbackEl ? feedbackEl.closest('.tutor-question-wrapper, .tutor-quiz-question') || document : document; const labels = container.querySelectorAll('label'); for (let i = 0; i < labels.length; i++) { if (labels[i].textContent.trim().toLowerCase().includes('true')) { const input = document.getElementById(labels[i].getAttribute('for')) || labels[i].querySelector('input[type="radio"]'); if (input) { input.click(); break; } } } } catch(e) { console.warn('Auto-select True failed', e); } if (markCompleteBtn) { markCompleteBtn.disabled = false; markCompleteBtn.classList.remove('tutor-disabled', 'disabled'); markCompleteBtn.style.opacity = '1'; markCompleteBtn.style.cursor = 'pointer'; markCompleteBtn.title = ""; } if (onSuccess) onSuccess(); } else { if (feedbackEl) { feedbackEl.textContent = data.message || "Incorrect. Try again."; feedbackEl.style.color = "red"; } // Auto-select "False" try { const container = feedbackEl ? feedbackEl.closest('.tutor-question-wrapper, .tutor-quiz-question') || document : document; const labels = container.querySelectorAll('label'); for (let i = 0; i < labels.length; i++) { if (labels[i].textContent.trim().toLowerCase().includes('false')) { const input = document.getElementById(labels[i].getAttribute('for')) || labels[i].querySelector('input[type="radio"]'); if (input) { input.click(); break; } } } } catch(e) { console.warn('Auto-select False failed', e); } setTimeout(() => { chess.undo(); board.setPosition(chess.fen(), true); try { const container = feedbackEl ? feedbackEl.closest('.tutor-chess-board-container') : null; updateTurnIndicator(container, chess); } catch(e) {} if (onFailure) onFailure(); }, 800); } }) .catch(err => { console.error(err); if (feedbackEl) { feedbackEl.textContent = "Error validating move."; feedbackEl.style.color = "red"; } chess.undo(); board.setPosition(chess.fen(), true); try { const container = feedbackEl ? feedbackEl.closest('.tutor-chess-board-container') : null; updateTurnIndicator(container, chess); } catch(e) {} if (onFailure) onFailure(); }); }