Hi,
When creating a Quiz node programmatically, I found an issue in quiz_insert. The has_userpoint and tid parameters are inverted in the query string and in the db_query call. So $tid is written in column `has_userpoint` and $node->has_userpoint in column `tid`.
The fix is simply to invert $tid and $node->has_userpoints in the db_query call at line 409 of quiz.module.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | quiz_tid_has_userpoints.patch | 953 bytes | recidive |
| #5 | quiz_tid_has_userpoints.patch | 1.19 KB | recidive |
Comments
Comment #1
sivaji_ganesh_jojodae commentedYeah that's right.
Fix has been committed to CVS quiz 3.x-dev, will be available in next 12 hours. Thank you for reporting.
Comment #2
sivaji_ganesh_jojodae commentedComment #4
recidive commentedIt seems this didn't get applied to 6.4 branch.
Patch attached.
Comment #5
recidive commentedOops, forgot to attach the patch for 6.4.
Here it goes.
Comment #6
recidive commentedMy last patch was actually taken from HEAD.
Here is the patch to fix that in DRUPAL-6--4. I've changed the variable instead of the SQL, to keep inline with the column order in the db table.
Comment #7
sivaji_ganesh_jojodae commentedThanks committed to CVS.