Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When selecting Random Questions for a quiz and then starting the quiz you get the following error, seems like the db_query_range isn't updated for D7.
• Warning: Missing argument 3 for db_query_range(), called in /Users/cjelger/Sites/ne.cj/public_html/sites/all/modules/contrib/quiz/quiz.module on line 3322 and defined i db_query_range() (rad 2345 av /Users/cjelger/Sites/ne.cj/public_html/includes/database/database.inc).
• Notice: Undefined variable: count i db_query_range() (rad 2350 av /Users/cjelger/Sites/ne.cj/public_html/includes/database/database.inc).
• PDOException: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound: SELECT child_nid as nid, child_vid as vid FROM {quiz_node_relationship} WHERE parent_vid = :parent_vid AND parent_nid = :parent_nid AND question_status = :question_status ORDER BY RAND() LIMIT 1, 0; Array ( ) i _quiz_get_random_questions() (rad 3322 av /Users/cjelger/Sites/ne.cj/public_html/sites/all/modules/contrib/quiz/quiz.module).
Comment | File | Size | Author |
---|---|---|---|
#2 | quiz-randomquestion-1480132-2.patch | 1.16 KB | Noe_ |
#1 | quiz.patch | 1.15 KB | Noe_ |
Comments
Comment #1
Noe_ CreditAttribution: Noe_ commentedI don't know if this works, however I did get promising results.
The thing is that I haven't really figured the quiz module out entirely (as in I haven't made a quiz yet).
Comment #2
Noe_ CreditAttribution: Noe_ commentedThis one should be better.
Comment #3
falcon CreditAttribution: falcon commentedThanks! Patch commited with some readability changes
Comment #4
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented+ while ($question_node = $result->db_fetch_array()) {
This line needs fix.
Comment #10
djdevin