// LANCEMENT DE L'ACTIVITÉ PAR DEFAUT (TRANSMISE AVEC LE TEMPLATE cf. views.py)
nbmots=mots.length
...
...
@@ -289,6 +290,23 @@ function checkAnswer() {
})
console.log("myrep:",myrep)
////////////////////////////////////
// REFORMATAGE phono POUR ks kv el en... etc.
phono.forEach((el)=>{
if(el.includes("phon_ks")){
varnewEl=[]
for(i=0;i<el.length;i++){
if(el[i]=="phon_ks"){
newEl.push("phon_k")
newEl.push("phon_s")
}else{
newEl.push(el[i])
}
}
phono.push(newEl);
}
})
////////////////////////////////////
if(!Array.isArray(phono[0])){
// Si premier élément n'est pas isArray, c'est qu'il y a qu'une phono enregistrée (ancienne série), dans ce cas on reformatte en liste de phono [ ["a","b"] ]