Is there a way that I could query the database to pull information on the quizes down to the question? For example, I would like to know, if 100 people took a quiz what percent of them got question 1 right, question 2 right, and so on. Also how many people submitted answers to all the questions in my quiz, what is the average score buy individual, what is average time for a quiz and so forth. If there is a way to do this already please let me know. Any assitance would be much appreciated. Thanks.
Paul
Comments
Comment #1
westwesterson commentedI don't support version 5.x-1.x
Views support was introduced in version 5.x-2.x which is a flexible query builder which may be able to handle some of this stuff. Otherwise you will have to code this up from scratch. Any code contributions on this would be welcomed by the community I am sure ;-)
Comment #2
tl1000s77 commentedWell, I upgraded to 5.x-2.0-rc1 and when I go and take a look at the Quiz results...there's nothing there.
Comment #3
drewrwilson commentedI had a similar problem with with the 5.x version and it was not solved by upgrading to the 6.x version. I still cannot get the test results to display. I could get them to display in 5.x-1.1 but not 5.x-2.0 or 6.x-2.0.
I get a database error:
Table 'pdr.quiz_node_result_options' doesn't exist query: SELECT nid FROM quiz_node_result_options WHERE option_id = 0 in /xx/sites/all/modules/quiz/multichoice.module on line 92.
Any advice?
Comment #4
drewrwilson commentedI believe the prefix that I'm using in my db is missing from the query. Not sure where in the code that happened, but I'm trying to track it down.
Comment #5
mbutcher commenteddrewilson: Ugh... that was an error I caught and fixed in the 3.x dev branch and forgot to backport. Terribly sorry about that.
Basically, a table name was typed incorrectly.
The issue is fixed in CVS and will be rolled into 6.x-2.1 (next week?).
It's already fixed in the 3.x snapshots -- which are unstable, so probably not good to use on anything but a dev environment.
Comment #6
drewrwilson commentedOk, neat. Glad you could track it down. I'm looking forward to the 6.x-2.1 release. Since I'm on tighter timeline for this project, I may need to look through the CVS to track down the typo and fix it in my 2.0 install anyway.
I'm excited about the new version! Thanks!
Comment #7
mbutcher commentedQuick fix:
1. Search multichoice.module for quiz_node_result_options. You should get one match.
2. Surround that with {}, e.g. {quiz_node_result_options}
The end.
Comment #8
drewrwilson commentedSweet! Fixed it. No DB error in my log file anymore when I go to the Test Results page (?q=admin/quiz/results).
But results still don't show up like they did in 5.x-1.1. The ?q=admin/quiz/results page only displays: "Test results. No Test results found." I check the DB and still have around a thousand results.
I'm going to play around with the Views section to see if I can get a View that'll work for me. Anyway I can help test the display error?
Thanks!
Comment #9
mbutcher commentedThe query that gets run looks like this:
(each {foo} is a table name placeholder to be replaced by your_prefix_table_name, e.g. my_node, or my_quiz_node_properties)
If you run that, do you see any results? What database software are you running?
Hope I'm not asking too much from you, but I'm stumped on why this isn't working. Though if these are older quizzes imported from 5... there may be some missing information for the join on quiz_node_properties.
Anyway, let me know and let's see if we can get this bug fixed in time for 2.1.
Matt
Comment #10
mbutcher commentedReopened this since there is still a bug.
Comment #11
drewrwilson commentedI replaced the {foo}'s with my prefix and the SQL query runs, but returns: "Empty set (0.00 sec)".
My MySQL version is: 5.0.67-0ubuntu6
My PHP version is: 5.2.6-2ubuntu4
No need to apologize, I'm happy to help! Especially since it will help me get my site working with the new version.
I am using data imported from a 5.x install. The working version of my project is 5.x-1.1, but I need to get Views to work so I can generate better stats from the results. So I installed 6.x and upgraded the quiz module to 6.x-2.0. I ran the update.php to upgrade the database. Is there more updating that I need to do to the DB?
Also feel free to email me, if you want quicker responses: drew.r.wilson at gmail
aim: drewrwilson
Thanks for all the support! Let me know what I can do to help. I'll keep trying to get this working.
Comment #12
mbutcher commentedThe more I look at that query, the more suspect it looks. I'm not sure why it is joining against the properties table, since it is joining on NID, and it is neither selecting out any data nor using it in the where clause.
Can you give this a shot instead?
IIRC, this should match the format for the 5.x tables.
Comment #13
drewrwilson commentedAgain we get another "Empty set (0.00 sec)".
(Also, I added my db prefix to "node", "quiz_node", and "users")
Comment #14
mbutcher commentedThis issue is resolved in Quiz 3