Add on exercice page the last try time

This commit is contained in:
nemunaire 2014-01-14 17:09:29 +01:00
commit 6b5e51f4e3
4 changed files with 38 additions and 2 deletions

View file

@ -67,6 +67,8 @@ for my $f (readdir $dh)
{'RaiseError' => 1, 'PrintError' => 1})
or die $DBI::errstr if !$dbh;
query($dbh, "INSERT INTO exercice_tries (id_exercice, id_team, time) VALUES ('$exercice', $team, CURRENT_TIMESTAMP);");
my $sth = query($dbh, "SELECT format, value FROM exercice_keys WHERE id_exercice = ".$dbh->quote($exercice));
# Check solutions