|
|
|
@ -60,14 +60,41 @@ foreach ($_POST['textbox'] as $textbox) {
|
|
|
|
|
else echo "La réponse à la question " .$numQuestion. " est FAUSSE ! \n";
|
|
|
|
|
}
|
|
|
|
|
//si la question attend une modification
|
|
|
|
|
/*else if($typeRow['type'] == 'tablemodification'){
|
|
|
|
|
else if($typeRow['type'] == 'tablemodification'){
|
|
|
|
|
|
|
|
|
|
$sqliteQuery = $db->prepare('SELECT reponse FROM Correct WHERE rowid= ? ');
|
|
|
|
|
$sqliteQuery->bindParam(1, $numQuestion);
|
|
|
|
|
$result = $sqliteQuery->execute();
|
|
|
|
|
$sqliteRow = $result->fetchArray();
|
|
|
|
|
$vraiReponse = oci_parse($conn, $sqliteRow['reponse']);
|
|
|
|
|
$enAttente = oci_execute($vraiReponse);
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
$sqliteQuery = $db->prepare('SELECT fonctioncorrect FROM Correct WHERE rowid= ? ');
|
|
|
|
|
$sqliteQuery->bindParam(1, $numQuestion);
|
|
|
|
|
$result = $sqliteQuery->execute();
|
|
|
|
|
$sqliteRow = $result->fetchArray();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$t = oci_fetch_all($vraiReponse, $vraiReponseRow);
|
|
|
|
|
print_r($vraiReponseRow);
|
|
|
|
|
|
|
|
|
|
$err = 1;
|
|
|
|
|
foreach ($vraiReponseRow as $v){
|
|
|
|
|
for($i = 0 ; $i < sizeof($v, OCI_NUM) ; $i++){
|
|
|
|
|
if($v[$i] == $sqliteRow[0]){
|
|
|
|
|
$err = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($err == 0 ){
|
|
|
|
|
echo "La réponse à la question " .$numQuestion. " est JUSTE ! \n";
|
|
|
|
|
$cmpt++;
|
|
|
|
|
}
|
|
|
|
|
else echo "La réponse à la question " .$numQuestion. " est FAUSSE ! \n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//si la question attend un CREATE FUNCTION
|
|
|
|
|
else{
|
|
|
|
|
$fonctionQuery = $db->prepare('SELECT * FROM Correct WHERE rowid= ? ');
|
|
|
|
@ -77,7 +104,7 @@ foreach ($_POST['textbox'] as $textbox) {
|
|
|
|
|
|
|
|
|
|
$creationFonction = oci_parse($conn, $fonctionRow['fonctionCorrect']);
|
|
|
|
|
$creatF = oci_execute($creationFonction);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$testUser = oci_parse($conn, $fonctionRow['testUser']);
|
|
|
|
|
$testu = oci_execute($testUser);
|
|
|
|
|
$testF = oci_parse($conn, $fonctionRow['reponse']);
|
|
|
|
|