You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
3.5 KiB
82 lines
3.5 KiB
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title></title>
|
|
<script src="css/jquery-3.5.1.min.js"></script>
|
|
|
|
<link rel="stylesheet" href="css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="css/VuePrincipale.css">
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
|
|
<div class="container">
|
|
<a class="navbar-brand js-scroll-trigger" href="#page-top">TP de Base De Données</a>
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
</div>
|
|
</nav>
|
|
<header class="bg-primary text-white">
|
|
d
|
|
</header>
|
|
|
|
<div style="font-weight: bold" id="Temps-Restant"></div>
|
|
|
|
<section id="TP2">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8 mx-auto">
|
|
<h2>TP 2</h2>
|
|
<form id="QCMForm" method="get" >
|
|
<?php $i=0; //shuffle($dVueQuestions);
|
|
foreach ($tabQCM as $qcm) {
|
|
?>
|
|
<p><?php $i++; echo $qcm->getNumQuestion() .'.'.$qcm->getQuestion(); ?> <br/>
|
|
<?php
|
|
foreach ($qcm->getReponse() as $r ) { ?>
|
|
|
|
<input type="radio" id="textbox<?php echo $r->getNumReponse(); ?>" name="radiobox<?php echo $qcm->getNumQuestion();?>" value="<?php echo $r->getReponse();?>" style="margin-bottom:15px"> <?php echo $r->getNumReponse().'.'.$r->getReponse(); ?> <br/>
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
<p><input class="SubmitQCMData" type="button" value="Valider" onclick="SubmitQCMData(<?php echo $qcm->getNumQuestion(); ?>)" ></p>
|
|
|
|
<div id="results<?php echo $qcm->getNumQuestion(); ?>">
|
|
<!-- les résultats s'affichent içi -->
|
|
</div><br/>
|
|
<?php } //fin foreach ?>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<form method="get" >
|
|
<input id="btn-ajout" type="submit" name="action" value="Ajouter QCM" />
|
|
</form>
|
|
<form method="get" role="form">
|
|
<input id="inp-questions" class="bouton" type="submit" name="action" value="QCM" hidden>
|
|
<input id="inp-ret" type="submit" name="action" value="Retour au menu principal" >
|
|
</form>
|
|
|
|
<script>
|
|
function SubmitQCMData(numQuestion) {
|
|
//document.write($('#textbox'+numQuestion).val());
|
|
var name = "radiobox"+numQuestion;
|
|
var txt = $("input[name="+name+"]:checked").val();
|
|
|
|
$.get("Traitement/CorrectionQCM.php", { textbox: txt , numQuestion: numQuestion},
|
|
function(data) {
|
|
$('#results'+numQuestion).html(data);
|
|
//$('#QCMForm')[0].reset();
|
|
});
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|