Permalink
Browse files

Making sure timelimit is converted to integer before being written to…

… database, otherwise postgreSQL complains. Closing bug 5401
  • Loading branch information...
1 parent 344c9e0 commit 569936ac790580c058d5058d959604dc2141e7ba gustav_delius committed May 13, 2006
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/quiz/lib.php
View
@@ -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
}
@@ -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
}

0 comments on commit 569936a

Please sign in to comment.