Page 1 of 2
bugs in 1.3.0
Posted: Thu May 11, 2006 12:00 pm
by abramelin
i cant open quiz_cp.php when i want to open it there is only a white blank page comes and the second bug is there is no emty field controller when adding a quiz.if i left all the fields emty i can still submit the quiz.
Posted: Thu May 11, 2006 3:23 pm
by battye
quiz_cp.php works fine for me. Are you sure it's been uploaded correctly?
I'll look into the empty fields issue. Thanks for alerting me to that.

Posted: Thu May 11, 2006 4:26 pm
by abramelin
yes its uploaded correctly but stills getting white blank page
and how is the time function works? i cant see any countdown . if there can be a countdown that would be very good .
and by the way i am beta testing this mod

i'll report all the bugs to you

Posted: Sat May 13, 2006 4:52 pm
by battye
There is a countdown function in 1.3.0, but you must enable it within the ACP -> Quiz
About the blank page, I don't know what to say really, I am not having problems, and nobody else is reporting the problem
Do you use PHP5?
Posted: Sun May 14, 2006 12:07 am
by abramelin
no i dont use php5.by the way i am calling it like
http://www.domain.com/forum/quiz_cp.php is it true . i mean is it work as it self or it works from another place and get queris like ...quiz_cp.php?delete=12
and what about the emty field? any news?
thanks for great script again.
Posted: Sun May 14, 2006 3:38 am
by battye
You are supposed to click the edit / delete / move link on the actual quiz page, calling it by quiz_cp.php isn't the way to go

Posted: Sun May 14, 2006 11:39 am
by abramelin
ohh im so sory

but where is these edit/move things?
another question. why supporting only cash mod? do you plan to support points system ? it uses user_points in mysql
Posted: Sun May 14, 2006 2:34 pm
by battye
abramelin wrote:ohh im so sory

but where is these edit/move things?
another question. why supporting only cash mod? do you plan to support points system ? it uses user_points in mysql
When you play a quiz, go to the bottom left of the page. You will see the options there
I only support Cash MOD because I don't know how the points system works. Having said that, if it is at all similar to the Cash MOD, it should be compatible with the Ultimate Quiz MOD
You can be the first to tell me if it works

Posted: Mon May 15, 2006 12:00 am
by abramelin
i only know that cash and point system uses the user_points field so it cant be diffucult to make it compatible with user points mod.i looked at the code area for the cash
Code: Select all
// Lets get the currency.. err... name?
$get_cash_name = "SELECT cash_name FROM " . CASH_TABLE . " WHERE cash_dbfield = '" . $board_config['Quiz_Cash_Currency'] . "'";
if( !$get_cash_result = $db->sql_query($get_cash_name) )
{
message_die(GENERAL_ERROR, 'Unable to execute cash name query', '', __LINE__, __FILE__, $get_cash_name);
}
$actual_cash_name = $db->sql_fetchrow($get_cash_result);
$cash_per_correct = $board_config['Quiz_Cash_Correct'];
$cash_per_incorrect = $board_config['Quiz_Cash_Incorrect'];
$cash_tax = $board_config['Quiz_Cash_Tax'];
$total_cash = ( ( @array_sum($correct) * $cash_per_correct ) - ( @array_sum($incorrect) * $cash_per_incorrect ) - ( $cash_tax ) );
if( $total_cash > 0 || $total_cash == 0 )
{
$cash_language_variable = sprintf($lang['Quiz_cash_total_result_gain'], $total_cash, $actual_cash_name['cash_name']);
$cash_sql = "UPDATE " . USERS_TABLE . " SET " . $board_config['Quiz_Cash_Currency'] . " = " . $board_config['Quiz_Cash_Currency'] . " + " . intval($total_cash) . " WHERE user_id = " . $userdata['user_id'];
}
else if( $total_cash < 0 )
{
$total_cash = str_replace('-', '', $total_cash);
$cash_language_variable = sprintf($lang['Quiz_cash_total_result_loss'], $total_cash, $actual_cash_name['cash_name']);
$cash_sql = "UPDATE " . USERS_TABLE . " SET " . $board_config['Quiz_Cash_Currency'] . " = " . $board_config['Quiz_Cash_Currency'] . " - " . intval($total_cash) . " WHERE user_id = " . $userdata['user_id'];
}
if( !$db->sql_query($cash_sql) )
{
message_die(GENERAL_ERROR, 'Unable to execute cash update', '', __LINE__, __FILE__, $cash_sql);
}
$template->assign_block_vars('cash_row', array());
$template->assign_vars(array("U_CASH" => $cash_language_variable));
}
and cant figured out how to update the user_points field because the sql update queries you used doesnt contain any user_points field

ü
and the last thing is i tested a quiz in my forum but i didnt see any countdown javascript?
Posted: Mon May 15, 2006 12:28 am
by battye
Try doing the following.
Replace the following
Code: Select all
$get_cash_name = "SELECT cash_name FROM " . CASH_TABLE . " WHERE cash_dbfield = '" . $board_config['Quiz_Cash_Currency'] . "'";
if( !$get_cash_result = $db->sql_query($get_cash_name) )
{
message_die(GENERAL_ERROR, 'Unable to execute cash name query', '', __LINE__, __FILE__, $get_cash_name);
}
$actual_cash_name = $db->sql_fetchrow($get_cash_result);
with
Code: Select all
$actual_cash_name = array();
$actual_cash_name['cash_name'] = 'user_points';
I've never used the points mod before, so I can't test it for you, but basing it on what you've said it should work
There is no javascript countdown from memory, just a PHP one.
Posted: Mon May 15, 2006 12:23 pm
by abramelin
ok i ll try it but i still dont understand how the countdown works

there is no countdown in the quizes. i setup a multiple choice quiz and play it with a basic account in my forum. doesnt the questions come one by one and all the questions have the specific time limit? it shows all the questions in one page . how can the time limit works like that ?
Posted: Mon May 15, 2006 1:24 pm
by battye
No.
Say you have it set to 10 seconds per question in the ACP, and you have 20 questions, that's a total of 200 seconds to complete the quiz (3 minutes, 20 seconds).
If you finish the quiz in under 3:20, no worries. But if you take 3:21 or longer, there will be a message saying something along the lines of "Scores not saved, time exceeded".
Posted: Mon May 15, 2006 3:34 pm
by abramelin
ohh yess, now i got it thanks a lot battye

whats the news about the emty fields? any update?
Posted: Mon May 15, 2006 3:40 pm
by battye
Not yet I'm afraid, I haven't had a chance to check that part of the code recently.
Posted: Mon May 15, 2006 5:41 pm
by abramelin
is there a way to clean the high scores table?