So, i hope that i can explain my problem in a nearly correct english
I've installed the UQM and I made some quizzes with the time limit.
So, if I try to solve the quiz in a time out of limits it's all ok and I can't publish my results... but if I come back (with the same user), re-open the quiz and check the answers in a short time, the results will be showed.
I use the time to force the users to don't use Google...but if I can do the quiz 2 times, is useless use the time.
I can also solve the quiz how many times I want... This is a little "bug" of the mod...
There is the possibility to solve only ONE time the quiz, and if the user go out of time to do a result =0 ?
10x
TIME EXCEED
Moderator: CricketMX Forum Moderators
Do you mean that, you want a user to only be able to play a quiz once, regardless of whether they complete it or not?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"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)
"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)
yeah...maybe...
I want that a user can play a quiz ONLY ONE TIME.
I try to explane with an example:
I'm an user and I open a quiz.
I read the first question
I search the answer on Google and I write it
I read the second question
I search on Google ...
etc...
I click on SUBMIT QUIZ
And come up the phrase: "TIME LIMIT EXCEED"
So, I come back.
Refresh the page
Do the same quiz in 20sec with the answer that I've searched previously.
Submit my PERFECT result...
Is too easy to solve with this method...You understand?
I want that a user can play a quiz ONLY ONE TIME.
I try to explane with an example:
I'm an user and I open a quiz.
I read the first question
I search the answer on Google and I write it
I read the second question
I search on Google ...
etc...
I click on SUBMIT QUIZ
And come up the phrase: "TIME LIMIT EXCEED"
So, I come back.
Refresh the page
Do the same quiz in 20sec with the answer that I've searched previously.
Submit my PERFECT result...
Is too easy to solve with this method...You understand?
In the ACP under this Quiz Config have you selected the setting that users can only play a quiz once?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"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)
"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)
yeah of course, but the problem persist!
edit: Ok it was my error...Only the amministrator can play the quiz how many times he want but the problem with the time is the same:
If the user play the quiz once and he go out of time limit, he can play another time the same quiz.
edit: Ok it was my error...Only the amministrator can play the quiz how many times he want but the problem with the time is the same:
If the user play the quiz once and he go out of time limit, he can play another time the same quiz.
Even if you have the play once setting set to on?kikkotm wrote:If the user play the quiz once and he go out of time limit, he can play another time the same quiz.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"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)
"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)
I'll need to have a look at the code, I think I might need to write something custom for you.
Check back here tomorrow, hopefully I can post a quick solution for you
Check back here tomorrow, hopefully I can post a quick solution for you
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"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)
"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)
See if this fixes it.
Open quiz.php
FIND
REPLACE WITH
Open quiz.php
FIND
Code: Select all
if( $board_config['Quiz_timeout'] != 0 )
{
if( $time_taken_to_complete_quiz > ($board_config['Quiz_timeout'] * $number_of_questions) )
{
message_die(GENERAL_MESSAGE, $lang['Quiz_user_exceed_timelimit']);
}
}
Code: Select all
if( $board_config['Quiz_timeout'] != 0 )
{
if( $time_taken_to_complete_quiz > ($board_config['Quiz_timeout'] * $number_of_questions) )
{
$statistics_sql = "INSERT INTO " . QUIZ_STATISTICS_TABLE . " (stats_id, quiz_id, user_id, stats_correct, stats_incorrect, stats_percentage) VALUES ('" . quiz_new_stats_id() . "', '$id', '" . $userdata['user_id'] . "', '0', '0', '0', '0')";
if(!$db->sql_query($statistics_sql))
{
message_die(GENERAL_ERROR, '', 'Could not insert statistical values', __LINE__, __FILE__, $statistics_sql);
}
message_die(GENERAL_MESSAGE, $lang['Quiz_user_exceed_timelimit']);
}
}
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"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)
"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)
no...there is an error...
i try to write
instead
it run without errors, but the problem with time is the same...if the user exceed, he can run the quiz again
Code: Select all
DEBUG MODE
SQL Error : 1136 Column count doesn't match value count at row 1
INSERT INTO phpbb_quiz_statistics (stats_id, quiz_id, user_id, stats_correct, stats_incorrect, stats_percentage) VALUES ('14', '3', '40', '0', '0', '0', '0')
Line : 855
File : quiz.php
Code: Select all
if( $db->sql_query($statistics_sql))
Code: Select all
if(!$db->sql_query($statistics_sql))
Sorry, I think I accidentally entered a column too many. Give this a shot:
Open quiz.php
FIND
REPLACE WITH
Open quiz.php
FIND
Code: Select all
if( $board_config['Quiz_timeout'] != 0 )
{
if( $time_taken_to_complete_quiz > ($board_config['Quiz_timeout'] * $number_of_questions) )
{
message_die(GENERAL_MESSAGE, $lang['Quiz_user_exceed_timelimit']);
}
}
Code: Select all
if( $board_config['Quiz_timeout'] != 0 )
{
if( $time_taken_to_complete_quiz > ($board_config['Quiz_timeout'] * $number_of_questions) )
{
$statistics_sql = "INSERT INTO " . QUIZ_STATISTICS_TABLE . " (stats_id, quiz_id, user_id, stats_correct, stats_incorrect, stats_percentage) VALUES ('" . quiz_new_stats_id() . "', '$id', '" . $userdata['user_id'] . "', '0', '0', '0')";
if(!$db->sql_query($statistics_sql))
{
message_die(GENERAL_ERROR, '', 'Could not insert statistical values', __LINE__, __FILE__, $statistics_sql);
}
message_die(GENERAL_MESSAGE, $lang['Quiz_user_exceed_timelimit']);
}
}
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"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)
"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)
Fantastic, glad to hear all is well.
Please feel free to stick around, be sure to check out the OT Forum if you haven't already
Please feel free to stick around, be sure to check out the OT Forum if you haven't already
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"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)
"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)