Plein de trucs fonctionnent maintenant
This commit is contained in:
parent
8758598104
commit
e3384eaa6b
22 changed files with 321 additions and 352 deletions
|
|
@ -2,35 +2,20 @@
|
|||
|
||||
if(!defined('ONYX')) exit;
|
||||
|
||||
try
|
||||
$solved = count($EXERCICE->get_solved());
|
||||
|
||||
if ($n == 5 && $p[4] == "submission")
|
||||
{
|
||||
$exercice = new Exercice($EXERCICE);
|
||||
$template->assign("ERRcolor", "success");
|
||||
$template->assign("ERRmessage", "Votre réponse a bien été prise en compte et sera évaluée dans quelques instants...");
|
||||
|
||||
//TOP10
|
||||
// $template->assign("top10", Team::get_top(10));
|
||||
//
|
||||
// //RANK
|
||||
// $template->assign("my_team", new Team($TEAM));
|
||||
//
|
||||
// //BEGIN LISTING THEMES
|
||||
// $template->assign("themes", Theme::get_themes());
|
||||
|
||||
if (!isset($exercice->id))
|
||||
return "404";
|
||||
|
||||
if (!isset($exercice->theme) || $exercice->theme->name != $THEME)
|
||||
return "404";
|
||||
|
||||
$solved = count($exercice->get_solved());
|
||||
|
||||
$template->assign("Exercice", $exercice);
|
||||
$template->assign("team", $TEAM);
|
||||
$template->assign("solved", $solved);
|
||||
$template->assign("files", $exercice->files);
|
||||
|
||||
return "teams/exercice";
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
return "404";
|
||||
if (!empty($_POST["solution"]))
|
||||
{
|
||||
header("Location: /".implode("/", $p));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign("solved", $solved);
|
||||
|
||||
return "teams/exercice";
|
||||
|
|
|
|||
Reference in a new issue