Summary table done.

This commit is contained in:
Quentin Grosyeux 2013-11-07 21:53:35 +01:00
commit 8758598104
4 changed files with 44 additions and 6 deletions

View file

@ -25,8 +25,17 @@
<tr>
<th>{$theme->get_name()}</th>
{$sum=0}
{foreach from=$theme->get_exercicesOrdered() item=exo}
{$pts=$exo->points}{$sum=$sum + $pts}
{$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>