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:
@ -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]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user