feed.sql: add some files
This commit is contained in:
parent
41b83ef725
commit
097023a32a
@ -227,3 +227,8 @@ VALUES (
|
|||||||
), (
|
), (
|
||||||
'24', '9', '39', '2013-10-09 00:35:00'
|
'24', '9', '39', '2013-10-09 00:35:00'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `exercice_files` (`id`, `id_exercice`, `path`, `name`, `sha1`) VALUES
|
||||||
|
('1', '22', 'theme/exo/file1.txt', 'file1.txt', '38be7d1b981f2fb6a4a0a052453f887373dc1fe8'),
|
||||||
|
('2', '22', 'theme/exo/file2.txt', 'file2.txt', '639daad06642a8eb86821ff7649e86f5f59c6139');
|
||||||
|
@ -2,9 +2,24 @@
|
|||||||
|
|
||||||
if(!defined('ONYX')) exit;
|
if(!defined('ONYX')) exit;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
$exercice = new Exercice($EXERCICE);
|
$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("Exercice", $exercice);
|
||||||
//$template->assign("Number", $ex_number);
|
$template->assign("solved", $solved);
|
||||||
|
|
||||||
return "teams/exercice";
|
return "teams/exercice";
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
return "404";
|
||||||
|
}
|
||||||
|
@ -5,14 +5,18 @@
|
|||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name=content}
|
{block name=content}
|
||||||
<!-- TODO: resolved number -->
|
|
||||||
<div>
|
<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>
|
<ul>
|
||||||
<li>Difficulté : {$Exercice->statement}</li>
|
<li>Difficulté : {$Exercice->level}</li>
|
||||||
<li>Gain :</li>
|
<li>Gain : {$Exercice->points}</li>
|
||||||
<!-- Dowloads files -->
|
<!-- Dowloads files -->
|
||||||
<li>Description</li>
|
<li>Description : {$Exercice->statement}</li>
|
||||||
<!-- Input solution -->
|
<!-- Input solution -->
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user