1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-25 07:00:29 +02:00

Phase 2 : amélioration du dépôt des questions

This commit is contained in:
galaxyoyo
2019-09-21 14:31:31 +02:00
parent 41c4734624
commit 81acf09fbf
3 changed files with 60 additions and 27 deletions

View File

@ -7,6 +7,7 @@ class Question
private $from;
private $to;
private $problem;
private $number;
private $question;
private $attached_file;
@ -101,13 +102,34 @@ class Question
return $this->problem;
}
public function getNumber()
{
return $this->number;
}
public function getQuestion()
{
return $this->question;
}
public function setQuestion($question)
{
global $DB;
$this->question = $question;
$req = $DB->prepare("UPDATE `questions` SET `question` = ? WHERE `id` = ?;");
$req->execute([$question, $this->id]);
}
public function getAttachedFile()
{
return $this->attached_file;
}
public function setAttachedFile($attached_file)
{
global $DB;
$this->attached_file = $attached_file;
$req = $DB->prepare("UPDATE `questions` SET `attached_file` = ? WHERE `id` = ?;");
$req->execute([$attached_file, $this->id]);
}
}