{"id":368,"date":"2026-09-07T20:39:25","date_gmt":"2026-09-07T20:39:25","guid":{"rendered":"https:\/\/ndovu.org.uk\/cs\/?p=368"},"modified":"2026-09-23T05:56:02","modified_gmt":"2026-09-23T05:56:02","slug":"yr5-term-1-1-internet-safety-encryption","status":"publish","type":"post","link":"https:\/\/ndovu.org.uk\/cs\/yr5-term-1-1-internet-safety-encryption\/","title":{"rendered":"Yr5 Term 1.1 Internet Safety &amp; Encryption"},"content":{"rendered":"\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-09a52a45-e067-4e8c-8be7-93dfb54a7b1a\" href=\"https:\/\/ndovu.org.uk\/cs\/wp-content\/uploads\/2026\/09\/ICT-MTP-Autumn-1-Yr5-2.pdf\">ICT MTP Autumn 1 Yr5 (2)<\/a><a href=\"https:\/\/ndovu.org.uk\/cs\/wp-content\/uploads\/2026\/09\/ICT-MTP-Autumn-1-Yr5-2.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-09a52a45-e067-4e8c-8be7-93dfb54a7b1a\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-a2e306aa-04c9-4da9-9b66-69fd504b4c4c\" href=\"https:\/\/ndovu.org.uk\/cs\/wp-content\/uploads\/2026\/09\/ICT-MTP-Autumn-1-Yr5.docx\">ICT MTP Autumn 1 Yr5<\/a><a href=\"https:\/\/ndovu.org.uk\/cs\/wp-content\/uploads\/2026\/09\/ICT-MTP-Autumn-1-Yr5.docx\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-a2e306aa-04c9-4da9-9b66-69fd504b4c4c\">Download<\/a><\/div>\n\n\n\n<p><strong>Welcome to Year 5 Computing! \ud83d\udd10\ud83d\udcbb<\/strong><\/p>\n<p>Today we are kicking off our unit on Internet Safety and Encryption! You will learn how to operate ICT equipment safely, create strong unique passwords, navigate the school network, and protect your digital identity. Let&#8217;s get started!<\/p>\n\n<p><strong>Step 1: Time to Type! \u2328\ufe0f (10 Mins)<\/strong><\/p>\n<ul>\n  <li>Click here to warm up your fingers: <a href=\"https:\/\/dyson-fereday.ovh\/type\/\" target=\"_blank\" rel=\"noopener\">Start Typing Practice<\/a>.<\/li>\n  <li>Today&#8217;s typing challenge focuses on cybersecurity terms: <em>password, security, network, privacy, and protection<\/em>. Focus on keystroke accuracy and proper finger placement!<\/li>\n<\/ul>\n\n<p><strong>Step 2: Password Security &amp; System Operations Module \ud83d\udee1\ufe0f (20 Mins)<\/strong><\/p>\n<p>Use the embedded module below to explore ICT room safety rules, test password crack times and smart alternatives, learn how to handle security risks, and record your login verification!<\/p>\n\n<!-- SCOPED INTERACTIVE LESSON WIDGET MODULE -->\n<div id=\"y5-l1-widget\" style=\"max-width: 850px; margin: 20px auto; font-family: Arial, sans-serif; border: 2px solid #ddd; border-radius: 10px; padding: 20px; background-color: #fcfcfc; box-shadow: 0 4px 8px rgba(0,0,0,0.05);\">\n\n  <!-- Progress Bar -->\n  <div style=\"width: 100%; background-color: #e0e0e0; border-radius: 5px; margin-bottom: 20px;\">\n    <div id=\"y5-l1-progress\" style=\"width: 25%; height: 10px; background-color: #0073aa; border-radius: 5px; transition: width 0.3s;\"><\/div>\n  <\/div>\n\n  <!-- Slide 1: ICT Room Rules -->\n  <div class=\"y5-slide\" id=\"y5-slide-0\" style=\"display: block;\">\n    <h2 style=\"margin-top:0; color: #0073aa;\">Step 1: ICT Lab Safety Agreement<\/h2>\n    <p>Before logging on, review and confirm the key physical and digital safety rules for our computer suite:<\/p>\n    <div style=\"background: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 15px; margin-bottom: 20px;\">\n      <label style=\"display: block; margin-bottom: 10px; cursor: pointer;\"><input type=\"checkbox\" class=\"y5-rule-check\"> \ud83d\udeab <strong>No liquids or food:<\/strong> Keep water bottles and snacks far away from keyboards.<\/label>\n      <label style=\"display: block; margin-bottom: 10px; cursor: pointer;\"><input type=\"checkbox\" class=\"y5-rule-check\"> \ud83d\udd12 <strong>Secure Account Logout:<\/strong> Always sign out properly at the end of the lesson.<\/label>\n      <label style=\"display: block; margin-bottom: 10px; cursor: pointer;\"><input type=\"checkbox\" class=\"y5-rule-check\"> \ud83e\uddf9 <strong>Workstation Care:<\/strong> Leave your desk clean, push your chair in, and tuck cables away.<\/label>\n      <label style=\"display: block; margin-bottom: 0; cursor: pointer;\"><input type=\"checkbox\" class=\"y5-rule-check\"> \ud83e\udd1d <strong>Respectful Usage:<\/strong> Use school computers responsibly and ethically.<\/label>\n    <\/div>\n    <div style=\"text-align: right;\">\n      <button type=\"button\" id=\"btn-next-1\" style=\"background-color: #0073aa; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px;\">Next \u2794<\/button>\n    <\/div>\n  <\/div>\n\n  <!-- Slide 2: Password Inspector -->\n  <div class=\"y5-slide\" id=\"y5-slide-1\" style=\"display: none;\">\n    <h2 style=\"margin-top:0; color: #0073aa;\">Step 2: Password Crack Time Inspector<\/h2>\n    <p>Type your current or planned password to test how fast a computer could crack it!<\/p>\n    <div style=\"background: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 20px; margin-bottom: 20px; text-align: center;\">\n      <label style=\"font-weight: bold; display: block; margin-bottom: 10px;\">Type your password to evaluate:<\/label>\n      <input type=\"text\" id=\"y5-password-input\" placeholder=\"Type your password here...\" style=\"width: 80%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 16px; box-sizing: border-box;\">\n      <div id=\"y5-strength-meter\" style=\"margin-top: 15px; padding: 12px; border-radius: 5px; background: #eee; font-weight: bold; color: #555;\">Type your password above to evaluate crack time&#8230;<\/div>\n      <div id=\"y5-suggestion-box\" style=\"margin-top: 15px; padding: 12px; border-radius: 5px; background: #e8f5e9; border: 1px solid #4CAF50; display: none; text-align: left; font-size: 14px;\">\n        <strong>\ud83d\udca1 Smart Alternative Suggestions:<\/strong>\n        <ul id=\"y5-suggestion-list\" style=\"margin: 5px 0 0 20px; padding: 0;\"><\/ul>\n      <\/div>\n    <\/div>\n    <div style=\"text-align: right;\">\n      <button type=\"button\" id=\"btn-next-2\" style=\"background-color: #0073aa; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px;\">Next \u2794<\/button>\n    <\/div>\n  <\/div>\n\n  <!-- Slide 3: Incident Response -->\n  <div class=\"y5-slide\" id=\"y5-slide-2\" style=\"display: none;\">\n    <h2 style=\"margin-top:0; color: #0073aa;\">Step 3: What If Someone Learns Your Password?<\/h2>\n    <p>Explain the exact steps you would take to report the concern and protect your identity:<\/p>\n    <textarea id=\"y5-incident-response\" rows=\"4\" placeholder=\"e.g., 1. Tell my teacher immediately. 2. Change my password. 3. Check my files...\" style=\"width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 15px; margin-bottom: 20px;\"><\/textarea>\n    <div style=\"text-align: right;\">\n      <button type=\"button\" id=\"btn-next-3\" style=\"background-color: #0073aa; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px;\">Next \u2794<\/button>\n    <\/div>\n  <\/div>\n\n  <!-- Slide 4: Verification Complete -->\n  <div class=\"y5-slide\" id=\"y5-slide-3\" style=\"display: none; text-align: center;\">\n    <h2 style=\"margin-top:0; color: #0073aa;\">Step 4: Login Verification Complete! \ud83d\udd11<\/h2>\n    <p>Great work! You have successfully verified your network login credentials, confirmed ICT suite safety rules, and evaluated your password crack time.<\/p>\n    <div style=\"background: #e6f2f8; border-left: 4px solid #0073aa; padding: 15px; text-align: left; margin: 20px 0; border-radius: 0 5px 5px 0;\">\n      <p style=\"margin: 0;\"><strong>Final Check:<\/strong> Move on to the Creative Extension below to design your Pizza Identity and download your complete portfolio image!<\/p>\n    <\/div>\n  <\/div>\n\n<\/div>\n\n<!-- Step 3: CREATIVE EXTENSION TASK -->\n<p><strong>Step 3: Creative Extension \u2014 Pizza Identity Studio \ud83c\udf55 (20 Mins)<\/strong><\/p>\n<p>Now that you have verified your login, use the interactive tools below to create a highly secure passphrase and express who you are without giving away your private identity!<\/p>\n\n<div id=\"creative-extension-widget\" style=\"max-width: 850px; margin: 20px auto; font-family: Arial, sans-serif; border: 2px solid #0073aa; border-radius: 10px; padding: 20px; background-color: #ffffff; box-shadow: 0 4px 8px rgba(0,0,0,0.08);\">\n  \n  <h2 style=\"margin-top:0; color: #0073aa;\">\ud83c\udfa8 Part A: Invent a 3-Random-Word Passphrase<\/h2>\n  <p>Combine <strong>3 random memorable words<\/strong> below. The system will automatically add special characters (<code>#<\/code> and <code>$<\/code>) to bond them into a super-secure passphrase!<\/p>\n  \n  <div style=\"display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap;\">\n    <input type=\"text\" id=\"y5-word1\" placeholder=\"Word 1 (e.g. Banana)\" style=\"flex:1; padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-weight: bold;\">\n    <input type=\"text\" id=\"y5-word2\" placeholder=\"Word 2 (e.g. Bicycle)\" style=\"flex:1; padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-weight: bold;\">\n    <input type=\"text\" id=\"y5-word3\" placeholder=\"Word 3 (e.g. Wizard)\" style=\"flex:1; padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-weight: bold;\">\n  <\/div>\n  \n  <!-- Live Passphrase Checker -->\n  <div style=\"background: #222; color: #fff; padding: 15px; border-radius: 8px; text-align: center; margin-bottom: 20px;\">\n    <p style=\"margin: 0 0 10px 0; font-size: 14px; color: #aaa;\">Your Combined Super-Passphrase:<\/p>\n    <div id=\"combined-pass-display\" style=\"font-family: monospace; font-size: 24px; color: #00ffcc; letter-spacing: 2px; margin-bottom: 10px;\">[ Waiting for words&#8230; ]<\/div>\n    <div id=\"combined-crack-display\" style=\"font-weight: bold; font-size: 16px; color: #ffeb3b;\">Estimated Crack Time: 0 Seconds<\/div>\n  <\/div>\n\n  <label style=\"font-weight: bold; display: block; margin-bottom: 5px;\">Why is a 3-random-word passphrase easier for you to remember, but harder for a hacker or computer program to guess?<\/label>\n  <textarea id=\"y5-passphrase-reasoning\" rows=\"2\" placeholder=\"Write your explanation here...\" style=\"width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; margin-bottom: 20px;\"><\/textarea>\n\n  <hr style=\"border: 0; border-top: 1px solid #eee; margin: 20px 0;\">\n\n  <h2 style=\"margin-top:0; color: #e65100;\">\ud83c\udf55 Part B: Draw Your Pizza Identity<\/h2>\n  <p>If you had to express yourself through pizza toppings, what could you add that explains your personality without giving away your identity? <em>(e.g., Sweetcorn for a sunny personality, Jalape\u00f1os for fiery sports energy, Mushrooms if you love nature)<\/em>.<\/p>\n\n  <div style=\"text-align: center; margin-bottom: 15px;\">\n    <!-- Drawing Toolbar -->\n    <div style=\"margin-bottom: 15px; display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; background: #f9f9f9; padding: 10px; border-radius: 5px; border: 1px solid #ddd;\">\n      <div style=\"display: flex; gap: 5px;\">\n        <button type=\"button\" id=\"btn-tool-brush\" style=\"background-color: #0073aa; color: white; border: 2px solid #00507a; padding: 8px 12px; border-radius: 5px; cursor: pointer; font-weight: bold;\">\ud83d\udd8c\ufe0f Topping Brush<\/button>\n        <button type=\"button\" id=\"btn-tool-eraser\" style=\"background-color: #e0e0e0; color: #333; border: 2px solid #ccc; padding: 8px 12px; border-radius: 5px; cursor: pointer; font-weight: bold;\">\ud83e\uddfc Cheese Eraser<\/button>\n      <\/div>\n      \n      <div style=\"display: flex; align-items: center; gap: 5px;\">\n        <label for=\"y5-brush-color\" style=\"font-weight: bold; font-size: 13px;\">Color:<\/label>\n        <input type=\"color\" id=\"y5-brush-color\" value=\"#ff3d00\" style=\"cursor: pointer;\">\n      <\/div>\n      \n      <div style=\"display: flex; align-items: center; gap: 5px;\">\n        <label for=\"y5-brush-size\" style=\"font-weight: bold; font-size: 13px;\">Size:<\/label>\n        <input type=\"range\" id=\"y5-brush-size\" min=\"2\" max=\"50\" value=\"15\" style=\"cursor: pointer;\">\n      <\/div>\n\n      <button type=\"button\" id=\"btn-clear-canvas\" style=\"background-color: #ff4c4c; color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; font-weight: bold;\">\ud83d\uddd1\ufe0f Clear Crust<\/button>\n    <\/div>\n\n    <!-- Pizza Canvas Container -->\n    <div style=\"width: 100%; display: flex; justify-content: center;\">\n      <!-- Canvas set to 80% width for large drawing area -->\n      <canvas id=\"y5-pizza-canvas\" width=\"800\" height=\"800\" style=\"width: 80%; max-width: 800px; aspect-ratio: 1\/1; border: 3px solid #333; border-radius: 50%; background: #fafafa; cursor: crosshair; touch-action: none; box-shadow: 0 4px 12px rgba(0,0,0,0.15);\"><\/canvas>\n    <\/div>\n  <\/div>\n\n  <div style=\"text-align: center; margin-top: 20px;\">\n    <button type=\"button\" id=\"btn-download-report\" style=\"background-color: #4CAF50; color: white; border: none; padding: 15px 25px; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: bold;\">\ud83d\udcbe Download Portfolio Image (For Word)<\/button>\n  <\/div>\n\n<\/div>\n\n<p><strong>Step 4: Log Off and Reflect \ud83d\udc4b (10 Mins)<\/strong><\/p>\n<ul>\n  <li><strong>Exit Ticket:<\/strong> Explain to your partner why using default or simple passwords puts your personal digital identity at risk on a shared network.<\/li>\n  <li>Log out securely and ensure your workstation is left clean and tidy!<\/li>\n<\/ul>\n<script>\n\/* <![CDATA[ *\/\ndocument.addEventListener('DOMContentLoaded', function() {\n  \n  \/\/ --- UTILITY: AVOID ANGLE BRACKETS FOR WP SAFETY ---\n  function getCrackTimeLabel(seconds, len) {\n    if (6 > len) return 'Instant (Less than 0.001 seconds)';\n    if (1 > seconds) return 'Less than 1 second';\n    if (60 > seconds) return Math.round(seconds) + ' seconds';\n    if (3600 > seconds) return Math.round(seconds \/ 60) + ' minutes';\n    if (86400 > seconds) return Math.round(seconds \/ 3600) + ' hours';\n    if (31536000 > seconds) return Math.round(seconds \/ 86400) + ' days';\n    if (3153600000 > seconds) return Math.round(seconds \/ 31536000) + ' years';\n    return 'Billions of years!';\n  }\n\n  function calculateRawCrackTime(pwd) {\n    var charsetSize = 0;\n    if (\/[a-z]\/.test(pwd)) charsetSize += 26;\n    if (\/[A-Z]\/.test(pwd)) charsetSize += 26;\n    if (\/[0-9]\/.test(pwd)) charsetSize += 10;\n    if (\/[^a-zA-Z0-9]\/.test(pwd)) charsetSize += 32;\n    var combinations = Math.pow(charsetSize, pwd.length);\n    return combinations \/ 10000000000; \n  }\n\n  \/\/ --- SLIDE NAVIGATION ---\n  var state = { response: '' };\n\n  document.getElementById('btn-next-1').addEventListener('click', function() {\n    var checkedCount = document.querySelectorAll('#y5-l1-widget .y5-rule-check:checked').length;\n    if (4 > checkedCount) { alert(\"Please review and check all 4 ICT safety rules!\"); return; }\n    goToSlide(1, 50);\n  });\n\n  document.getElementById('btn-next-2').addEventListener('click', function() {\n    var pwd = document.getElementById('y5-password-input').value.trim();\n    if (pwd === \"\") { alert(\"Please type a password to evaluate!\"); return; }\n    goToSlide(2, 75);\n  });\n\n  document.getElementById('btn-next-3').addEventListener('click', function() {\n    var resp = document.getElementById('y5-incident-response').value.trim();\n    if (resp === \"\") { alert(\"Please describe your action plan!\"); return; }\n    state.response = resp;\n    goToSlide(3, 100);\n  });\n\n  function goToSlide(targetIdx, progress) {\n    var slides = document.querySelectorAll('#y5-l1-widget .y5-slide');\n    for (var i = 0; i != slides.length; i++) { slides[i].style.display = 'none'; }\n    document.getElementById('y5-slide-' + targetIdx).style.display = 'block';\n    document.getElementById('y5-l1-progress').style.width = progress + '%';\n  }\n\n  \/\/ --- INITIAL PASSWORD INSPECTOR ---\n  document.getElementById('y5-password-input').addEventListener('input', function(e) {\n    var pwd = e.target.value;\n    var meter = document.getElementById('y5-strength-meter');\n    var suggBox = document.getElementById('y5-suggestion-box');\n    var suggList = document.getElementById('y5-suggestion-list');\n\n    if (pwd.length === 0) {\n      meter.style.background = '#eee'; meter.style.color = '#555';\n      meter.innerHTML = 'Type your password above to evaluate crack time...';\n      suggBox.style.display = 'none'; return;\n    }\n\n    var seconds = calculateRawCrackTime(pwd);\n    var label = getCrackTimeLabel(seconds, pwd.length);\n\n    var bg = '#fff3e0'; var txt = '#ef6c00';\n    if (label.indexOf('Instant') !== -1 || label.indexOf('second') !== -1) { bg = '#ffebee'; txt = '#c62828'; }\n    else if (label.indexOf('year') !== -1) { bg = '#e8f5e9'; txt = '#2e7d32'; }\n\n    meter.style.background = bg; meter.style.color = txt;\n    meter.innerHTML = '\u23f1\ufe0f <strong>Estimated Crack Time:<\/strong> ' + label;\n\n    suggBox.style.display = 'block';\n    var cleanWord = pwd.replace(\/[^a-zA-Z]\/g, '') || 'Dragon';\n    suggList.innerHTML = '<li><code>' + cleanWord + '#Rocket$99<\/code><\/li><li><code>Blue!' + cleanWord + '%Shield<\/code><\/li>';\n  });\n\n  \/\/ --- PART A: COMBINED PASSPHRASE BUILDER ---\n  var w1 = document.getElementById('y5-word1');\n  var w2 = document.getElementById('y5-word2');\n  var w3 = document.getElementById('y5-word3');\n  var combDisplay = document.getElementById('combined-pass-display');\n  var combCrack = document.getElementById('combined-crack-display');\n  var finalCombinedPassword = \"\";\n  var finalCombinedCrackTime = \"\";\n\n  function updateCombinedPassphrase() {\n    var val1 = w1.value.trim();\n    var val2 = w2.value.trim();\n    var val3 = w3.value.trim();\n    \n    if (!val1 && !val2 && !val3) {\n      combDisplay.innerText = \"[ Waiting for words... ]\";\n      combDisplay.style.color = \"#aaa\";\n      combCrack.innerText = \"Estimated Crack Time: 0 Seconds\";\n      combCrack.style.color = \"#aaa\";\n      finalCombinedPassword = \"\";\n      return;\n    }\n\n    var parts = [];\n    if (val1) parts.push(val1);\n    if (val2) parts.push(val2);\n    if (val3) parts.push(val3);\n\n    var combined = parts[0];\n    if (parts.length >= 2) combined += \"#\" + parts[1];\n    if (parts.length >= 3) combined += \"$\" + parts[2];\n    if (parts.length === 3) combined += \"!\";\n\n    finalCombinedPassword = combined;\n    combDisplay.innerText = combined;\n    combDisplay.style.color = \"#00ffcc\";\n\n    var seconds = calculateRawCrackTime(combined);\n    var label = getCrackTimeLabel(seconds, combined.length);\n    finalCombinedCrackTime = label;\n\n    combCrack.innerText = \"Estimated Crack Time: \" + label;\n    if (label.indexOf('year') !== -1) {\n      combCrack.style.color = \"#4CAF50\";\n    } else {\n      combCrack.style.color = \"#ffeb3b\";\n    }\n  }\n\n  w1.addEventListener('input', updateCombinedPassphrase);\n  w2.addEventListener('input', updateCombinedPassphrase);\n  w3.addEventListener('input', updateCombinedPassphrase);\n\n\n  \/\/ --- PART B: 80% PIZZA CANVAS DRAWING ---\n  var canvas = document.getElementById('y5-pizza-canvas');\n  var ctx = canvas.getContext('2d');\n  var isDrawing = false;\n  var currentTool = 'brush';\n  var cheeseColor = '#fff3a0';\n\n  function drawPizzaBase() {\n    ctx.clearRect(0, 0, canvas.width, canvas.height);\n    ctx.beginPath(); ctx.arc(400, 400, 380, 0, Math.PI * 2);\n    ctx.fillStyle = '#d7ccc8'; ctx.fill();\n    ctx.lineWidth = 15; ctx.strokeStyle = '#8d6e63'; ctx.stroke();\n    \n    ctx.beginPath(); ctx.arc(400, 400, 350, 0, Math.PI * 2);\n    ctx.fillStyle = '#e5a752'; ctx.fill();\n    \n    ctx.beginPath(); ctx.arc(400, 400, 320, 0, Math.PI * 2);\n    ctx.fillStyle = cheeseColor; ctx.fill();\n    ctx.lineWidth = 8; ctx.strokeStyle = '#d84315'; ctx.stroke();\n  }\n\n  drawPizzaBase();\n\n  function setTool(tool) {\n    currentTool = tool;\n    var btnB = document.getElementById('btn-tool-brush');\n    var btnE = document.getElementById('btn-tool-eraser');\n    if (tool === 'brush') {\n      btnB.style.backgroundColor = '#0073aa'; btnB.style.color = 'white'; btnB.style.borderColor = '#00507a';\n      btnE.style.backgroundColor = '#e0e0e0'; btnE.style.color = '#333'; btnE.style.borderColor = '#ccc';\n    } else {\n      btnE.style.backgroundColor = '#0073aa'; btnE.style.color = 'white'; btnE.style.borderColor = '#00507a';\n      btnB.style.backgroundColor = '#e0e0e0'; btnB.style.color = '#333'; btnB.style.borderColor = '#ccc';\n    }\n  }\n\n  document.getElementById('btn-tool-brush').addEventListener('click', function() { setTool('brush'); });\n  document.getElementById('btn-tool-eraser').addEventListener('click', function() { setTool('eraser'); });\n  document.getElementById('btn-clear-canvas').addEventListener('click', function() {\n    if (confirm(\"Clear your pizza toppings?\")) drawPizzaBase();\n  });\n\n  function getMousePos(e) {\n    var rect = canvas.getBoundingClientRect();\n    var scaleX = canvas.width \/ rect.width;\n    var scaleY = canvas.height \/ rect.height;\n    var clientX = e.clientX;\n    var clientY = e.clientY;\n    if (e.touches && e.touches.length !== 0) {\n      clientX = e.touches[0].clientX;\n      clientY = e.touches[0].clientY;\n    }\n    return {\n      x: (clientX - rect.left) * scaleX,\n      y: (clientY - rect.top) * scaleY,\n      scaleX: scaleX\n    };\n  }\n\n  function startDraw(e) {\n    isDrawing = true;\n    var pos = getMousePos(e);\n    ctx.beginPath();\n    ctx.moveTo(pos.x, pos.y);\n  }\n\n  function draw(e) {\n    if (!isDrawing) return;\n    var pos = getMousePos(e);\n    var size = document.getElementById('y5-brush-size').value;\n    \n    ctx.lineWidth = size * (pos.scaleX > 1 ? pos.scaleX \/ 1.5 : 1);\n    ctx.lineCap = 'round';\n    ctx.lineJoin = 'round';\n\n    if (currentTool === 'eraser') {\n      ctx.strokeStyle = cheeseColor; \n    } else {\n      ctx.strokeStyle = document.getElementById('y5-brush-color').value;\n    }\n\n    ctx.lineTo(pos.x, pos.y);\n    ctx.stroke();\n    ctx.beginPath();\n    ctx.moveTo(pos.x, pos.y);\n  }\n\n  function stopDraw() {\n    isDrawing = false;\n    ctx.beginPath();\n  }\n\n  canvas.addEventListener('mousedown', startDraw);\n  canvas.addEventListener('mousemove', draw);\n  canvas.addEventListener('mouseup', stopDraw);\n  canvas.addEventListener('mouseout', stopDraw);\n  canvas.addEventListener('touchstart', function(e) { e.preventDefault(); startDraw(e); }, { passive: false });\n  canvas.addEventListener('touchmove', function(e) { e.preventDefault(); draw(e); }, { passive: false });\n  canvas.addEventListener('touchend', stopDraw);\n\n\n  \/\/ --- IMAGE GENERATION PORTFOLIO DOWNLOAD ---\n  document.getElementById('btn-download-report').addEventListener('click', function() {\n    var reasoning = document.getElementById('y5-passphrase-reasoning').value.trim() || 'No explanation provided.';\n    var pText = finalCombinedPassword || \"None Created\";\n    var pTime = finalCombinedCrackTime || \"N\/A\";\n    var incident = state.response || 'No incident response provided.';\n\n    \/\/ Create hidden canvas to stitch text and image together\n    var expCanvas = document.createElement('canvas');\n    expCanvas.width = 800;\n    expCanvas.height = 1500; \/\/ Adjusted height now that the first section is removed\n    var ctxExp = expCanvas.getContext('2d');\n\n    \/\/ Fill white background\n    ctxExp.fillStyle = '#ffffff';\n    ctxExp.fillRect(0, 0, expCanvas.width, expCanvas.height);\n\n    \/\/ Text wrapping function\n    function wrapText(context, text, x, y, maxWidth, lineHeight) {\n      var words = text.split(' ');\n      var line = '';\n      for (var n = 0; n != words.length; n++) {\n        var testLine = line + words[n] + ' ';\n        var metrics = context.measureText(testLine);\n        if (metrics.width > maxWidth && n > 0) {\n          context.fillText(line, x, y);\n          line = words[n] + ' ';\n          y += lineHeight;\n        } else {\n          line = testLine;\n        }\n      }\n      context.fillText(line, x, y);\n      return y + lineHeight;\n    }\n\n    var startY = 60;\n\n    \/\/ Draw Headers and Text\n    ctxExp.fillStyle = '#0073aa';\n    ctxExp.font = 'bold 32px Arial';\n    ctxExp.fillText('Digital Security & Pizza Portfolio', 40, startY);\n    startY += 80;\n\n    ctxExp.fillStyle = '#e65100';\n    ctxExp.font = 'bold 24px Arial';\n    ctxExp.fillText('Part A: Passphrase Creation', 40, startY);\n    startY += 45;\n\n    ctxExp.fillStyle = '#c62828';\n    ctxExp.font = 'bold 18px Arial';\n    ctxExp.fillText('Generated 3-Word Passphrase: ' + pText, 40, startY); startY += 35;\n    ctxExp.fillStyle = '#333333';\n    ctxExp.fillText('Security Assessment: ' + pTime, 40, startY); startY += 50;\n\n    ctxExp.fillText('Reasoning (Why it works):', 40, startY); startY += 30;\n    ctxExp.font = 'normal 18px Arial';\n    startY = wrapText(ctxExp, reasoning, 40, startY, 720, 26);\n    startY += 40;\n\n    ctxExp.fillStyle = '#e65100';\n    ctxExp.font = 'bold 24px Arial';\n    ctxExp.fillText('Part B: Incident Response', 40, startY);\n    startY += 45;\n\n    ctxExp.fillStyle = '#333333';\n    ctxExp.font = 'normal 18px Arial';\n    startY = wrapText(ctxExp, incident, 40, startY, 720, 26);\n    startY += 50;\n\n    ctxExp.fillStyle = '#e65100';\n    ctxExp.font = 'bold 24px Arial';\n    ctxExp.fillText('Part C: Pizza Identity Artwork', 40, startY);\n    startY += 45;\n\n    \/\/ Draw the Pizza Canvas onto the export canvas\n    ctxExp.drawImage(canvas, 50, startY, 700, 700);\n\n    \/\/ Trigger PNG Download\n    var dataURL = expCanvas.toDataURL('image\/png');\n    var a = document.createElement('a');\n    a.href = dataURL;\n    a.download = 'Year5_Pizza_Security_Portfolio.png';\n    document.body.appendChild(a);\n    a.click();\n    document.body.removeChild(a);\n\n    alert(\"Your Portfolio Image has been downloaded! You can now paste this PNG directly into your Word Document.\");\n  });\n\n});\n\/* ]]> *\/\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to Year 5 Computing! \ud83d\udd10\ud83d\udcbb Today we are kicking off our unit on Internet Safety and Encryption! You will learn how to operate ICT&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/ndovu.org.uk\/cs\/yr5-term-1-1-internet-safety-encryption\/\">Continue Reading<span class=\"screen-reader-text\">Yr5 Term 1.1 Internet Safety &amp; Encryption<\/span><\/a><\/div>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-368","post","type-post","status-publish","format-standard","hentry","category-year5","entry"],"_links":{"self":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/comments?post=368"}],"version-history":[{"count":12,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/368\/revisions"}],"predecessor-version":[{"id":501,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/368\/revisions\/501"}],"wp:attachment":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/media?parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/categories?post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/tags?post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}