Add sumarry

This commit is contained in:
Quentin Grosyeux 2013-11-05 05:15:18 +01:00
commit bf36486bf3
5 changed files with 58 additions and 0 deletions

View file

@ -205,4 +205,16 @@ class Exercice
"sha1" => $sha1
);
}
public static function get_nbExoMax()
{
$db = new BDD();
$res = $db->unique_query("SELECT count(id) AS max FROM exercices
GROUP BY id_theme
ORDER BY max DESC
LIMIT 1");
$db->deconnexion();
return $res['max'];
}
}

View file

@ -169,6 +169,13 @@ class Team
return $res['solved'];
}
function get_solvedExercices()
{
$db = new BDD();
$ids = $db->query("");
$db->deconnexion();
}
function authenticate($certificate)
{
//TODO

View file

@ -131,6 +131,9 @@ class Theme
}
}
foreach($res as &$r)
$r = new Exercice($r["id"]);
return $res;
}
}