mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-24 11:48:46 +02:00
Flexibilité sur la validation des vidéos accrue
This commit is contained in:
@ -53,7 +53,7 @@ function quitTeam()
|
||||
/** @noinspection SqlResolve */
|
||||
$DB->exec("UPDATE `teams` SET `participant_$i` = NULL WHERE `participant_$i` = $user_id;");
|
||||
else
|
||||
$DB->exec("UPDATE `teams` SET `encadrant` = NULL WHERE `encadrant` = $user_id;");
|
||||
$DB->exec("UPDATE `teams` SET `encadrant` = NULL WHERE `encadrant` = $user_id;");
|
||||
$user->setTeamId(null);
|
||||
for ($i = 1; $i <= 4; ++$i) {
|
||||
/** @noinspection SqlResolve */
|
||||
@ -167,4 +167,12 @@ function getZipFile($problem, $team_id = -1)
|
||||
$zip->close();
|
||||
|
||||
return $file_name;
|
||||
}
|
||||
|
||||
function displayVideo($link)
|
||||
{
|
||||
if (preg_match("#(https?\://|)(www\.|)youtube\.com\/watch\?v=(.*)#", $link, $matches)) {
|
||||
$code = $matches[3];
|
||||
echo "<center><iframe width=\"854px\" height=\"480px\" src=\"https://www.youtube.com/embed/$code\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe></center><br />\n";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user