ADD: Bouton "Quitter" et affichage correct de la question dans la page scienceQuizz.html

php
Tom 1 year ago
parent a90f6299dc
commit 590fe5199e

@ -4,9 +4,9 @@ namespace config;
$config = [ $config = [
"rep" => __DIR__.'/../', "rep" => __DIR__.'/../',
"db" => ["dsn" => 'pgsql:host=localhost;dbname=sae2a', "db" => ["dsn" => 'pgsql:host=localhost;dbname=postgres',
"login" => 'postgres', "login" => 'postgres',
"mdp" => 'SKf43V4hmD7a'], "mdp" => 'root'],
"templates" => ["index" => 'vues/index.php', "templates" => ["index" => 'vues/index.php',
"pseudo" => 'pseudo.html', "pseudo" => 'pseudo.html',
"jouer" => "jouer.html", "jouer" => "jouer.html",

@ -35,7 +35,6 @@ class MdlScienceQuizz
*/ */
public function getQuestions(): array public function getQuestions(): array
{ {
var_dump($this->questions);
return $this->questions; return $this->questions;
} }

@ -19,11 +19,6 @@
text-align: center; text-align: center;
} }
.answer-button {
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
}
</style> </style>
</head> </head>
@ -32,11 +27,11 @@
<h1>Science Quizz</h1> <h1>Science Quizz</h1>
<div> <div>
<p>Question {{ dVue.statJeu.numQuestion }}:</p> <p>Question {{ dVue.statJeu.numQuestion }}:</p>
<p>{{ dVue.statJeu.question.question }}</p> <p>{{ dVue.statJeu.question }}</p>
<!-- Boutons des réponses --> <!-- Boutons quitter -->
<button class="answer-button" type="submit" name="reponse" value="{{ dVue.statJeu.question.answer }}"> <button>
Show Answer <a href="defaultAction">Quitter</a>
</button> </button>
</div> </div>

Loading…
Cancel
Save