You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the script reaches the point where it detects data.code === 250 fetch the qcm endpoint and create a form on the page with all responses decoded from base 64.
In .then(serverResponse) callback function after fetch :
let question = serverResponse.data.question;
let reponses = [];
serverResponse.data.propositions.forEach(proposition => {
reponses.push(atob(proposition))
})
//Create a <form> element with all datas
I would like to know how I can modify my code so that it displays the QCM and allows me to respond. Thank you in advance.
`
<title>Test de Connexion EcoleDirecte</title> <style> body { font-family: Arial, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #f5f5f5; margin: 0; } #status { padding: 20px; border: 1px solid #ccc; background-color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } .success { color: green; } .error { color: red; } </style>document.addEventListener("DOMContentLoaded", function() {
const statusElement = document.getElementById("status");
});
The text was updated successfully, but these errors were encountered: