2013-10-22 06:16:02 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if(!defined('ONYX')) exit;
|
|
|
|
|
2013-11-28 16:01:31 +00:00
|
|
|
$themes = Theme::get_themes();
|
|
|
|
if (!empty($themes))
|
|
|
|
{
|
|
|
|
$max_exo = 0;
|
|
|
|
$res_exo = 0;
|
|
|
|
foreach($themes as $th)
|
|
|
|
{
|
|
|
|
$max_exo += $th->get_nb_exercices();
|
|
|
|
//$res_exo += $TEAM->get_nb_res_exercices_by_theme($th->get_id());
|
|
|
|
$res_exo += count($TEAM->get_solved_exercices($th->get_id()));
|
|
|
|
}
|
|
|
|
$percent = $res_exo * 100 / $max_exo;
|
|
|
|
}
|
|
|
|
|
2013-11-05 04:15:18 +00:00
|
|
|
$template->assign("themes", Theme::get_themes());
|
2013-11-12 15:52:50 +00:00
|
|
|
$template->assign("nbExoMax", Exercice::get_nb_exo_max());
|
2013-11-28 16:01:31 +00:00
|
|
|
$template->assign("percent", $percent);
|
2013-10-22 06:16:02 +00:00
|
|
|
|
2013-10-26 06:56:06 +00:00
|
|
|
return "teams/summary";
|