Plein de trucs fonctionnent maintenant
This commit is contained in:
parent
8758598104
commit
e3384eaa6b
22 changed files with 321 additions and 352 deletions
|
|
@ -1,54 +1,9 @@
|
|||
{extends file="layout-nav.tpl"}
|
||||
{extends file="teams/layout.tpl"}
|
||||
|
||||
{block name=head}
|
||||
<link href="/css/common.css" rel="stylesheet">
|
||||
{/block}
|
||||
|
||||
{block name=content}
|
||||
<h1>
|
||||
THIS IS SUMMARY
|
||||
</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
{for $i=1 to $nbExoMax}
|
||||
<th>exo{$i}</th>
|
||||
{/for}
|
||||
<th>Points</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{$total=0}
|
||||
{foreach from=$themes item=theme}
|
||||
<tr>
|
||||
<th>{$theme->get_name()}</th>
|
||||
{$sum=0}
|
||||
{$themeID=$theme->get_id()}
|
||||
{$solvedExercices=$team->get_solvedExercices($themeID)} {*TODO: This line give a Warning*}
|
||||
{foreach from=$theme->get_exercicesOrdered() item=exo}
|
||||
{$pts=0}
|
||||
{for $i=0 to $nbExoMax}
|
||||
{if !empty($solvedExercices.$i)}
|
||||
{if $solvedExercices.$i->get_id() == $exo->get_id()}
|
||||
{$pts=$solvedExercices.$i->points}{$sum=$sum + $pts}
|
||||
{/if}
|
||||
{/if}
|
||||
{/for}
|
||||
<td>{$pts}</td>
|
||||
{/foreach}
|
||||
<td>{$sum}</td>
|
||||
</tr>
|
||||
{$total=$total+$sum}
|
||||
{/foreach}
|
||||
<tr>
|
||||
{for $i=1 to $nbExoMax}
|
||||
<td></td>
|
||||
{/for}
|
||||
<td>Total :</td>
|
||||
<td>{$total}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{include file="summary.tpl"}
|
||||
{/block}
|
||||
|
|
|
|||
Reference in a new issue