quiz input answers case sensitive

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

quiz input answers case sensitive

Postby kking183 » Tue Jul 03, 2007 10:10 am

hi i have installed your quiz mod but i seem to be having the problem the answers are case sensitive but i am using your latest version 1.33 which says this bug had been fixed can you tell me whats wrong as far as i know i installed it all correctly i uploaded the files edited the ones that need editing then run the install.php
my site is http://www.nopaypoker.co.uk if you want to take a look
and you can use this username

username : support
password : help
kking183
Greenhorn
Greenhorn
 
Posts: 20
Joined: Tue Jul 03, 2007 10:03 am

Postby battye » Tue Jul 03, 2007 10:40 am

If you open quiz.php, can you find this code?

Code: Select all
         if(strtolower($user_answer) == strtolower($actual_answer))
         {
            $correct[$i] = 1;
            $incorrect[$i] = 0;
            
            // The message consists of Question: Your Answer: Actual Answer
            $status = sprintf($lang['Quiz_answer_status'], $user_answer, $actual_answer);
         }
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14264
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Postby kking183 » Tue Jul 03, 2007 10:54 am

yes its there thank you for the quick reply
kking183
Greenhorn
Greenhorn
 
Posts: 20
Joined: Tue Jul 03, 2007 10:03 am

Postby battye » Tue Jul 03, 2007 10:57 am

Just to test that, replace that section with:

Code: Select all
         if(strtolower("AAAaaa") == strtolower("aaaaaa"))
         {
            $correct[$i] = 1;
            $incorrect[$i] = 0;
           
            // The message consists of Question: Your Answer: Actual Answer
            $status = sprintf($lang['Quiz_answer_status'], $user_answer, $actual_answer);
         }


Let me know what happens :)

Welcome to the forum by the way :)
Don't forget to make a post in Introductory Forum :D
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14264
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Postby kking183 » Tue Jul 03, 2007 11:04 am

all that seemed to do is make it say all the answers were correct
kking183
Greenhorn
Greenhorn
 
Posts: 20
Joined: Tue Jul 03, 2007 10:03 am

Postby battye » Tue Jul 03, 2007 11:16 am

That is good, it shows that the mechanism is working. Hmm :?

Replace it with

Code: Select all
         if(strtolower($user_answer) == strtolower($actual_answer))
         {
            $correct[$i] = 1;
            $incorrect[$i] = 0;
            
            // The message consists of Question: Your Answer: Actual Answer
            $status = sprintf($lang['Quiz_answer_status'], $user_answer, $actual_answer);
         }


Again, so it is back like it was originally.

Then before:

Code: Select all
if(strtolower($user_answer) == strtolower($actual_answer))
         {


Add:

Code: Select all
$message_d = 'USER ANSWER: ' . strtolower($user_answer) . ' || ACTUAL ANSWER: ' . strtolower($actual_answer) . '<br />';
echo @$message_d;


Let me know what it says (in fact, paste what it says here :))
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14264
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Postby kking183 » Tue Jul 03, 2007 11:23 am

very strange just before you replied again i changed the top line of the code back to the original and it seems to be working now :roll:
kking183
Greenhorn
Greenhorn
 
Posts: 20
Joined: Tue Jul 03, 2007 10:03 am

Postby kking183 » Tue Jul 03, 2007 11:25 am

USER ANSWER: david coleman || ACTUAL ANSWER: david coleman
USER ANSWER: || ACTUAL ANSWER: toy story 2
USER ANSWER: || ACTUAL ANSWER: k-9
USER ANSWER: || ACTUAL ANSWER: anthea turner
USER ANSWER: || ACTUAL ANSWER: jack nicholson
USER ANSWER: || ACTUAL ANSWER: tim brooke-taylor, graeme garden and bill oddie
USER ANSWER: || ACTUAL ANSWER: chris evans and gaby roslin
USER ANSWER: || ACTUAL ANSWER: the man with the golden gun
USER ANSWER: || ACTUAL ANSWER: meg ryan
USER ANSWER: || ACTUAL ANSWER: lassie
thats what it showed i only answered the first question
kking183
Greenhorn
Greenhorn
 
Posts: 20
Joined: Tue Jul 03, 2007 10:03 am

Postby kking183 » Tue Jul 03, 2007 11:26 am

Who did Sue Barker replace as host of the BBC quiz show "A Question Of Sport"? Your answer was david coleman, the correct answer was David Coleman
In 1999, what film became Tom Hanks first sequel? Your answer was , the correct answer was Toy Story 2
What was the name of the robot dog that became a regular companion for "Doctor Who"? Your answer was , the correct answer was K-9
Which former "Blue Peter" presenter was involved in the first National Lottery TV draw in November 1994? Your answer was , the correct answer was Anthea Turner
Who played The Joker in the 1989 film "Batman"? Your answer was , the correct answer was Jack Nicholson
Who were the three stars of the TV show "The Goodies"? Your answer was , the correct answer was Tim Brooke-Taylor, Graeme Garden and Bill Oddie
Who were the original presenters on Channel 4's "Big Breakfast"? Your answer was , the correct answer was Chris Evans and Gaby Roslin
In which Bond film does Britt Ekland play the character of Mary Goodnight? Your answer was , the correct answer was The Man With The Golden Gun
Which actress divorced Dennis Quaid in 2001 after she had an affair with Russell Crowe? Your answer was , the correct answer was Meg Ryan
Which famous female character of TV and films was played by a male when she was first introduced to our screens in 1943? Your answer was , the correct answer was Lassie
Correct Answers: 1 Incorrect Answers: 9
10%
You took 0 minutes, 16 seconds
kking183
Greenhorn
Greenhorn
 
Posts: 20
Joined: Tue Jul 03, 2007 10:03 am

Postby battye » Tue Jul 03, 2007 11:30 am

kking183 wrote:very strange just before you replied again i changed the top line of the code back to the original and it seems to be working now :roll:


If it is working, don't make any more changes :)
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14264
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Postby kking183 » Tue Jul 03, 2007 11:34 am

thanks for all your help as soon as i have made some more quizzes i will attempt making some quiz packs for here :)
kking183
Greenhorn
Greenhorn
 
Posts: 20
Joined: Tue Jul 03, 2007 10:03 am

Postby battye » Tue Jul 03, 2007 11:46 am

Fantastic news, mate :)

Hope to see you around here again. Feel free to check out our OT Forum if you are interested :)
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14264
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe


Return to Web Design

Who is online

Users browsing this forum: No registered users and 1 guest

cron