Five scenario questions, the fictional source rules and a local self-check score

HTML for this example

Select the code and use your copy shortcut. Changes in this preview are temporary.

<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; script-src 'unsafe-inline'; form-action 'none'; base-uri 'none'"><title>Harlow Street desk self-check</title><style>*{box-sizing:border-box}body{margin:0;font:16px/1.5 Arial,Helvetica,sans-serif;color:#24313b;background:#fff}main{max-width:900px;margin:auto;padding:22px}h1{font-size:26px;line-height:1.2;margin:8px 0 18px}h2{font-size:19px;margin:22px 0 10px}h3{font-size:17px;margin:14px 0 8px}p{margin:10px 0}ul,ol{padding-left:22px}li{margin:6px 0}.note{font-size:13px;color:#53616a}.callout{border-left:4px solid #405d73;background:#f2f5f7;padding:10px 14px}table{border-collapse:collapse;width:100%;margin:12px 0}caption{text-align:left;font-weight:bold;padding:0 0 8px}th,td{padding:9px 8px;text-align:left;vertical-align:top;border-bottom:1px solid #b8c3ca;overflow-wrap:anywhere}th{background:#edf2f5}td b{display:none}footer{border-top:1px solid #aeb9bf;margin-top:22px;padding-top:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:16px/1.5 ui-monospace,monospace;background:#f5f5f5;padding:12px}@media(max-width:560px){main{padding:16px}h1{font-size:23px}thead{display:none}table,tbody,tr,td{display:block;width:100%}caption{display:block}tr{border-bottom:1px solid #aeb9bf;padding:6px 0}td{border:0;padding:3px 0}td b{display:inline}}@media print{@page{size:letter;margin:.5in}main{padding:0}}h1{color:#364851}fieldset{min-width:0;margin:18px 0;padding:14px;border:1px solid #a7b5bb}legend{font-weight:bold;padding:0 6px}label{display:flex;gap:10px;align-items:flex-start;padding:8px 4px;cursor:pointer}input{flex:0 0 auto;margin:6px 0 0}button{font:inherit;border:1px solid #344f60;border-radius:4px;padding:9px 14px;background:#344f60;color:white;margin:4px 8px 4px 0;cursor:pointer}button#try-again{background:white;color:#344f60}button:disabled{opacity:.5;cursor:default}:focus-visible{outline:3px solid #ad5b1c;outline-offset:3px}.missing{border:3px solid #a8422a}#errors{color:#872e1c;font-weight:bold}#result{font-weight:bold;background:#f0f5f7}.feedback{border-left:3px solid #607d8b;padding:10px;background:#f4f7f8}summary{cursor:pointer;font-weight:bold;padding:8px 0}details{border-bottom:1px solid #b8c3ca}</style></head><body><main><p class="note">Fictional library handout · five questions · local self-check, no saved scores</p><h1>Checkout desk · apply the rules</h1><p>Choose one answer per question. Check answers shows source-based explanations; unanswered questions are flagged first.</p><details id="source"><summary>Read the fictional source handout</summary><ol><li>R1 · Loans last 7 days.</li><li>R2 · One renewal is allowed only when the item is not reserved.</li><li>R3 · At most two power tools may be borrowed at once.</li><li>R4 · Tag a damaged return and notify the coordinator.</li><li>R5 · Open Tuesday and Thursday, 16:00–19:00.</li></ol></details><div id="quiz" role="group" aria-label="Practice questions"><p id="errors" role="alert"></p><fieldset id="q1" data-question="q1"><legend>1. A member asks for the standard hand-tool loan period. What is it?</legend><label for="q1-a"><input id="q1-a" type="radio" name="q1" value="a">3 days</label><label for="q1-b"><input id="q1-b" type="radio" name="q1" value="b">7 days</label><label for="q1-c"><input id="q1-c" type="radio" name="q1" value="c">14 days</label><p id="q1-feedback" class="feedback" hidden></p></fieldset><fieldset id="q2" data-question="q2"><legend>2. An item is reserved by another member. Can its current borrower renew it?</legend><label for="q2-a"><input id="q2-a" type="radio" name="q2" value="a">Yes, every loan gets one renewal</label><label for="q2-b"><input id="q2-b" type="radio" name="q2" value="b">Yes, allow two renewals</label><label for="q2-c"><input id="q2-c" type="radio" name="q2" value="c">No; a reserved item cannot be renewed</label><p id="q2-feedback" class="feedback" hidden></p></fieldset><fieldset id="q3" data-question="q3"><legend>3. A member already has two power tools. What must happen before a third loan?</legend><label for="q3-a"><input id="q3-a" type="radio" name="q3" value="a">Return one of the two first</label><label for="q3-b"><input id="q3-b" type="radio" name="q3" value="b">Pay a fee to bypass the limit</label><label for="q3-c"><input id="q3-c" type="radio" name="q3" value="c">Borrow the third for one day</label><p id="q3-feedback" class="feedback" hidden></p></fieldset><fieldset id="q4" data-question="q4"><legend>4. A tool is returned damaged. What does the sample handout tell you to do?</legend><label for="q4-a"><input id="q4-a" type="radio" name="q4" value="a">Put it back on the shelf</label><label for="q4-b"><input id="q4-b" type="radio" name="q4" value="b">Loan it again with a warning</label><label for="q4-c"><input id="q4-c" type="radio" name="q4" value="c">Tag it and notify the coordinator</label><p id="q4-feedback" class="feedback" hidden></p></fieldset><fieldset id="q5" data-question="q5"><legend>5. Which visit falls within the stated opening hours?</legend><label for="q5-a"><input id="q5-a" type="radio" name="q5" value="a">Monday at 17:00</label><label for="q5-b"><input id="q5-b" type="radio" name="q5" value="b">Tuesday at 16:00</label><label for="q5-c"><input id="q5-c" type="radio" name="q5" value="c">Thursday at 15:00</label><p id="q5-feedback" class="feedback" hidden></p></fieldset><button id="check" type="button" disabled>Check answers</button><button id="try-again" type="button" disabled>Try again</button><p id="result" role="status" aria-live="polite" tabindex="-1"></p></div><noscript><p>Scoring needs JavaScript. Use the review answer key below for a manual self-check.</p></noscript><details id="key"><summary>Review answer key / source references</summary><ol><li>B: R1 sets the loan period at 7 days.</li><li>C: R2 allows one renewal only when the item is not reserved. The reservation prevents renewal.</li><li>A: R3 limits simultaneous power-tool loans to two. Returning one makes room within that limit.</li><li>C: R4 requires tagging the damaged return and notifying the coordinator.</li><li>B: R5 opens Tuesday and Thursday from 16:00 to 19:00. Tuesday at 16:00 fits; the other choices do not.</li></ol></details><footer>Sample policy only. No names, network calls, browser storage or result submission. Reload starts empty. Use approved systems for required training records.</footer><script>(()=>{'use strict';const key=[{"id":"q1","rule":"R1","text":"A member asks for the standard hand-tool loan period. What is it?","choices":["3 days","7 days","14 days"],"answer":"b","why":"R1 sets the loan period at 7 days."},{"id":"q2","rule":"R2","text":"An item is reserved by another member. Can its current borrower renew it?","choices":["Yes, every loan gets one renewal","Yes, allow two renewals","No; a reserved item cannot be renewed"],"answer":"c","why":"R2 allows one renewal only when the item is not reserved. The reservation prevents renewal."},{"id":"q3","rule":"R3","text":"A member already has two power tools. What must happen before a third loan?","choices":["Return one of the two first","Pay a fee to bypass the limit","Borrow the third for one day"],"answer":"a","why":"R3 limits simultaneous power-tool loans to two. Returning one makes room within that limit."},{"id":"q4","rule":"R4","text":"A tool is returned damaged. What does the sample handout tell you to do?","choices":["Put it back on the shelf","Loan it again with a warning","Tag it and notify the coordinator"],"answer":"c","why":"R4 requires tagging the damaged return and notifying the coordinator."},{"id":"q5","rule":"R5","text":"Which visit falls within the stated opening hours?","choices":["Monday at 17:00","Tuesday at 16:00","Thursday at 15:00"],"answer":"b","why":"R5 opens Tuesday and Thursday from 16:00 to 19:00. Tuesday at 16:00 fits; the other choices do not."}],quiz=document.getElementById('quiz'),result=document.getElementById('result'),error=document.getElementById('errors');function clear(){result.textContent='';error.textContent='';for(const q of key){const group=document.getElementById(q.id),feedback=document.getElementById(q.id+'-feedback');group.classList.remove('missing');group.removeAttribute('aria-describedby');feedback.hidden=true;feedback.textContent='';}}quiz.addEventListener('change',clear);document.getElementById('check').addEventListener('click',()=>{clear();const missing=key.filter(q=>!quiz.querySelector('input[name="'+q.id+'"]:checked'));if(missing.length){error.textContent='Answer questions '+missing.map(q=>q.id.slice(1)).join(', ')+' before checking.';for(const q of missing){const group=document.getElementById(q.id);group.classList.add('missing');group.setAttribute('aria-describedby','errors');}document.getElementById(missing[0].id+'-a').focus();return;}let score=0;for(const q of key){const correct=quiz.querySelector('input[name="'+q.id+'"]:checked').value===q.answer;if(correct)score++;const feedback=document.getElementById(q.id+'-feedback');feedback.textContent=(correct?'Correct. ':'Incorrect. ')+q.why;feedback.hidden=false;}result.textContent=score+' / '+key.length+' correct. Review the explanations; this score is not saved.';result.focus();});document.getElementById('try-again').addEventListener('click',()=>{for(const input of quiz.querySelectorAll('input'))input.checked=false;clear();document.getElementById('q1-a').focus();});document.getElementById('check').disabled=false;document.getElementById('try-again').disabled=false;})();</script></main></body></html>