1
0
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:
galaxyoyo
2019-09-19 00:31:53 +02:00
parent 1e67b8569d
commit 5372350f46
13 changed files with 289 additions and 17 deletions

View File

@ -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";
}
}