Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Corrige qcm pas répondu
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahtwo committed May 17, 2022
1 parent 0fb8954 commit 444f000
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions PETAL/www/my-app/PETAL/ETUDIANT/PHP/script_qcm.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,14 @@

// cocher les cases répondues par l'utilisateur
$req6->execute(array('num' => $num, 'idQuestion' => $row[0])); // on prépare avec l'id utilisateur et l'id question

$res = $req6->fetch();

$reponseALaQuestion = $rep[$n -1];

if ($res) {
$validateButton = false;

switch($res[2]){
case 1:
if($reponseALaQuestion[0] == 1){
Expand Down Expand Up @@ -258,18 +261,18 @@
break;
}
break;
default:
echo"
<input type='radio' name=\"reponse".$n."\" value='1'/> <span>".$row[4]."</span>
<br/>
<input type='radio' name=\"reponse".$n."\" value='2'/> <span>".$row[5]."</span>
<br/>
<input type='radio' name=\"reponse".$n."\" value='3'/> <span>".$row[6]."</span>
<br/>
</label>
</div>";
break;
}
} else {
echo"
<input type='radio' name=\"reponse".$n."\" value='1'/> <span>".$row[4]."</span>
<br/>
<input type='radio' name=\"reponse".$n."\" value='2'/> <span>".$row[5]."</span>
<br/>
<input type='radio' name=\"reponse".$n."\" value='3'/> <span>".$row[6]."</span>
<br/>
</label>
</div>";
}

$n++;
}
Expand Down

0 comments on commit 444f000

Please sign in to comment.