feed.sql: add some files
This commit is contained in:
parent
41b83ef725
commit
097023a32a
3 changed files with 33 additions and 9 deletions
|
|
@ -2,9 +2,24 @@
|
|||
|
||||
if(!defined('ONYX')) exit;
|
||||
|
||||
$exercice = new Exercice($EXERCICE);
|
||||
try
|
||||
{
|
||||
$exercice = new Exercice($EXERCICE);
|
||||
|
||||
$template->assign("Exercice", $exercice);
|
||||
//$template->assign("Number", $ex_number);
|
||||
if (!isset($exercice->id))
|
||||
return "404";
|
||||
|
||||
return "teams/exercice";
|
||||
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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,18 @@
|
|||
{/block}
|
||||
|
||||
{block name=content}
|
||||
<!-- TODO: resolved number -->
|
||||
<div>
|
||||
<h1>Exercice {$Number} - X</h1>
|
||||
|
||||
{if $solved < 1}
|
||||
<h1>Exercice {$Exercice->number} - {$solved} équipe a résolu cet exercice</h1>
|
||||
{else}
|
||||
<h1>Exercice {$Exercice->number} - {$solved} équipes ont résolu cet exercice</h1>
|
||||
{/if}
|
||||
<ul>
|
||||
<li>Difficulté : {$Exercice->statement}</li>
|
||||
<li>Gain :</li>
|
||||
<li>Difficulté : {$Exercice->level}</li>
|
||||
<li>Gain : {$Exercice->points}</li>
|
||||
<!-- Dowloads files -->
|
||||
<li>Description</li>
|
||||
<li>Description : {$Exercice->statement}</li>
|
||||
<!-- Input solution -->
|
||||
<ul>
|
||||
|
||||
|
|
|
|||
Reference in a new issue