PE Teacher Guide
Select grade & week to view study guide and answer keys
Welcome
Choose a grade and week from the left to view study guide and answer key.
`; } function openPrintWindow(html){ const w = window.open('', '_blank', 'noopener'); if(!w) return alert('Popup blocked — allow popups to print the packet.'); w.document.open(); w.document.write(html); w.document.close(); // Give the new window a moment to render before calling print w.focus(); setTimeout(()=> { try{ w.print(); } catch(e){ console.warn('Print call failed', e); } }, 300); } downloadPacketBtn.addEventListener('click', ()=>{ if(!teacherMode){ if(!confirm('Downloadable teacher packet is teacher-only. Unlock teacher mode now?')) return; promptUnlockTeacherMode(); if(!teacherMode) return; } const g = current.grade, m = current.module; const w = ALL[g][m][current.weekIndex]; const html = buildPrintPacketHTML(w, { grade:g, module:m }); openPrintWindow(html); }); /* small helper option label used in overlay and answer key */ function optionLabel(i){ if(typeof i !== 'number') return 'N/A'; return String.fromCharCode(65 + (i||0)); } /* initial build */ function init(){ // default grade and module (keeps current.weekIndex) buildWeekList(); renderCurrentWeek(); // initially disable overlay & packet until teacherMode enabled answerOverlayBtn.disabled = true; } init(); /* Expose a quick function to clear teacher password if needed (for debugging) */ window._plera_clear_teacher_pass = function(){ if(confirm('Clear teacher password from this browser?')) { localStorage.removeItem(TEACHER_PASS_KEY); alert('Teacher password cleared.'); } };