bugs in 1.3.0

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

abramelin
Greenhorn
Greenhorn
Posts: 10
Joined: Fri Apr 14, 2006 12:08 pm

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.
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

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.

:)
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)
abramelin
Greenhorn
Greenhorn
Posts: 10
Joined: Fri Apr 14, 2006 12:08 pm

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 :)
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

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?
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)
abramelin
Greenhorn
Greenhorn
Posts: 10
Joined: Fri Apr 14, 2006 12:08 pm

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.
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

abramelin wrote:no i dont use php5.by the way i am calling it like http://www.domain.com/forum/quiz_cp.php is it true
:|

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 :wink:
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)
abramelin
Greenhorn
Greenhorn
Posts: 10
Joined: Fri Apr 14, 2006 12:08 pm

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
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

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 :lol:
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)
abramelin
Greenhorn
Greenhorn
Posts: 10
Joined: Fri Apr 14, 2006 12:08 pm

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 :roll:ü
and the last thing is i tested a quiz in my forum but i didnt see any countdown javascript?
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

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.
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)
abramelin
Greenhorn
Greenhorn
Posts: 10
Joined: Fri Apr 14, 2006 12:08 pm

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 ?
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

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".
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)
abramelin
Greenhorn
Greenhorn
Posts: 10
Joined: Fri Apr 14, 2006 12:08 pm

ohh yess, now i got it thanks a lot battye :)
whats the news about the emty fields? any update?
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Not yet I'm afraid, I haven't had a chance to check that part of the code recently.
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)
abramelin
Greenhorn
Greenhorn
Posts: 10
Joined: Fri Apr 14, 2006 12:08 pm

is there a way to clean the high scores table?
Post Reply