2013-10-22 06:16:02 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if(!defined('ONYX')) exit;
|
|
|
|
|
2013-11-04 23:35:35 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
$exercice = new Exercice($EXERCICE);
|
2013-10-26 19:01:02 +00:00
|
|
|
|
2013-11-04 23:35:35 +00:00
|
|
|
if (!isset($exercice->id))
|
|
|
|
return "404";
|
2013-10-22 06:16:02 +00:00
|
|
|
|
2013-11-04 23:35:35 +00:00
|
|
|
if (!isset($exercice->theme) || $exercice->theme->name != $THEME)
|
|
|
|
return "404";
|
|
|
|
|
|
|
|
$solved = count($exercice->get_solved());
|
|
|
|
|
|
|
|
$template->assign("Exercice", $exercice);
|
|
|
|
$template->assign("solved", $solved);
|
|
|
|
|
|
|
|
return "teams/exercice";
|
|
|
|
}
|
|
|
|
catch(Exception $e)
|
|
|
|
{
|
|
|
|
return "404";
|
|
|
|
}
|