diff --git a/WEB/Model/AdminModel.php b/WEB/Model/AdminModel.php index 3080ff07..3467369b 100644 --- a/WEB/Model/AdminModel.php +++ b/WEB/Model/AdminModel.php @@ -17,6 +17,7 @@ class AdminModel public function addNewEnigmeSolo(string $nom,string $enonce,string $aide,string $rappel,string $exemple,string $test,string $solution, string $prompt) : Enigme { $last = $this->enigme_gateway->findLastEnigma(); + var_dump($last); if ($last !== null){ $ordre = $last[0]->getOrdre() + 1; } else { diff --git a/WEB/Model/VisitorModel.php b/WEB/Model/VisitorModel.php index e0fda60d..17af584f 100644 --- a/WEB/Model/VisitorModel.php +++ b/WEB/Model/VisitorModel.php @@ -71,7 +71,6 @@ class VisitorModel throw new Exception("Mot de passe invalide"); } $estAdmin = $this->utilisateur_gateway->getEstAdminByEmail($email); - var_dump($estAdmin); if ($estAdmin == true) { $_SESSION['role'] = "admin"; } else { diff --git a/WEB/View/src/JS/Palindrome.js b/WEB/View/src/JS/Palindrome.js index 626552d0..141d35ad 100644 --- a/WEB/View/src/JS/Palindrome.js +++ b/WEB/View/src/JS/Palindrome.js @@ -1,5 +1,5 @@ //~ Function that test the user code - + async function submit(){ var test = editor.getValue()+`\n def estPalindromeVerif(var): @@ -7,7 +7,6 @@ def estPalindromeVerif(var): return True else: return False - import random as r def testPalindrome(x): l=[1,2,3,2,1] @@ -26,11 +25,10 @@ def testPalindrome(x): return True print(testPalindrome(5)) - `; +`; exec("print ('True')", "code"); exec(test, "solution"); result.innerHTML = "Test en cours..."; await new Promise(r => setTimeout(r, 1500)); check(); -} - +} \ No newline at end of file