{"id":316,"date":"2026-01-10T21:18:10","date_gmt":"2026-01-10T21:18:10","guid":{"rendered":"https:\/\/plentylearning.com\/espanol\/?page_id=316"},"modified":"2026-01-10T21:32:53","modified_gmt":"2026-01-10T21:32:53","slug":"module-a2-2-expanding-expression","status":"publish","type":"page","link":"https:\/\/plentylearning.com\/espanol\/module-a2-2-expanding-expression\/","title":{"rendered":"Module A2.2 \u2013 Expanding Expression"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" \/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\/>\n  <title>Module A2.2 \u2013 Expanding Expression (PRO+)<\/title>\n  <style>\n    :root{\n      --brand:#5a2ea6; \/* Replace with Plenty Learning HEX *\/\n      --bg:#0b0b10;\n      --text:#f3f3f7;\n      --muted:#c8c8d6;\n      --card: rgba(18,18,33,.9);\n      --border: rgba(255,255,255,.12);\n      --ok:#18a558;\n      --bad:#d94848;\n      --warn:#f0b429;\n    }\n    body{\n      margin:0;\n      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;\n      background: linear-gradient(180deg, rgba(90,46,166,.12), transparent 42%), var(--bg);\n      color:var(--text);\n    }\n    .wrap{max-width: 980px; margin: 0 auto; padding: 20px;}\n    .topbar{\n      display:flex; gap:14px; align-items:center; justify-content:space-between;\n      padding:16px 18px; border:1px solid var(--border); background: rgba(18,18,33,.85);\n      border-radius:18px; backdrop-filter: blur(8px);\n    }\n    .brand{display:flex; align-items:center; gap:12px;}\n    .logo{\n      width:42px; height:42px; border-radius:12px;\n      background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), rgba(255,255,255,.06)), var(--brand);\n      display:grid; place-items:center; font-weight:700;\n    }\n    h1{margin:0; font-size:16px; line-height:1.2;}\n    .subtitle{margin:2px 0 0; font-size:12px; color:var(--muted);}\n    .pill{\n      font-size:12px; padding:8px 10px; border-radius:999px;\n      border:1px solid var(--border); background: rgba(255,255,255,.04);\n      color:var(--muted);\n      white-space:nowrap;\n    }\n    .card{\n      margin-top:14px;\n      border:1px solid var(--border);\n      background: var(--card);\n      border-radius:18px;\n      padding:16px;\n    }\n    .muted{color:var(--muted); font-size:13px; line-height:1.5;}\n    .note{border-left: 4px solid var(--brand); padding:10px 12px; background: rgba(90,46,166,.12); border-radius:12px; margin-top:10px;}\n    .scorebox{\n      display:flex; gap:12px; align-items:flex-start; justify-content:space-between;\n      border:1px solid var(--border); border-radius:16px; padding:12px;\n      background: rgba(255,255,255,.03);\n      margin-top:10px;\n    }\n    .scorebox strong{font-size:16px;}\n    .btns{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px;}\n    button{\n      border:1px solid var(--border); background: rgba(255,255,255,.06); color:var(--text);\n      padding:10px 12px; border-radius:12px; cursor:pointer; font-weight:600;\n    }\n    button.primary{background: var(--brand); border-color: rgba(255,255,255,.18);}\n    button.ghost{background: rgba(255,255,255,.03);}\n    button:active{transform: translateY(1px);}\n    .controls{\n      display:flex; gap:10px; flex-wrap:wrap; align-items:center;\n    }\n    .control{\n      display:flex; gap:8px; align-items:center;\n      border:1px solid var(--border); background: rgba(255,255,255,.03);\n      padding:8px 10px; border-radius:12px;\n    }\n    .control label{font-size:12px; color:var(--muted);}\n    .control select{\n      width:auto; padding:8px 10px; border-radius:10px;\n      border:1px solid var(--border); background: rgba(0,0,0,.25); color:var(--text);\n      outline:none;\n      font-size:12px;\n    }\n    .q{\n      padding:12px; border:1px solid var(--border); border-radius:14px;\n      background: rgba(255,255,255,.03); margin:12px 0;\n    }\n    .qhead{\n      display:flex; gap:10px; align-items:flex-start; justify-content:space-between;\n      margin-bottom:8px;\n    }\n    .qmeta{display:flex; gap:8px; align-items:center; flex-wrap:wrap;}\n    .badge{\n      font-size:11px; color:var(--muted);\n      border:1px solid var(--border); padding:3px 8px; border-radius:999px;\n      background: rgba(255,255,255,.03);\n      white-space:nowrap;\n    }\n    label{display:block; margin:6px 0; font-size:13px;}\n    select.answer, input[type=\"text\"]{\n      width:100%; padding:10px 12px; border-radius:12px;\n      border:1px solid var(--border); background: rgba(0,0,0,.25); color:var(--text);\n      outline:none;\n    }\n    .feedback{margin-top:8px; font-size:13px; line-height:1.35;}\n    .ok{color: var(--ok);}\n    .bad{color: var(--bad);}\n    .warn{color: var(--warn);}\n    .tiny{font-size:12px; color:var(--muted);}\n    .rulebox{\n      display:none;\n      margin-top:10px;\n      padding:10px 12px;\n      border:1px solid var(--border);\n      border-radius:12px;\n      background: rgba(0,0,0,.22);\n    }\n    .rulebox.show{display:block;}\n    .rulebox b{color:var(--text);}\n    .footer{color:var(--muted); font-size:12px; text-align:center; padding:10px;}\n  <\/style>\n<\/head>\n<body>\n  <div class=\"wrap\">\n    <div class=\"topbar\">\n      <div class=\"brand\">\n        <div class=\"logo\">PL<\/div>\n        <div>\n          <h1>Module A2.2 \u2013 Expanding Expression (PRO+)<\/h1>\n          <div class=\"subtitle\">Plenty Learning \u2013 Espa\u00f1ol | by TeacherJM<\/div>\n        <\/div>\n      <\/div>\n      <div class=\"pill\">Level selector \u2022 Show rule \u2022 Retry incorrect<\/div>\n    <\/div>\n\n    <section class=\"card\" id=\"scoreCard\">\n      <h2 style=\"margin:0 0 8px;\">Instructions (English)<\/h2>\n      <div class=\"muted\">\n        Choose a level mode, answer 10 items, and click <b>Check<\/b>.<br\/>\n        Use <b>Show rule<\/b> to preview a short rule before answering.<br\/>\n        After checking, click <b>Retry incorrect only<\/b> to practice only what you missed.\n      <\/div>\n\n      <div class=\"note muted\">\n        Topics: <b>Comparatives &#038; Superlatives<\/b> \u2022 <b>Reflexive Verbs<\/b> \u2022 <b>Object Pronouns<\/b> \u2022 <b>Ir a \/ Tener que<\/b>\n      <\/div>\n\n      <div class=\"scorebox\">\n        <div>\n          <strong id=\"score\">0<\/strong> \/ <span id=\"max\">10<\/span>\n          <div class=\"tiny\" id=\"msg\">Answer all items and click \u201cCheck\u201d.<\/div>\n          <div class=\"tiny\">Bank size: <span id=\"bankSize\">0<\/span> items<\/div>\n        <\/div>\n\n        <div style=\"min-width: 320px;\">\n          <div class=\"controls\">\n            <div class=\"control\">\n              <label for=\"mode\">Mode<\/label>\n              <select id=\"mode\" onchange=\"newSet()\">\n                <option value=\"A2\">A2 (easy)<\/option>\n                <option value=\"A2PLUS\">A2+ (challenge)<\/option>\n                <option value=\"MIXED\" selected>Mixed (A2 \u2192 A2+)<\/option>\n              <\/select>\n            <\/div>\n          <\/div>\n\n          <div class=\"btns\" style=\"margin-top:10px;\">\n            <button class=\"primary\" onclick=\"checkQuiz()\">Check<\/button>\n            <button class=\"ghost\" onclick=\"retryIncorrect()\">Retry incorrect only<\/button>\n            <button onclick=\"newSet()\">New set<\/button>\n            <button onclick=\"resetAnswers()\">Reset<\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n    <\/section>\n\n    <section class=\"card\">\n      <h2 style=\"margin:0 0 8px;\">Random Activities (Espa\u00f1ol)<\/h2>\n      <div id=\"quiz\"><\/div>\n      <div class=\"footer\">\u00a9 Plenty Learning \u2013 Espa\u00f1ol | by TeacherJM<\/div>\n    <\/section>\n  <\/div>\n\n  <script>\n    \/\/ ---------- Helpers ----------\n    function normalize(str){\n      return (str || \"\")\n        .toString()\n        .trim()\n        .toLowerCase()\n        .normalize(\"NFD\").replace(\/[\\u0300-\\u036f]\/g, \"\");\n    }\n    function shuffle(arr){\n      const a = arr.slice();\n      for(let i=a.length-1;i>0;i--){\n        const j = Math.floor(Math.random()*(i+1));\n        [a[i], a[j]] = [a[j], a[i]];\n      }\n      return a;\n    }\n\n    \/\/ ---------- Rules ----------\n    function ruleFor(topic){\n      const rules = {\n        \"Comparatives\": \"Comparative: <b>m\u00e1s\/menos + adjective + que<\/b>. Equality: <b>tan + adjective + como<\/b>.\",\n        \"Superlatives\": \"Superlative: <b>el\/la\/los\/las m\u00e1s + adjective<\/b>.\",\n        \"Irregular\": \"Irregular comparatives: <b>mejor<\/b>, <b>peor<\/b>, <b>mayor<\/b>, <b>menor<\/b>.\",\n        \"Reflexive\": \"Reflexive: <b>me\/te\/se\/nos\/se + verb<\/b>. Example: me levanto \/ te llamas.\",\n        \"Object Pronouns\": \"Direct: <b>lo\/la\/los\/las<\/b>. Indirect: <b>me\/te\/le\/nos\/les<\/b>. Usually before the verb.\",\n        \"Periphrastic\": \"Plans: <b>ir a + infinitive<\/b>. Obligation: <b>tener que + infinitive<\/b>.\",\n        \"Mixed\": \"Identify the pattern (comparison \/ reflexive \/ pronoun \/ plan vs obligation).\"\n      };\n      return rules[topic] || \"Keep it simple and accurate.\";\n    }\n\n    \/\/ ---------- Bank (same as previous PRO version; keep expanding here) ----------\n    const BANK = [\n      {topic:\"Comparatives\", difficulty:1, type:\"mcq\", prompt:\"Mi auto es ______ r\u00e1pido que tu auto.\", options:[\"m\u00e1s\",\"tan\",\"menos\"], answer:\"m\u00e1s\"},\n      {topic:\"Comparatives\", difficulty:1, type:\"mcq\", prompt:\"Este caf\u00e9 es ______ bueno como el de ayer.\", options:[\"tan\",\"m\u00e1s\",\"peor\"], answer:\"tan\"},\n      {topic:\"Comparatives\", difficulty:1, type:\"text\", prompt:\"Completa: Mi casa es ____ grande que tu casa. (m\u00e1s\/menos)\", answer:\"m\u00e1s\"},\n      {topic:\"Comparatives\", difficulty:1, type:\"mcq\", prompt:\"Mi mochila es ______ pesada que la tuya.\", options:[\"menos\",\"m\u00e1s\",\"tan\"], answer:\"m\u00e1s\"},\n      {topic:\"Comparatives\", difficulty:2, type:\"mcq\", prompt:\"Hoy estoy ______ cansado que ayer.\", options:[\"m\u00e1s\",\"tan\",\"mayor\"], answer:\"m\u00e1s\"},\n      {topic:\"Comparatives\", difficulty:2, type:\"text\", prompt:\"Completa: Este ejercicio es ____ f\u00e1cil que el anterior. (m\u00e1s\/menos)\", answer:\"m\u00e1s\"},\n      {topic:\"Comparatives\", difficulty:2, type:\"mcq\", prompt:\"Mi ciudad es ______ grande que Valpara\u00edso.\", options:[\"m\u00e1s\",\"tan\",\"menor\"], answer:\"m\u00e1s\"},\n      {topic:\"Comparatives\", difficulty:3, type:\"mcq\", prompt:\"Mi espa\u00f1ol es ______ fluido que antes.\", options:[\"m\u00e1s\",\"tan\",\"menos\"], answer:\"m\u00e1s\"},\n      {topic:\"Comparatives\", difficulty:3, type:\"text\", prompt:\"Completa: Esta explicaci\u00f3n es ____ clara que la otra. (m\u00e1s\/menos)\", answer:\"m\u00e1s\"},\n\n      {topic:\"Superlatives\", difficulty:1, type:\"mcq\", prompt:\"Santiago es la ciudad ______ grande de Chile.\", options:[\"m\u00e1s\",\"tan\",\"menor\"], answer:\"m\u00e1s\"},\n      {topic:\"Superlatives\", difficulty:1, type:\"mcq\", prompt:\"Ella es la estudiante ______ aplicada de la clase.\", options:[\"m\u00e1s\",\"tan\",\"menor\"], answer:\"m\u00e1s\"},\n      {topic:\"Superlatives\", difficulty:2, type:\"text\", prompt:\"Completa: Este es el libro ____ interesante del curso. (m\u00e1s\/menos)\", answer:\"m\u00e1s\"},\n      {topic:\"Superlatives\", difficulty:2, type:\"mcq\", prompt:\"Ese es el restaurante ______ famoso del barrio.\", options:[\"m\u00e1s\",\"tan\",\"peor\"], answer:\"m\u00e1s\"},\n      {topic:\"Superlatives\", difficulty:3, type:\"text\", prompt:\"Completa: Esta es la parte ____ dif\u00edcil del examen. (m\u00e1s\/menos)\", answer:\"m\u00e1s\"},\n\n      {topic:\"Irregular\", difficulty:1, type:\"mcq\", prompt:\"Este hotel es ______ que el anterior. (better)\", options:[\"mejor\",\"m\u00e1s bueno\",\"peor\"], answer:\"mejor\"},\n      {topic:\"Irregular\", difficulty:1, type:\"mcq\", prompt:\"Hoy me siento ______ que ayer. (worse)\", options:[\"peor\",\"m\u00e1s malo\",\"mejor\"], answer:\"peor\"},\n      {topic:\"Irregular\", difficulty:2, type:\"mcq\", prompt:\"Mi hermano es ______ que yo. (older)\", options:[\"mayor\",\"mejor\",\"menor\"], answer:\"mayor\"},\n      {topic:\"Irregular\", difficulty:2, type:\"mcq\", prompt:\"Mi hermana es ______ que yo. (younger)\", options:[\"menor\",\"mayor\",\"mejor\"], answer:\"menor\"},\n      {topic:\"Irregular\", difficulty:3, type:\"text\", prompt:\"Completa: Esta soluci\u00f3n es ____ que la anterior. (better)\", answer:\"mejor\"},\n\n      {topic:\"Reflexive\", difficulty:1, type:\"text\", prompt:\"Yo ______ a las 6:30. (levantarse)\", answer:\"me levanto\"},\n      {topic:\"Reflexive\", difficulty:1, type:\"text\", prompt:\"\u00bfC\u00f3mo ______ t\u00fa? (llamarse)\", answer:\"te llamas\"},\n      {topic:\"Reflexive\", difficulty:1, type:\"mcq\", prompt:\"Ellos ______ muy temprano. (levantarse)\", options:[\"se levantan\",\"les levantan\",\"los levantan\"], answer:\"se levantan\"},\n      {topic:\"Reflexive\", difficulty:1, type:\"text\", prompt:\"Nosotros ______ tarde los s\u00e1bados. (levantarse)\", answer:\"nos levantamos\"},\n      {topic:\"Reflexive\", difficulty:2, type:\"mcq\", prompt:\"Ella ______ Ana. (llamarse)\", options:[\"se llama\",\"la llama\",\"le llama\"], answer:\"se llama\"},\n      {topic:\"Reflexive\", difficulty:2, type:\"text\", prompt:\"Yo ______ las manos antes de comer. (lavarse)\", answer:\"me lavo\"},\n      {topic:\"Reflexive\", difficulty:2, type:\"mcq\", prompt:\"T\u00fa ______ a las 7:00. (despertarse)\", options:[\"te despiertas\",\"te despierta\",\"se despiertas\"], answer:\"te despiertas\"},\n      {topic:\"Reflexive\", difficulty:3, type:\"text\", prompt:\"Completa: Despu\u00e9s de correr, nosotros ______. (ducharse)\", answer:\"nos duchamos\"},\n      {topic:\"Reflexive\", difficulty:3, type:\"mcq\", prompt:\"Ustedes ______ tarde hoy. (acostarse)\", options:[\"se acuestan\",\"se acostan\",\"los acuestan\"], answer:\"se acuestan\"},\n\n      {topic:\"Object Pronouns\", difficulty:1, type:\"mcq\", prompt:\"Veo la pel\u00edcula \u2192 ______ veo.\", options:[\"la\",\"lo\",\"le\"], answer:\"la\"},\n      {topic:\"Object Pronouns\", difficulty:1, type:\"mcq\", prompt:\"Compro los libros \u2192 ______ compro.\", options:[\"los\",\"les\",\"la\"], answer:\"los\"},\n      {topic:\"Object Pronouns\", difficulty:1, type:\"mcq\", prompt:\"Doy el regalo a Juan \u2192 ______ doy el regalo.\", options:[\"le\",\"lo\",\"la\"], answer:\"le\"},\n      {topic:\"Object Pronouns\", difficulty:1, type:\"text\", prompt:\"Sustituye: \u2018Tengo el ticket\u2019 \u2192 ______ tengo. (lo\/la)\", answer:\"lo\"},\n      {topic:\"Object Pronouns\", difficulty:2, type:\"mcq\", prompt:\"Veo a mis amigos \u2192 ______ veo.\", options:[\"los\",\"les\",\"la\"], answer:\"los\"},\n      {topic:\"Object Pronouns\", difficulty:2, type:\"mcq\", prompt:\"Compro la comida \u2192 ______ compro.\", options:[\"la\",\"lo\",\"le\"], answer:\"la\"},\n      {topic:\"Object Pronouns\", difficulty:2, type:\"text\", prompt:\"Sustituye: \u2018Necesito el documento\u2019 \u2192 ______ necesito.\", answer:\"lo\"},\n      {topic:\"Object Pronouns\", difficulty:3, type:\"mcq\", prompt:\"Doy el caf\u00e9 a Mar\u00eda \u2192 ______ doy el caf\u00e9.\", options:[\"le\",\"la\",\"lo\"], answer:\"le\"},\n      {topic:\"Object Pronouns\", difficulty:3, type:\"text\", prompt:\"Sustituye: \u2018Veo la foto\u2019 \u2192 ______ veo.\", answer:\"la\"},\n\n      {topic:\"Periphrastic\", difficulty:1, type:\"mcq\", prompt:\"Ma\u00f1ana ______ estudiar m\u00e1s. (plan)\", options:[\"voy a\",\"tengo que\"], answer:\"voy a\"},\n      {topic:\"Periphrastic\", difficulty:1, type:\"mcq\", prompt:\"Hoy ______ trabajar hasta tarde. (obligation)\", options:[\"voy a\",\"tengo que\"], answer:\"tengo que\"},\n      {topic:\"Periphrastic\", difficulty:1, type:\"text\", prompt:\"Completa: Esta noche ______ cocinar pasta. (ir a)\", answer:\"voy a\"},\n      {topic:\"Periphrastic\", difficulty:1, type:\"text\", prompt:\"Completa: ______ hacer la tarea hoy. (tener que, yo)\", answer:\"tengo que\"},\n      {topic:\"Periphrastic\", difficulty:2, type:\"mcq\", prompt:\"Nosotros ______ salir temprano ma\u00f1ana. (plan)\", options:[\"vamos a\",\"tenemos que\"], answer:\"vamos a\"},\n      {topic:\"Periphrastic\", difficulty:2, type:\"mcq\", prompt:\"Ellos ______ pagar ahora. (obligation)\", options:[\"tienen que\",\"van a\"], answer:\"tienen que\"},\n      {topic:\"Periphrastic\", difficulty:2, type:\"text\", prompt:\"Completa: T\u00fa ______ estudiar m\u00e1s para el examen. (tener que)\", answer:\"tienes que\"},\n      {topic:\"Periphrastic\", difficulty:3, type:\"mcq\", prompt:\"Yo ______ ir al m\u00e9dico ma\u00f1ana. (plan)\", options:[\"voy a\",\"tengo que\"], answer:\"voy a\"},\n      {topic:\"Periphrastic\", difficulty:3, type:\"text\", prompt:\"Completa: Hoy ______ llamar a mi jefe. (tener que, yo)\", answer:\"tengo que\"},\n\n      {topic:\"Mixed\", difficulty:1, type:\"mcq\", prompt:\"Este ejercicio es ______ dif\u00edcil que el anterior.\", options:[\"m\u00e1s\",\"tan\",\"menor\"], answer:\"m\u00e1s\"},\n      {topic:\"Mixed\", difficulty:1, type:\"mcq\", prompt:\"Yo ______ al gimnasio ma\u00f1ana. (plan)\", options:[\"voy a ir\",\"tengo que ir\"], answer:\"voy a ir\"},\n      {topic:\"Mixed\", difficulty:2, type:\"mcq\", prompt:\"Compro la entrada \u2192 ______ compro.\", options:[\"la\",\"le\",\"los\"], answer:\"la\"},\n      {topic:\"Mixed\", difficulty:3, type:\"mcq\", prompt:\"Hoy tengo mucho trabajo: ______ terminar todo.\", options:[\"tengo que\",\"voy a\",\"tan\"], answer:\"tengo que\"},\n      {topic:\"Mixed\", difficulty:3, type:\"mcq\", prompt:\"Este es el d\u00eda ______ largo de la semana.\", options:[\"m\u00e1s\",\"tan\",\"mejor\"], answer:\"m\u00e1s\"}\n    ];\n\n    \/\/ ---------- State ----------\n    const QUIZ_SIZE = 10;\n    let CURRENT = [];\n    let LAST_RESULTS = [];\n\n    function getMode(){\n      return document.getElementById(\"mode\").value; \/\/ A2 | A2PLUS | MIXED\n    }\n\n    \/\/ mode filtering\n    function bankByMode(pool){\n      const mode = getMode();\n      if(mode === \"A2\") return pool.filter(q => q.difficulty === 1);\n      if(mode === \"A2PLUS\") return pool.filter(q => q.difficulty >= 2);\n      return pool; \/\/ MIXED\n    }\n\n    function pickSet(excludeSet = []){\n      const excludeKey = new Set(excludeSet.map(q => q.prompt + \"|\" + q.answer));\n      let pool = BANK.filter(q => !excludeKey.has(q.prompt + \"|\" + q.answer));\n      pool = bankByMode(pool);\n\n      const mode = getMode();\n\n      const byDiff = (d) => pool.filter(q => q.difficulty === d);\n      const takeN = (arr, n) => shuffle(arr).slice(0, n);\n\n      let chosen = [];\n\n      if(mode === \"A2\"){\n        chosen = takeN(byDiff(1), QUIZ_SIZE);\n      } else if(mode === \"A2PLUS\"){\n        \/\/ Prefer 6 medium + 4 hard (if available)\n        chosen = chosen.concat(takeN(byDiff(2), 6));\n        chosen = chosen.concat(takeN(byDiff(3), 4));\n        if(chosen.length < QUIZ_SIZE){\n          const remaining = shuffle(pool.filter(q => !chosen.includes(q)));\n          chosen = chosen.concat(remaining.slice(0, QUIZ_SIZE - chosen.length));\n        }\n      } else {\n        \/\/ MIXED: 5 easy, 3 medium, 2 hard\n        chosen = chosen.concat(takeN(byDiff(1), 5));\n        chosen = chosen.concat(takeN(byDiff(2), 3));\n        chosen = chosen.concat(takeN(byDiff(3), 2));\n        if(chosen.length < QUIZ_SIZE){\n          const remaining = shuffle(pool.filter(q => !chosen.includes(q)));\n          chosen = chosen.concat(remaining.slice(0, QUIZ_SIZE - chosen.length));\n        }\n      }\n\n      \/\/ Ensure topic coverage (best effort) when MIXED \/ A2PLUS\n      const must = [\"Comparatives\",\"Reflexive\",\"Object Pronouns\",\"Periphrastic\"];\n      if(mode !== \"A2\"){\n        for(const t of must){\n          if(!chosen.some(q => q.topic === t)){\n            const candidate = shuffle(pool.filter(q => q.topic === t && !chosen.includes(q)))[0];\n            if(candidate){\n              const idx = chosen.findIndex(q => q.topic === \"Mixed\");\n              if(idx >= 0) chosen[idx] = candidate;\n            }\n          }\n        }\n      }\n\n      \/\/ If pool is too small (e.g., A2PLUS but not enough items), fallback to full pool\n      if(chosen.length < QUIZ_SIZE){\n        const fallback = shuffle(bankByMode(BANK).filter(q => !chosen.includes(q)));\n        chosen = chosen.concat(fallback.slice(0, QUIZ_SIZE - chosen.length));\n      }\n\n      return shuffle(chosen).slice(0, QUIZ_SIZE);\n    }\n\n    \/\/ ---------- Render ----------\n    function render(){\n      document.getElementById(\"bankSize\").textContent = BANK.length;\n\n      const quiz = document.getElementById(\"quiz\");\n      quiz.innerHTML = \"\";\n      LAST_RESULTS = new Array(CURRENT.length).fill(false);\n\n      CURRENT.forEach((q, idx) => {\n        const div = document.createElement(\"div\");\n        div.className = \"q\";\n        div.innerHTML = `\n          <div class=\"qhead\">\n            <div><b>${idx+1})<\/b> ${q.prompt}<\/div>\n            <div class=\"qmeta\">\n              <span class=\"badge\">${q.topic}<\/span>\n              <span class=\"badge\">${q.difficulty === 1 ? \"A2\" : \"A2+\"}<\/span>\n              <button class=\"ghost\" type=\"button\" data-rule-btn=\"${idx}\">Show rule<\/button>\n            <\/div>\n          <\/div>\n\n          <div class=\"inputArea\"><\/div>\n\n          <div class=\"rulebox\" id=\"rule-${idx}\">\n            <div class=\"tiny\"><b>Rule (English):<\/b> ${ruleFor(q.topic)}<\/div>\n          <\/div>\n\n          <div class=\"feedback\" id=\"fb-${idx}\"><\/div>\n        `;\n\n        const inputArea = div.querySelector(\".inputArea\");\n        if(q.type === \"mcq\"){\n          const sel = document.createElement(\"select\");\n          sel.className = \"answer\";\n          sel.setAttribute(\"data-answer\", q.answer);\n          sel.setAttribute(\"data-kind\", \"mcq\");\n          sel.setAttribute(\"data-index\", idx);\n          sel.innerHTML = `<option value=\"\">Choose\u2026<\/option>` + q.options.map(o => `<option>${o}<\/option>`).join(\"\");\n          inputArea.appendChild(sel);\n        } else {\n          const inp = document.createElement(\"input\");\n          inp.type = \"text\";\n          inp.placeholder = \"Type your answer\u2026\";\n          inp.setAttribute(\"data-answer\", q.answer);\n          inp.setAttribute(\"data-kind\", \"text\");\n          inp.setAttribute(\"data-index\", idx);\n          inputArea.appendChild(inp);\n        }\n\n        quiz.appendChild(div);\n      });\n\n      document.querySelectorAll(\"[data-rule-btn]\").forEach(btn => {\n        btn.addEventListener(\"click\", () => {\n          const idx = btn.getAttribute(\"data-rule-btn\");\n          const box = document.getElementById(`rule-${idx}`);\n          const showing = box.classList.contains(\"show\");\n          box.classList.toggle(\"show\", !showing);\n          btn.textContent = showing ? \"Show rule\" : \"Hide rule\";\n        });\n      });\n\n      document.getElementById(\"max\").textContent = CURRENT.length;\n      document.getElementById(\"score\").textContent = \"0\";\n      document.getElementById(\"msg\").textContent = `Mode: ${getMode()} \u2022 Answer all items and click \u201cCheck\u201d.`;\n    }\n\n    function newSet(){\n      CURRENT = pickSet();\n      render();\n      window.scrollTo({top:0, behavior:\"smooth\"});\n    }\n\n    \/\/ ---------- Check ----------\n    function checkQuiz(){\n      const inputs = Array.from(document.querySelectorAll(\"#quiz [data-answer]\"));\n      let score = 0;\n      let answered = 0;\n\n      inputs.forEach((el) => {\n        const idx = parseInt(el.getAttribute(\"data-index\"), 10);\n        const answer = el.getAttribute(\"data-answer\");\n        const kind = el.getAttribute(\"data-kind\");\n        const qObj = CURRENT[idx];\n        const fb = document.getElementById(`fb-${idx}`);\n\n        const val = (kind === \"mcq\") ? el.value : el.value;\n        if(val && val.trim() !== \"\") answered++;\n\n        const ok = normalize(val) === normalize(answer);\n        LAST_RESULTS[idx] = ok;\n\n        if(!val){\n          fb.className = \"feedback warn\";\n          fb.textContent = \"Incomplete: choose\/type an answer.\";\n        } else if(ok){\n          fb.className = \"feedback ok\";\n          fb.textContent = \"Correct \u2705\";\n          score++;\n        } else {\n          fb.className = \"feedback bad\";\n          const exp =\n            qObj.topic === \"Comparatives\" ? \"Use \u2018m\u00e1s\/menos + adjective + que\u2019 or \u2018tan\u2026 como\u2019 for equality.\" :\n            qObj.topic === \"Superlatives\" ? \"Use \u2018el\/la\/los\/las m\u00e1s + adjective\u2019 for superlatives.\" :\n            qObj.topic === \"Irregular\" ? \"Use irregular forms (mejor\/peor\/mayor\/menor) instead of \u2018m\u00e1s + adjective\u2019.\" :\n            qObj.topic === \"Reflexive\" ? \"Reflexive verbs need a reflexive pronoun (me\/te\/se\/nos\/se).\" :\n            qObj.topic === \"Object Pronouns\" ? \"Replace the object with lo\/la\/los\/las (direct) or le\/les (indirect).\" :\n            qObj.topic === \"Periphrastic\" ? \"Use \u2018ir a\u2019 for plans and \u2018tener que\u2019 for obligation.\" :\n            \"Check meaning first, then pick the structure.\";\n          fb.innerHTML = `Not correct \u274c \u2014 Suggested answer: <b>\u201c${answer}\u201d<\/b>.<br\/><span class=\"tiny\">${exp}<\/span>`;\n        }\n      });\n\n      document.getElementById(\"score\").textContent = score;\n\n      const max = inputs.length || QUIZ_SIZE;\n      const pct = max ? (score \/ max) : 0;\n      const msg = document.getElementById(\"msg\");\n\n      if(answered < max){\n        msg.textContent = `You answered ${answered}\/${max}. Complete all items for a full score.`;\n      } else if(pct >= 0.85){\n        msg.textContent = `Excellent \u2705 (${getMode()}) Try a new set for more practice.`;\n      } else if(pct >= 0.60){\n        msg.textContent = `Good \ud83d\udc4d (${getMode()}) Review rules, then retry incorrect only.`;\n      } else {\n        msg.textContent = `Keep practicing \ud83d\udd01 (${getMode()}) Retry incorrect only and focus on patterns.`;\n      }\n\n      document.getElementById(\"scoreCard\").scrollIntoView({behavior:\"smooth\", block:\"start\"});\n    }\n\n    \/\/ ---------- Retry incorrect only ----------\n    function retryIncorrect(){\n      if(!LAST_RESULTS || LAST_RESULTS.length === 0){\n        document.getElementById(\"msg\").textContent = \"First, click \u201cCheck\u201d to identify incorrect items.\";\n        return;\n      }\n\n      const incorrect = CURRENT.filter((q, i) => LAST_RESULTS[i] === false);\n\n      if(incorrect.length === 0){\n        document.getElementById(\"msg\").textContent = \"All correct \u2705 Click \u201cNew set\u201d for fresh practice.\";\n        return;\n      }\n\n      const fillCount = QUIZ_SIZE - incorrect.length;\n      const newOnes = pickSet(incorrect).slice(0, fillCount);\n\n      CURRENT = shuffle(incorrect.concat(newOnes)).slice(0, QUIZ_SIZE);\n      render();\n      document.getElementById(\"msg\").textContent = `Retry mode (${getMode()}): incorrect items kept + new items added to complete 10.`;\n      document.getElementById(\"scoreCard\").scrollIntoView({behavior:\"smooth\", block:\"start\"});\n    }\n\n    function resetAnswers(){\n      document.querySelectorAll(\"#quiz select.answer\").forEach(s => s.value = \"\");\n      document.querySelectorAll('#quiz input[type=\"text\"]').forEach(i => i.value = \"\");\n      document.querySelectorAll(\"#quiz .feedback\").forEach(fb => { fb.textContent=\"\"; fb.className=\"feedback\"; });\n      document.getElementById(\"score\").textContent = \"0\";\n      document.getElementById(\"msg\").textContent = `Reset done. Mode: ${getMode()}. Answer again and click \u201cCheck\u201d.`;\n      LAST_RESULTS = new Array(CURRENT.length).fill(false);\n    }\n\n    \/\/ Init\n    newSet();\n  <\/script>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Module A2.2 \u2013 Expanding Expression (PRO+) PL Module A2.2 \u2013 Expanding Expression (PRO+) Plenty Learning \u2013 Espa\u00f1ol | by TeacherJM Level selector \u2022 Show rule \u2022 Retry incorrect Instructions (English) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"class_list":["post-316","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":3,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages\/316\/revisions"}],"predecessor-version":[{"id":320,"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/pages\/316\/revisions\/320"}],"wp:attachment":[{"href":"https:\/\/plentylearning.com\/espanol\/wp-json\/wp\/v2\/media?parent=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}