From 5b6907f0983e2480baf7bd20b52dd5f5f02ca6b9 Mon Sep 17 00:00:00 2001 From: Mehdi Date: Thu, 13 Aug 2020 15:50:42 +0200 Subject: [PATCH] =?UTF-8?q?toutes=20les=20fonctionnalit=C3=A9s=20pour=20le?= =?UTF-8?q?s=20d=C3=A9monstrations=20et=20qcm=20+=20gestion=20date=20de=20?= =?UTF-8?q?tp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BddCorrect/BDD/SqliteDb.php | 64 ++++++++++- BddCorrect/DAL/QCMGateway.php | 4 +- BddCorrect/Traitement/AjoutDemonstration.php | 5 +- BddCorrect/Traitement/AjoutQCM.php | 12 ++- BddCorrect/Traitement/AjoutQuestion.php | 1 - BddCorrect/Traitement/DateTp.php | 24 +++++ BddCorrect/Traitement/Modification.php | 4 +- .../Traitement/ModificationDemonstration.php | 78 ++++++++++++++ BddCorrect/Traitement/ModificationQCM.php | 100 ++++++++++++++++++ BddCorrect/Traitement/OrdreQCM.php | 71 +++++++++++++ BddCorrect/Traitement/Suppression.php | 49 ++++++++- BddCorrect/Traitement/test2.db | Bin 61440 -> 61440 bytes BddCorrect/config/config.php | 4 +- BddCorrect/controleur/Controleur.php | 6 +- BddCorrect/css/VueDemonstration.css | 1 + BddCorrect/nbproject/private/private.xml | 6 +- BddCorrect/vues/VueAccueil.php | 7 +- BddCorrect/vues/VueAdmin.php | 4 +- BddCorrect/vues/VueAjoutDemo.php | 9 +- BddCorrect/vues/VueDemonstration.php | 58 +++++----- BddCorrect/vues/VueGestionTp.php | 64 +++++++++++ BddCorrect/vues/VuePrincipale.php | 29 ++++- BddCorrect/vues/VueQCM.php | 74 +++++++++++-- 23 files changed, 592 insertions(+), 82 deletions(-) create mode 100644 BddCorrect/Traitement/DateTp.php create mode 100644 BddCorrect/Traitement/ModificationDemonstration.php create mode 100644 BddCorrect/Traitement/ModificationQCM.php create mode 100644 BddCorrect/Traitement/OrdreQCM.php create mode 100644 BddCorrect/vues/VueGestionTp.php diff --git a/BddCorrect/BDD/SqliteDb.php b/BddCorrect/BDD/SqliteDb.php index 80012c9..94f21e7 100644 --- a/BddCorrect/BDD/SqliteDb.php +++ b/BddCorrect/BDD/SqliteDb.php @@ -12,10 +12,12 @@ class SqliteDb extends SQLite3 if($o == 'n') $this->open('Traitement/test2.db'); else $this->open('test2.db'); - /*$this->createLogin(); - $this->createTable(); - $this->createDemonstration(); - $this->createQCM();*/ + //$this->createLogin(); + // $this->createTable(); + //$this->createDemonstration(); + //$this->createQCM(); + // $this->createDateTp(); + } @@ -181,6 +183,15 @@ class SqliteDb extends SQLite3 $stmt->execute(); } + function createDateTp(){ + $this->exec('DROP TABLE dateTp'); + $this->exec('CREATE TABLE dateTp ( numTp NUMBER, dateDebut STRING, dateFin STRING)'); + + $this->exec("INSERT INTO dateTp VALUES(2,'20200101','20200814')"); + } + + + function joueurEtDateRandom(&$nomRandom, &$dateRandom){ $listeJoueurQuery = oci_parse($this->conn, 'SELECT prenomnoms,datematch FROM STATS INTERSECT SELECT prenomnoms,datematch FROM randomstats '); @@ -297,7 +308,25 @@ class SqliteDb extends SQLite3 $prp->bindParam(2, $numQuestion); $result = $prp->execute(); $row = $result->fetchArray(); - if($row['count(*)'] == 0) return false; + if($row['count(*)'] == 0){ + $q = "SELECT count(*) FROM Type WHERE numTp = ?"; + $prp=$this->prepare($q); + $prp->bindParam(1, $tp); + $result = $prp->execute(); + $row = $result->fetchArray(); + if($row['count(*)'] == 0){ + date_default_timezone_set('Europe/Paris'); + $dateD = date('Ymd'); + $dateF = date('Ymd',strtotime('+9 months')); + $q = "INSERT INTO DateTp VALUES(?,?,?)"; + $prp=$this->prepare($q); + $prp->bindParam(1, $tp); + $prp->bindParam(2, $dateD); + $prp->bindParam(3, $dateF); + $result = $prp->execute(); + } + return false; + } return true; } @@ -354,5 +383,30 @@ class SqliteDb extends SQLite3 $prp->bindParam(2, $numQuestion); $prp->execute(); } + + function supprimerDemonstration($chapitre, $numDemo){ + $qt = "DELETE FROM Demonstration WHERE chapitre=? AND numDemo=? "; + $prp=$this->prepare($qt); + $prp->bindParam(1, $chapitre); + $prp->bindParam(2, $numDemo); + $prp->execute(); + } + + function supprimerQCM($numQuestion){ + $qt = "DELETE FROM QcmQuestion WHERE numQuestion=? "; + $prp=$this->prepare($qt); + $prp->bindParam(1, $numQuestion); + $prp->execute(); + + $qt = "DELETE FROM QcmReponse WHERE numQuestion=? "; + $prp=$this->prepare($qt); + $prp->bindParam(1, $numQuestion); + $prp->execute(); + + $qt = "DELETE FROM QcmCorrection WHERE numQuestion=? "; + $prp=$this->prepare($qt); + $prp->bindParam(1, $numQuestion); + $prp->execute(); + } } diff --git a/BddCorrect/DAL/QCMGateway.php b/BddCorrect/DAL/QCMGateway.php index 683dd82..339e9cb 100644 --- a/BddCorrect/DAL/QCMGateway.php +++ b/BddCorrect/DAL/QCMGateway.php @@ -10,14 +10,14 @@ class QCMGateway { public function afficherQCM() { $i = 0; - $query = 'SELECT * FROM QcmQuestion'; + $query = 'SELECT * FROM QcmQuestion ORDER BY numQuestion'; $query = $this->db->prepare($query); $result = $query->execute(); $tabQuestions = array(); //$resultats = $this->db->query('SELECT found_rows()'); while($q = $result->fetchArray()){ $i= $i+1; - $reponseQuery = 'SELECT * FROM QcmReponse WHERE numQuestion=?'; + $reponseQuery = 'SELECT * FROM QcmReponse WHERE numQuestion=? ORDER BY numReponse'; $stmt = $this->db->prepare($reponseQuery); $stmt->bindParam(1, $q['numQuestion']); $reponseResult = $stmt->execute(); diff --git a/BddCorrect/Traitement/AjoutDemonstration.php b/BddCorrect/Traitement/AjoutDemonstration.php index 8bb8fab..9da4554 100644 --- a/BddCorrect/Traitement/AjoutDemonstration.php +++ b/BddCorrect/Traitement/AjoutDemonstration.php @@ -19,10 +19,7 @@ else if(!is_numeric($_GET['numDemo'])) else { if(isset($_GET['modif'])){ - if ($_GET["type"] == 'fonction') - $db->supprimerFonction ($_GET['num'], $_GET['tp']); - else if ($_GET["type"] == 'requete') - $db->supprimerRequete($_GET['num'], $_GET['tp']); + $db->supprimerDemonstration($_GET['chapitre'], $_GET['numDemo']); } diff --git a/BddCorrect/Traitement/AjoutQCM.php b/BddCorrect/Traitement/AjoutQCM.php index ea77993..6c6a428 100644 --- a/BddCorrect/Traitement/AjoutQCM.php +++ b/BddCorrect/Traitement/AjoutQCM.php @@ -2,13 +2,17 @@ require_once('../BDD/SqliteDb.php'); require_once('../controleur/Controleur.php'); +$db = new SqliteDb('o'); + +if(isset($_GET['modif'])){ + $db->supprimerQCM ($_GET['numQuestion']); +} -$db = new SqliteDb('o'); - $isAdd = $db->ajouterQCM($_GET['numQuestion'],$_GET['consigne'],$_GET['choix1'],$_GET['choix2'],$_GET['choix3'], $_GET['reponse']); +$isAdd = $db->ajouterQCM($_GET['numQuestion'],$_GET['consigne'],$_GET['choix1'],$_GET['choix2'],$_GET['choix3'], $_GET['reponse']); if(!$isAdd){ echo 'ERREUR : le numéro de question existe déjà dans la bdd'; - } - else echo 'AJOUT QCM avec succès'; + } +else echo 'AJOUT QCM avec succès'; diff --git a/BddCorrect/Traitement/AjoutQuestion.php b/BddCorrect/Traitement/AjoutQuestion.php index 3b7e056..8791878 100644 --- a/BddCorrect/Traitement/AjoutQuestion.php +++ b/BddCorrect/Traitement/AjoutQuestion.php @@ -5,7 +5,6 @@ require_once('../controleur/Controleur.php'); $db = new SqliteDb('o'); -$lol = 'ok'; if (empty($_GET['tp']) || empty($_GET['bdd']) || empty($_GET['num']) || empty($_GET['consigne']) || empty($_GET['reponse']) || empty($_GET['points']) || empty($_GET['aleatoire']) || empty($_GET['type'])) { echo 'ERREUR : Veuillez remplir tous les champs '; diff --git a/BddCorrect/Traitement/DateTp.php b/BddCorrect/Traitement/DateTp.php new file mode 100644 index 0000000..c93a65e --- /dev/null +++ b/BddCorrect/Traitement/DateTp.php @@ -0,0 +1,24 @@ +prepare($q); +$prp->bindParam(1, $debut ); +$prp->bindParam(2, $_GET['tp']); +$result = $prp->execute(); + +$q = "UPDATE dateTp SET dateFin=? WHERE numtp=?"; +$prp=$db->prepare($q); +$prp->bindParam(1, $fin); +$prp->bindParam(2,$_GET['tp'] ); +$result = $prp->execute(); + + diff --git a/BddCorrect/Traitement/Modification.php b/BddCorrect/Traitement/Modification.php index e53f742..47815c3 100644 --- a/BddCorrect/Traitement/Modification.php +++ b/BddCorrect/Traitement/Modification.php @@ -36,10 +36,10 @@ $questionRow = $resultQuestion->fetchArray();
- + - + diff --git a/BddCorrect/Traitement/ModificationDemonstration.php b/BddCorrect/Traitement/ModificationDemonstration.php new file mode 100644 index 0000000..aec1ea1 --- /dev/null +++ b/BddCorrect/Traitement/ModificationDemonstration.php @@ -0,0 +1,78 @@ + + + + + +prepare('SELECT * FROM Demonstration WHERE numDemo= ? AND chapitre = ?'); +$stmt->bindParam(1, $_GET['numDemo']); +$stmt->bindParam(2, $_GET['numChapitre']); +$resultQuestion = $stmt->execute(); +$questionRow = $resultQuestion->fetchArray(); + + + + +?> +
+
+

Modifier une démonstration

+
+ + + + + + + + + + + + + + + + +
+ +
+
+
+
+ +
+ + + + diff --git a/BddCorrect/Traitement/ModificationQCM.php b/BddCorrect/Traitement/ModificationQCM.php new file mode 100644 index 0000000..86acd75 --- /dev/null +++ b/BddCorrect/Traitement/ModificationQCM.php @@ -0,0 +1,100 @@ + + + + +prepare('SELECT * FROM QcmQuestion WHERE numQuestion= ?'); +$stmt->bindParam(1, $_GET['numQuestion']); +$resultQuestion = $stmt->execute(); +$questionRow = $resultQuestion->fetchArray(); + +$stmt = $db->prepare('SELECT reponse FROM QcmReponse WHERE numQuestion= ?'); +$stmt->bindParam(1, $_GET['numQuestion']); +$resultQuestion = $stmt->execute(); +while($r = $resultQuestion->fetchArray(SQLITE3_NUM)){ + $reponseRow[] = $r[0]; +} + +$stmt = $db->prepare('SELECT * FROM QcmCorrection WHERE numQuestion= ?'); +$stmt->bindParam(1, $_GET['numQuestion']); +$resultQuestion = $stmt->execute(); +$correctRow = $resultQuestion->fetchArray(); + +?> +
+
+ + +

Ajouter une question(QCM)

+
+ + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+ +
+ +
+ +
+ + + + + + diff --git a/BddCorrect/Traitement/OrdreQCM.php b/BddCorrect/Traitement/OrdreQCM.php new file mode 100644 index 0000000..ede7bd1 --- /dev/null +++ b/BddCorrect/Traitement/OrdreQCM.php @@ -0,0 +1,71 @@ +prepare('UPDATE QcmQuestion SET numQuestion=? WHERE numQuestion=? '); + $sqliteQuery->bindParam(1, $test); + $sqliteQuery->bindParam(2, $numQuestion); + $result = $sqliteQuery->execute(); + + $sqliteQuery = $db->prepare('UPDATE QcmQuestion SET numQuestion=? WHERE numQuestion=?'); + $sqliteQuery->bindParam(1, $numQuestion); + $sqliteQuery->bindParam(2, $numQuestionPrec); + $resulti = $sqliteQuery->execute(); + + $sqliteQuery = $db->prepare('UPDATE QcmQuestion SET numQuestion=? WHERE numQuestion=?'); + $sqliteQuery->bindParam(1, $numQuestionPrec); + $sqliteQuery->bindParam(2, $test); + $resultp = $sqliteQuery->execute(); + + //même chose pour qcmreponse + $sqliteQuery = $db->prepare('UPDATE QcmReponse SET numQuestion=? WHERE numQuestion=? '); + $sqliteQuery->bindParam(1, $test); + $sqliteQuery->bindParam(2, $numQuestion); + $result = $sqliteQuery->execute(); + + $sqliteQuery = $db->prepare('UPDATE QcmReponse SET numQuestion=? WHERE numQuestion=?'); + $sqliteQuery->bindParam(1, $numQuestion); + $sqliteQuery->bindParam(2, $numQuestionPrec); + $resulti = $sqliteQuery->execute(); + + $sqliteQuery = $db->prepare('UPDATE QcmReponse SET numQuestion=? WHERE numQuestion=?'); + $sqliteQuery->bindParam(1, $numQuestionPrec); + $sqliteQuery->bindParam(2, $test); + $resultp = $sqliteQuery->execute(); + + + //même chose pour QCMcorrection + $sqliteQuery = $db->prepare('UPDATE QcmCorrection SET numQuestion=? WHERE numQuestion=? '); + $sqliteQuery->bindParam(1, $test); + $sqliteQuery->bindParam(2, $numQuestion); + $result = $sqliteQuery->execute(); + + $sqliteQuery = $db->prepare('UPDATE QcmCorrection SET numQuestion=? WHERE numQuestion=?'); + $sqliteQuery->bindParam(1, $numQuestion); + $sqliteQuery->bindParam(2, $numQuestionPrec); + $resulti = $sqliteQuery->execute(); + + $sqliteQuery = $db->prepare('UPDATE QcmCorrection SET numQuestion=? WHERE numQuestion=?'); + $sqliteQuery->bindParam(1, $numQuestionPrec); + $sqliteQuery->bindParam(2, $test); + $resultp = $sqliteQuery->execute(); + +} + +//header("Location: index.php"); + + diff --git a/BddCorrect/Traitement/Suppression.php b/BddCorrect/Traitement/Suppression.php index 1b751e6..5e1e54a 100644 --- a/BddCorrect/Traitement/Suppression.php +++ b/BddCorrect/Traitement/Suppression.php @@ -6,7 +6,53 @@ $db = new SqliteDb('o'); -if(isset($_GET['type'])){ +if (isset($_GET['qcm'])){ + $numQcmSuiv = $_GET['numQuestion']+1; + + $sqliteQuery = $db->prepare('SELECT count(*) FROM QcmQuestion '); + $result = $sqliteQuery->execute(); + $nbQuestionsRow = $result->fetchArray(); + + $sqliteQuery = $db->prepare('DELETE FROM QcmQuestion WHERE numQuestion= ? '); + $sqliteQuery->bindParam(1, $_GET['numQuestion']); + $result = $sqliteQuery->execute(); + + + for( $iSuiv = $numQcmSuiv, $j=$_GET['numQuestion'] ; $iSuiv <= $nbQuestionsRow['count(*)'] ; $iSuiv++ , $j++ ){ + $sqliteQuery = $db->prepare('UPDATE QcmQuestion SET numQuestion=? WHERE numQuestion=? '); + $sqliteQuery->bindParam(1, $j); + $sqliteQuery->bindParam(2, $iSuiv); + $result = $sqliteQuery->execute(); + } + + //même chose pour qcmreponse + $sqliteQuery = $db->prepare('DELETE FROM QcmReponse WHERE numQuestion= ? '); + $sqliteQuery->bindParam(1, $_GET['numQuestion']); + $result = $sqliteQuery->execute(); + + + for( $iSuiv = $numQcmSuiv, $j=$_GET['numQuestion'] ; $iSuiv <= $nbQuestionsRow['count(*)'] ; $iSuiv++ , $j++ ){ + $sqliteQuery = $db->prepare('UPDATE QcmReponse SET numQuestion=? WHERE numQuestion=? '); + $sqliteQuery->bindParam(1, $j); + $sqliteQuery->bindParam(2, $iSuiv); + $result = $sqliteQuery->execute(); + } + //même chose pour QcmCorrection + $sqliteQuery = $db->prepare('DELETE FROM QcmCorrection WHERE numQuestion= ? '); + $sqliteQuery->bindParam(1, $_GET['numQuestion']); + $result = $sqliteQuery->execute(); + + + for( $iSuiv = $numQcmSuiv, $j=$_GET['numQuestion'] ; $iSuiv <= $nbQuestionsRow['count(*)'] ; $iSuiv++ , $j++ ){ + $sqliteQuery = $db->prepare('UPDATE QcmCorrection SET numQuestion=? WHERE numQuestion=? '); + $sqliteQuery->bindParam(1, $j); + $sqliteQuery->bindParam(2, $iSuiv); + $result = $sqliteQuery->execute(); + } + +} + +else if(isset($_GET['demo'])){ $numDemoSuiv = $_GET['numDemo']+1; @@ -27,7 +73,6 @@ if(isset($_GET['type'])){ $sqliteQuery->bindParam(2, $iSuiv); $sqliteQuery->bindParam(3, $_GET['numChapitre']); $result = $sqliteQuery->execute(); - echo 'lol'; } } diff --git a/BddCorrect/Traitement/test2.db b/BddCorrect/Traitement/test2.db index e05eb502e7bf1566ab28455fc8a8b351072c2ed4..09a3dc61713ff5e42ecff4674c94367ecaa13ad7 100644 GIT binary patch delta 900 zcmaKrT}TvB6vyY@x$b&*cINErE}PoNP?TD>>n;)*2&q{ZwUKT064t7tY}t(N$AeIz zIbcDMc@YXqC9{W$9@^+J>aFPGt%9BmA51L4u!n*^&ZI$4F>~(B{oV6F=iGC-{nK*) zv^-o|6ud7<5}+w)4Bxj`s$%PrhHG>ck;n6#XqNKT^BgY0I_HwM)e%Po1!o3)EJ`H{}Mk%fwahQEIOei{9JRF3De0HKa^-` zj_+9}yHn=Myz->&cZbANtyRq!E2_#~+b1qVu8_c-1at5Z%bx_Ju9h|$xXFD{{I;ib zBa_v;lX^#QrbCY+uc?)1|6Stp}hEo!}gzIoh`{F#9szGBg zDs2-#!Z8>2nq<1f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p56+(kBr%>? zCUdXY`4J$2vHn7EOP|Kp;UbKwE*+g7XZrh_f4-B!tuVuV$cC=?k6?l?LV?NmBYtGU znqiVI#CG`dx!u8T3#`?t#d PZxz0xe-XH?ecXQlL$Q&` diff --git a/BddCorrect/config/config.php b/BddCorrect/config/config.php index bcd43aa..78c499b 100644 --- a/BddCorrect/config/config.php +++ b/BddCorrect/config/config.php @@ -15,8 +15,8 @@ $vues['vueAccueil']='vues/VueAccueil.php'; $vues['vueAdmin']='vues/VueAdmin.php'; $vues['vueLibre']='vues/VueLibre.php'; $vues['vueAjoutQCM']='vues/vueAjoutQCM.php'; -$vues['vueAjoutDemo']='vues/vueAjoutDemo.php'; - +$vues['vueAjoutDemo']='vues/VueAjoutDemo.php'; +$vues['vueDateTp']='vues/VueGestionTp.php'; $vues['vueGestion']='vues/VueGestionTables.php'; diff --git a/BddCorrect/controleur/Controleur.php b/BddCorrect/controleur/Controleur.php index 5798235..15b6dae 100644 --- a/BddCorrect/controleur/Controleur.php +++ b/BddCorrect/controleur/Controleur.php @@ -9,7 +9,7 @@ class Controleur { $dVueEreur = array (); try{ $action=$_REQUEST['action']; - echo $action; + // echo $action; switch($action) { case NULL : @@ -24,6 +24,10 @@ class Controleur { require ($rep.$vues['vueAccueil']); break; + case 'Dates de TP' : + require ($rep.$vues['vueDateTp']); + break; + case 'Ajouter une question' : require ($rep.$vues['vueAdmin']); break; diff --git a/BddCorrect/css/VueDemonstration.css b/BddCorrect/css/VueDemonstration.css index 6dce448..7319f7e 100644 --- a/BddCorrect/css/VueDemonstration.css +++ b/BddCorrect/css/VueDemonstration.css @@ -6,6 +6,7 @@ } + #frm-reset input{ background: #0082b5; color: #fff; diff --git a/BddCorrect/nbproject/private/private.xml b/BddCorrect/nbproject/private/private.xml index 2b9ec28..57d33db 100644 --- a/BddCorrect/nbproject/private/private.xml +++ b/BddCorrect/nbproject/private/private.xml @@ -3,11 +3,9 @@ - file:/C:/xampp/htdocs/BddCorrect/vues/VueAdmin.php - file:/C:/xampp/htdocs/BddCorrect/Traitement/AjoutQuestion.php + file:/C:/xampp/htdocs/BddCorrect/vues/VueAjoutDemo.php file:/C:/xampp/htdocs/BddCorrect/BDD/SqliteDb.php - file:/C:/xampp/htdocs/BddCorrect/vues/VuePrincipale.php - file:/C:/xampp/htdocs/BddCorrect/Traitement/Correcteur.php + file:/C:/xampp/htdocs/BddCorrect/questions.txt diff --git a/BddCorrect/vues/VueAccueil.php b/BddCorrect/vues/VueAccueil.php index e085d6c..8080943 100644 --- a/BddCorrect/vues/VueAccueil.php +++ b/BddCorrect/vues/VueAccueil.php @@ -19,13 +19,11 @@
-

test

-

TEST

+

Menu Principal

+

-
-

@@ -33,6 +31,7 @@


+
diff --git a/BddCorrect/vues/VueAdmin.php b/BddCorrect/vues/VueAdmin.php index f213a71..b1c5a1d 100644 --- a/BddCorrect/vues/VueAdmin.php +++ b/BddCorrect/vues/VueAdmin.php @@ -18,8 +18,8 @@ - - + + diff --git a/BddCorrect/vues/VueAjoutDemo.php b/BddCorrect/vues/VueAjoutDemo.php index 6da617e..444c983 100644 --- a/BddCorrect/vues/VueAjoutDemo.php +++ b/BddCorrect/vues/VueAjoutDemo.php @@ -13,7 +13,7 @@
-

Ajouter une question

+

Ajouter une Démonstration


@@ -45,9 +45,11 @@
-
+
- +
+ +

Tous les noms de table doivent être en majuscule

+ + + + + +
+
+ + +

Ajouter une question

+
+ + + + + + + +

+ + +


+ +
+ +
+
+
+
+ +
+ +
+ +
+ + + + diff --git a/BddCorrect/vues/VuePrincipale.php b/BddCorrect/vues/VuePrincipale.php index 07da9a0..a69278c 100644 --- a/BddCorrect/vues/VuePrincipale.php +++ b/BddCorrect/vues/VuePrincipale.php @@ -10,19 +10,34 @@ -