@@ -909,13 +909,17 @@ function quiz_type_access_load($arg) {
* Returns the number of quiz questions.
*/
functionquiz_get_number_of_questions($vid,$nid){
// The CAST is required for PostgreSQL.
$sql='SELECT CAST(COUNT(*) AS UNSIGNED INTEGER) + CAST((SELECT number_of_random_questions FROM {quiz_node_properties} WHERE vid = %d AND nid = %d) AS UNSIGNED INTEGER)