mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-25 04:20:28 +02:00
Diffusion des vidéos
This commit is contained in:
@ -9,6 +9,7 @@ class Team
|
||||
private $encadrant;
|
||||
private $participants;
|
||||
private $inscription_date;
|
||||
private $allow_publish;
|
||||
private $validation_status;
|
||||
private $video_team_ids;
|
||||
private $access_code;
|
||||
@ -95,6 +96,7 @@ class Team
|
||||
$this->encadrant = $data["encadrant"];
|
||||
$this->participants = [$data["participant_1"], $data["participant_2"], $data["participant_3"], $data["participant_4"], $data["participant_5"]];
|
||||
$this->inscription_date = $data["inscription_date"];
|
||||
$this->allow_publish = $data["allow_publish"];
|
||||
$this->validation_status = ValidationStatus::fromName($data["validation_status"]);
|
||||
$this->video_team_ids = [$data["video_team1"], $data["video_team2"]];
|
||||
$this->access_code = $data["access_code"];
|
||||
@ -173,6 +175,18 @@ class Team
|
||||
return $this->inscription_date;
|
||||
}
|
||||
|
||||
public function allowPublish()
|
||||
{
|
||||
return $this->allow_publish;
|
||||
}
|
||||
|
||||
public function setAllowPublish($allow_publish)
|
||||
{
|
||||
global $DB;
|
||||
$this->allow_publish = $allow_publish;
|
||||
$DB->prepare("UPDATE `teams` SET `allow_publish` = ? WHERE `id` = ?;")->execute([$allow_publish ? 1 : 0, $this->id]);
|
||||
}
|
||||
|
||||
public function getValidationStatus()
|
||||
{
|
||||
return $this->validation_status;
|
||||
|
Reference in New Issue
Block a user