Skip to content

Commit

Permalink
Making sure timelimit is converted to integer before being written to…
Browse files Browse the repository at this point in the history
… database, otherwise postgreSQL complains. Closing bug 5401
  • Loading branch information
gustav_delius committed May 13, 2006
1 parent 344c9e0 commit 569936a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/quiz/lib.php
Expand Up @@ -90,7 +90,7 @@ function quiz_add_instance($quiz) {
}
}
$quiz->name = trim($quiz->name);

$quiz->timelimit = round($quiz->timelimit);
if (!$quiz->id = insert_record("quiz", $quiz)) {
return false; // some error occurred
}
Expand Down Expand Up @@ -149,7 +149,7 @@ function quiz_update_instance($quiz) {
$quiz->closehour, $quiz->closeminute, 0);
}
$quiz->id = $quiz->instance;

$quiz->timelimit = round($quiz->timelimit);
if (!update_record("quiz", $quiz)) {
return false; // some error occurred
}
Expand Down

0 comments on commit 569936a

Please sign in to comment.