In future versions, I will relax the settings on capital letters, but there's not a lot I can do for correct spelling etc.
Here is a quick fix (it is untested though, so if you experience any problems, remove it immediately).
Open quiz.php, FIND
Code: Select all
if($user_answer == $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, '<font color="green">' . $actual_answer . '</font>');
}
else if($user_answer != $actual_answer)
{
$correct[$i] = 0;
$incorrect[$i] = 1;
$status = sprintf($lang['Quiz_answer_status'], $user_answer, '<font color="red">' . $actual_answer . '</font>');
}
REPLACE THAT ENTIRE SECTION WITH
Code: Select all
if(strtoupper($user_answer) == strtoupper($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, '<font color="green">' . $actual_answer . '</font>');
}
else if(strtoupper($user_answer) != strtoupper($actual_answer))
{
$correct[$i] = 0;
$incorrect[$i] = 1;
$status = sprintf($lang['Quiz_answer_status'], $user_answer, '<font color="red">' . $actual_answer . '</font>');
}
The modifications that are being made are changing the 'if' and 'else if' lines, so that it sees all answers in the database as entirely in caps, and all the answers submitted by the user, entirely in caps, so that there won't be any conflict with capital letters
For example, before, it might say in the database that the answer was 'Gift', and the user typed in 'gift', and result in a 'no match'. This change will alter the database answer to GIFT (all caps) and the user answer to GIFT also, meaning there is a match now
