1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-26 04:37:35 +02:00

Design phases 1 & 2

This commit is contained in:
galaxyoyo
2019-09-27 19:18:54 +02:00
parent 5c5c670958
commit 8df4c71119
6 changed files with 213 additions and 167 deletions

View File

@ -79,9 +79,9 @@ class Question
null,
null,
null];
for ($_ = 0; $_ < 6; ++$_) {
$req = $DB->prepare("INSERT INTO `questions`(`from`, `to`, `problem`, `question`) VALUES (?, ?, ?, ?);");
$req->execute([$from->getId(), $to->getId(), $from->getProblem(), $default_questions[$_]]);
for ($i = 0; $i < 6; ++$i) {
$req = $DB->prepare("INSERT INTO `questions`(`from`, `to`, `problem`, `number`, `question`) VALUES (?, ?, ?, ?, ?);");
$req->execute([$from->getId(), $to->getId(), $from->getProblem(), $i, $default_questions[$i]]);
}
return self::getQuestions($from, $to);
}