Status
Not open for further replies.

valdi

Customer
Hi,
Results Table --> Date Taken User Name Incorrect Correct Percentage/Score

Incorrect indicates a bad result?

Shows how much all the answers in the quiz - for example...

Quiz consists of three questions. Each answer has four options.
If you answer correctly the result should be like this:
Resul --> Incorrect = 0, Correct=3

why is: Incorrect = 9, Correct=3

Thanks.
 
Sorry it took me a bit to trace this down and figure out the fix.

If you open dbtech/vbquiz/actions/results.php

On about line 80 find

PHP:
            if (($quiz_data['quiz_type'] != 7) && ($quiz_data['quiz_type'] != 8) && ($quiz_data['quiz_type'] != 9) && ($quiz_data['quiz_type'] != 11))
            {
                $userresult_data['incorrect'] = $quest_count['quest_count'] - $userresult_data['correct'];
            } else {

and replace with

PHP:
            if (($quiz_data['quiz_type'] != 7) && ($quiz_data['quiz_type'] != 8) && ($quiz_data['quiz_type'] != 9) && ($quiz_data['quiz_type'] != 11))
            {
                $quest_count = $vbulletin->db->query_first("
                    SELECT 
                        COUNT(question_id) AS quest_count 
                    FROM " . TABLE_PREFIX . "dbtech_vbquiz_question 
                    WHERE 
                        quiz_id = " . intval($id) . "
                ");

                $userresult_data['incorrect'] = $quest_count['quest_count'] - $userresult_data['correct'];
            } else {

That should fix the problem. I will include it in the next release.
 
Thanks, for Multiple Choice is OK,
for Multi Selection this does not work correctly, gives the incorrect {wrong} result.
The rest I did not check.

I greet.
 
Thanks, for Multiple Choice is OK,
for Multi Selection this does not work correctly, gives the incorrect {wrong} result.
The rest I did not check.

I greet.

Can you give me an example on the multiple select? I tested with some questions locally and it worked.
 
OK.

Quiz consists of two questions. Each answer has four options.
1. (Multiple Choice)
2+2=

answers:
1. 4 (yes) 1points
2. 3 (no)
3. 2 (no)
4. 1 (no)


2. (Multi Selection)
4=

answers:
1. 2+2 (yes) 1points
2. 3+1 (yes) 1points
3. 5-1 (yes) 1points
4. 6-2 (yes) 1points

If you answer correctly the result should be like this:
Resul --> Incorrect = 0, Correct=5

why is: Incorrect = -3, Correct=5

Thanks.
 
Hey Dylan.

I tested other quizzes Multi Selection in each Result Incorrect error occurs if the response is more than one.
what do we do?
 
I'm trying to figure out the problem. The quiz is scored correctly but the display on the results page is off.
 
Sorry, I worked it out so they both work. I can't find a way it doesn't work now. Let me know if you see something I don't heh.
Instead of giving you things to change, just upload the attached file to dbtech/vbquiz/actions/

It should show correct for all type results now.
 

Attachments

  • results.php
    5.4 KB · Views: 6
Sorry... I swapped the file, nothing has changed.
Tested quiz:
1. (Multiple Choice)
2+2=

answers:
1. 4 (yes) 1points
2. 3 (no)
3. 2 (no)
4. 1 (no)


2. (Multi Selection)
4=

answers:
1. 2+2 (yes) 1points
2. 3+1 (yes) 1points
3. 5-1 (yes) 1points
4. 6-2 (yes) 1points

If you answer correctly the result should be like this:
Resul --> Incorrect = 0, Correct=5

why is: Incorrect = -3, Correct=5
 
Status
Not open for further replies.

Legacy vBQuiz

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
435
Customer rating
0.00 star(s) 0 ratings
Back
Top