diff --git a/.drone.yml b/.drone.yml index 5792672f..612dc48c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,5 +23,4 @@ steps: from_secret: DEPLOY_KEY secrets: - source: DEPLOY_KEY - rm: false - \ No newline at end of file + rm: false \ No newline at end of file diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index 435ce0cd..6d03f3ad 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -14,18 +14,9 @@ class UserController case NULL: $this->goToHome(); break; - case "goToPresentation": - $this->goToPresentation(); - break; - case "goToHome": - $this->goToHome(); - break; case "goToTest": $this->goToTest(); break; - case "goToEnigme": - $this->goToEnigme(); - break; case "goToChouette" : $this->goToChouette(); break; @@ -44,9 +35,6 @@ class UserController case "goToTrianglePascal": $this->goToTrianglePascal(); break; - case "goToQueue": - $this->goToQueue(); - break; case "goToNext": $this->goToNext(); break; diff --git a/WEB/Model/UserModel.php b/WEB/Model/UserModel.php index 381b182e..b6e71a7f 100644 --- a/WEB/Model/UserModel.php +++ b/WEB/Model/UserModel.php @@ -53,4 +53,10 @@ class UserModel $this->utilisateur_gateway->launchGame(); } } + + public function logout() + { + $_SESSION['role'] = 'visitor'; + header('Location: index.php'); + } } \ No newline at end of file diff --git a/WEB/View/src/pages/FirstTests/FirstTest9.HTML b/WEB/View/src/pages/FirstTests/FirstTest9.HTML new file mode 100644 index 00000000..440a6203 --- /dev/null +++ b/WEB/View/src/pages/FirstTests/FirstTest9.HTML @@ -0,0 +1,196 @@ + + +
+ + +
+ Durant le test précédent, tu as découvert l'instruction for.
+ Nous l'avons aborder que briévement, mais il est temps de l'étudier plus en détail.
+ La boucle for est une boucle qui permet de répéter un bloc d'instruction un nombre défini de fois.
+ On précise après le mot-clé for le nom d’une variable
+ qui prendra successivement toutes les valeurs qui sont données après le mot-clé in.
+ Il est possible d’obtenir le même résultat sans donner de liste de valeurs, mais en utilisant la fonction range().
+
+ Voici un exemple de code. +
+
+ list = [1, 2, 3, 4, 5]
+ for i in list:
+ print(i+2)
+
+ for j in range(5):
+ print(j)
+
+ for k in range(1, 5):
+ print(k)
+
+ for l in range(0, 5, 2):
+ print(l)
+
+ for m in range(5, 0, -1):
+ print(m)
+
+ for n in range(len("toto"))):
+ print(n)
+
+ + Je te laisse expérimenter par toi même. +
+