{"id":1412,"date":"2025-11-30T16:09:50","date_gmt":"2025-11-30T16:09:50","guid":{"rendered":"https:\/\/clubvivremieux.com\/?page_id=1412"},"modified":"2025-11-30T16:10:15","modified_gmt":"2025-11-30T16:10:15","slug":"1412-2","status":"publish","type":"page","link":"https:\/\/clubvivremieux.com\/index.php\/1412-2\/","title":{"rendered":"Quiz \u2013 Apprendre \u00e0 apprendre"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"fr\">\n<head>\n  <meta charset=\"UTF-8\" \/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n  <title>Quiz \u2013 Apprendre \u00e0 apprendre<\/title>\n  <style>\n    body {\n      font-family: Arial, sans-serif;\n      max-width: 700px;\n      margin: 0 auto;\n      padding: 20px;\n      line-height: 1.6;\n    }\n    h1 { text-align: center; }\n    .question { margin-bottom: 20px; }\n    button {\n      padding: 10px 15px;\n      margin-top: 10px;\n      cursor: pointer;\n      border: none;\n      background: #4CAF50;\n      color: white;\n      border-radius: 5px;\n      font-size: 1rem;\n    }\n    #resultat {\n      margin-top: 20px;\n      font-size: 1.2rem;\n      font-weight: bold;\n    }\n  <\/style>\n<\/head>\n<body>\n  <h1>Quiz \u2013 Apprendre \u00e0 apprendre<\/h1>\n\n  <div id=\"quiz\"><\/div>\n  <button onclick=\"soumettre()\">Valider mes r\u00e9ponses<\/button>\n  <div id=\"resultat\"><\/div>\n\n  <script>\n    const questions = [\n      {\n        question: \"Quel est l'objectif principal d'\\\"apprendre \u00e0 apprendre\\\" ?\",\n        options: [\n          \"M\u00e9moriser le plus d'informations possible\",\n          \"D\u00e9velopper des m\u00e9thodes pour apprendre plus efficacement\",\n          \"Apprendre plus vite que tout le monde\",\n          \"\u00c9viter de faire des efforts\"\n        ],\n        answer: 1\n      },\n      {\n        question: \"Quelle technique am\u00e9liore la r\u00e9tention \u00e0 long terme ?\",\n        options: [\n          \"La relecture passive\",\n          \"Le surlignage intensif\",\n          \"La pratique du rappel (retrieval practice)\",\n          \"\u00c9couter de la musique en boucle\"\n        ],\n        answer: 2\n      },\n      {\n        question: \"Quel facteur est essentiel pour une motivation durable ?\",\n        options: [\n          \"La clart\u00e9 des objectifs\",\n          \"La quantit\u00e9 de caf\u00e9 consomm\u00e9e\",\n          \"Apprendre seulement quand on en a envie\",\n          \"Changer constamment de m\u00e9thode\"\n        ],\n        answer: 0\n      }\n    ];\n\n    const quizDiv = document.getElementById(\"quiz\");\n\n    questions.forEach((q, index) => {\n      const div = document.createElement(\"div\");\n      div.className = \"question\";\n\n      const title = document.createElement(\"p\");\n      title.textContent = (index + 1) + \". \" + q.question;\n      div.appendChild(title);\n\n      q.options.forEach((opt, i) => {\n        const label = document.createElement(\"label\");\n        const radio = document.createElement(\"input\");\n        radio.type = \"radio\";\n        radio.name = \"q\" + index;\n        radio.value = i;\n        label.appendChild(radio);\n        label.appendChild(document.createTextNode(\" \" + opt));\n        div.appendChild(label);\n        div.appendChild(document.createElement(\"br\"));\n      });\n\n      quizDiv.appendChild(div);\n    });\n\n    function soumettre() {\n      let score = 0;\n\n      questions.forEach((q, index) => {\n        const radios = document.getElementsByName(\"q\" + index);\n        radios.forEach(r => {\n          if (r.checked && parseInt(r.value) === q.answer) score++;\n        });\n      });\n\n      const resultat = document.getElementById(\"resultat\");\n      resultat.textContent = `Votre score : ${score} \/ ${questions.length}`;\n    }\n  <\/script>\n  <script>\n    \/* --- Nouveau syst\u00e8me de niveaux et animation du score --- *\/\n\n    let niveau = 1;\n\n    function animerScore(finalScore, total) {\n      let cpt = 0;\n      const resultat = document.getElementById(\"resultat\");\n      const interval = setInterval(() => {\n        resultat.textContent = `Votre score : ${cpt} \/ ${total}`;\n        cpt++;\n        if (cpt > finalScore) clearInterval(interval);\n      }, 80);\n    }\n\n    function afficherNiveau() {\n      const txt = document.createElement(\"h2\");\n      txt.textContent = `Niveau ${niveau}`;\n      quizDiv.prepend(txt);\n    }\n\n    afficherNiveau();\n\n    const originalSoumettre = soumettre;\n    function soumettre() {\n      let score = 0;\n\n      questions.forEach((q, index) => {\n        const radios = document.getElementsByName(\"q\" + index);\n        radios.forEach(r => {\n          if (r.checked && parseInt(r.value) === q.answer) score++;\n        });\n      });\n\n      animerScore(score, questions.length);\n\n      if (score === questions.length) {\n        niveau++;\n        alert(\"F\u00e9licitations ! Vous passez au niveau suivant !\");\n      } else {\n        alert(\"Essayez encore pour monter de niveau !\");\n      }\n    }\n  <\/script>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Quiz \u2013 Apprendre \u00e0 apprendre Quiz \u2013 Apprendre \u00e0 apprendre Valider mes r\u00e9ponses<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1412","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/comments?post=1412"}],"version-history":[{"count":2,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1412\/revisions"}],"predecessor-version":[{"id":1414,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1412\/revisions\/1414"}],"wp:attachment":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/media?parent=1412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}