|
|
|
@ -53,11 +53,14 @@
|
|
|
|
|
<textarea rows="5" cols="70" name="demo<?php echo $q->getNumQuestion(); ?>" id="demo<?php echo $q->getNumQuestion().$q->getNumTp(); ?>" >
|
|
|
|
|
<?php echo $q->getReponse(); ?>
|
|
|
|
|
</textarea>
|
|
|
|
|
<p> <input class="monterDemonstration" type="button" value="Monter" onclick="MonterDemonstration(<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>)" >
|
|
|
|
|
<input class="supprimerDemonstration" type="button" value="Supprimer" onclick="SupprimerDemonstration(<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>);" >
|
|
|
|
|
<input class="descendreDemonstration" type="button" value="Descendre" onclick="DescendreDemonstration(<?php echo sizeof($questions); ?>,<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>)" >
|
|
|
|
|
<input class="modifierDemonstration" type="button" value="Modifier" onclick="ModifierDemonstration(<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>);" >
|
|
|
|
|
<input class="submitDemoData" type="button" value="Exécuter" onclick="SubmitDemoData(<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>);" ></p>
|
|
|
|
|
<p>
|
|
|
|
|
<input class="submitDemoData" type="button" value="Exécuter" onclick="SubmitDemoData(<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>);" >
|
|
|
|
|
<span id="inp-centre"> <input class="modifierDemonstration" type="button" value="Modifier" onclick="ModifierDemonstration(<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>);" >
|
|
|
|
|
<input class="supprimerDemonstration" type="button" value="Supprimer" onclick="SupprimerDemonstration(<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>);" ></span>
|
|
|
|
|
<span id="inp-centre"><input class="monterDemonstration" type="button" value="Monter" onclick="MonterDemonstration(<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>)" >
|
|
|
|
|
<input class="descendreDemonstration" type="button" value="Descendre" onclick="DescendreDemonstration(<?php echo sizeof($questions); ?>,<?php echo $q->getNumQuestion(); ?>,<?php echo $q->getNumTp(); ?>)" ></span>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<div id="results<?php echo $q->getNumQuestion().$q->getNumTp(); ?>">
|
|
|
|
|
<!-- les résultats s'affichent içi -->
|
|
|
|
@ -109,31 +112,33 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function DescendreDemonstration(nbQuestions,numQuestion, numTp) {
|
|
|
|
|
function DescendreDemonstration(nbQuestions,numQuestion, numTp) {
|
|
|
|
|
//alert(nbQuestions);
|
|
|
|
|
|
|
|
|
|
var des = 1;
|
|
|
|
|
if(numQuestion < nbQuestions){
|
|
|
|
|
$.get("Traitement/OrdreDemo.php", { des : des , numDemo : numQuestion, numChapitre : numTp },
|
|
|
|
|
function(data) {
|
|
|
|
|
var des = 1;
|
|
|
|
|
if(numQuestion < nbQuestions){
|
|
|
|
|
$.get("Traitement/OrdreDemo.php", { des : des , numDemo : numQuestion, numChapitre : numTp },
|
|
|
|
|
function(data) {
|
|
|
|
|
|
|
|
|
|
//$('#questionsForm')[0].reset();
|
|
|
|
|
$("#afficher-demo").trigger("click");
|
|
|
|
|
//window.location.replace("index.php");
|
|
|
|
|
});
|
|
|
|
|
//$('#questionsForm')[0].reset();
|
|
|
|
|
$("#afficher-demo").trigger("click");
|
|
|
|
|
//window.location.replace("index.php");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SupprimerDemonstration(numDemo,numChapitre) {
|
|
|
|
|
var type = "demo";
|
|
|
|
|
$.get("Traitement/Suppression.php", { numChapitre : numChapitre, numDemo : numDemo,demo : type},
|
|
|
|
|
function(data) {
|
|
|
|
|
//$('#results'+numDemo+numChapitre).html(data);
|
|
|
|
|
//$('#questionsForm')[0].reset();
|
|
|
|
|
$("#afficher-demo").trigger("click");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var result = confirm("Êtes-vous sûr de vouloir supprimer la démonstration "+numDemo+" du chapitre "+numChapitre+" ?");
|
|
|
|
|
if(result){
|
|
|
|
|
var type = "demo";
|
|
|
|
|
$.get("Traitement/Suppression.php", { numChapitre : numChapitre, numDemo : numDemo,demo : type},
|
|
|
|
|
function(data) {
|
|
|
|
|
//$('#results'+numDemo+numChapitre).html(data);
|
|
|
|
|
//$('#questionsForm')[0].reset();
|
|
|
|
|
$("#afficher-demo").trigger("click");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function changerSection(tp,keys){
|
|
|
|
|
|
|
|
|
@ -156,6 +161,14 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.addEventListener('scroll',function() {
|
|
|
|
|
localStorage.setItem('scrollPosition',window.scrollY);
|
|
|
|
|
},false);
|
|
|
|
|
window.addEventListener('load',function() {
|
|
|
|
|
if(localStorage.getItem('scrollPosition') !== null)
|
|
|
|
|
window.scrollTo(0, localStorage.getItem('scrollPosition'));
|
|
|
|
|
},false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|