28 lines
527 B
PHP
28 lines
527 B
PHP
<?php
|
|
|
|
if(!defined('ONYX')) exit;
|
|
|
|
try
|
|
{
|
|
$exercice = new Exercice($EXERCICE);
|
|
|
|
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";
|
|
}
|