UQM 2.0 - Predictions Extensions

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

subvertbeats
Know-It-All
Know-It-All
Posts: 113
Joined: Thu Jan 14, 2010 6:07 pm

battye wrote:Alright, maybe tomorrow I will bring up some multiple choice options (how about if it simply shows the options, and you can copy and paste the correct one in? That would be less hassle than getting radio boxes and the like working). Try and be online about 12 hours from now, or if not then about 18 hours from now... because this time for me is very late and I am logging off now :)
Well it does show the options, so I can already copy and paste.
The issue is I dont know if the funny chars is a display issue, or if thats the value stored in the DB.
battye wrote: Anyway, this is what else I had done - you can play around with this. In fact, please do - I'm hoping it will give a read out of the right/wrong answers... please let me know the results so I know what to fix/improve/change.
thanks again battye

Ill play around with the code.
Last edited by subvertbeats on Thu Jan 21, 2010 5:00 pm, edited 1 time in total.
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

subvertbeats wrote:
battye wrote:Alright, maybe tomorrow I will bring up some multiple choice options (how about if it simply shows the options, and you can copy and paste the correct one in? That would be less hassle than getting radio boxes and the like working). Try and be online about 12 hours from now, or if not then about 18 hours from now... because this time for me is very late and I am logging off now :)
Well it does show the options, so I can already copy and paste.
The issue is I dont know if the funny chars is a display issue, or if thats the value stored in the DB.
It does? I just had another look at the file, I don't see anywhere where it displays the options. Just what the question is and a box for the correct answer to be typed into?
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)
subvertbeats
Know-It-All
Know-It-All
Posts: 113
Joined: Thu Jan 14, 2010 6:07 pm

Correct, but since the question is in the form of Team A vs Team B, and the only other option is a 'Draw', the end result is the same...
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Okay... I'll do the multiple choice / radio box then. What time will you be online tomorrow?
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)
subvertbeats
Know-It-All
Know-It-All
Posts: 113
Joined: Thu Jan 14, 2010 6:07 pm

battye wrote:Okay... I'll do the multiple choice / radio box then. What time will you be online tomorrow?
Most of the day UK time. probably not 12 hrs from now, but 18 hrs from now I will be.,
Thanks again battye..
subvertbeats
Know-It-All
Know-It-All
Posts: 113
Joined: Thu Jan 14, 2010 6:07 pm

On submission of the enter answers forum, the following SQL error is thrown.

Ill investigate
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 [1064]

SQL

SELECT * FROM phpbb_quiz_statistics WHERE quiz_question_id =

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: control_quiz.php
LINE: 56
CALL: dbal_mysql->sql_query()
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

subvertbeats wrote:
battye wrote:Okay... I'll do the multiple choice / radio box then. What time will you be online tomorrow?
Most of the day UK time. probably not 12 hrs from now, but 18 hrs from now I will be.,
Thanks again battye..
You're welcome, alright I will be online at that time too. I think if we work in real-time we could probably get this finished.
subvertbeats wrote:On submission of the enter answers forum, the following SQL error is thrown.

Ill investigate
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 [1064]

SQL

SELECT * FROM phpbb_quiz_statistics WHERE quiz_question_id =

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: control_quiz.php
LINE: 56
CALL: dbal_mysql->sql_query()
On the page where you type in the answers, right click and view the page HTML source (view source)

Search for a line that says: <input type="hidden" value=

And paste that entire line here, I want to see what the contents are.
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)
subvertbeats
Know-It-All
Know-It-All
Posts: 113
Joined: Thu Jan 14, 2010 6:07 pm

Yep, that would be great if we could close out tomorrow

Code: Select all

<input type="hidden" value="4,5,6,7,8,9,10,11,12,13,14," name="questions" /><input type="submit" value="Submit" name="submit" />
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

subvertbeats, congratulations on your new rank "Frequent Poster" :)

Open the file subvertbeats_quiz.php, FIND:

Code: Select all

				$question_id_set = explode(',', $question_id_hidden);
BEFORE, ADD:

Code: Select all

				$question_id_hidden = $_POST['questions'];
It is important that you add it before.
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)
subvertbeats
Know-It-All
Know-It-All
Posts: 113
Joined: Thu Jan 14, 2010 6:07 pm

Wonderful - Ill do that now....

No go sign off and relax! :)
subvertbeats
Know-It-All
Know-It-All
Posts: 113
Joined: Thu Jan 14, 2010 6:07 pm

After that change the error persists (though shows line 57 of course due to the new line we added):
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 [1064]

SQL

SELECT * FROM phpbb_quiz_statistics WHERE quiz_question_id =

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: control_quiz.php
LINE: 57
CALL: dbal_mysql->sql_query()

Code: Select all

<input type="hidden" value="4,5,6,7,8,9,10,11,12,13,14," name="questions" /><input type="submit" value="Submit" name="submit" />

(PS: In case you're wondering why 'control_quiz.php is referenced, thats what I called subvertbeats_quiz.php, and all references in the code are correctly updated)
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

FIND

Code: Select all

				$question_id_hidden = $_POST['questions'];
AFTER ADD:

Code: Select all

				echo 'ECHOING: ' . $question_id_hidden;
Let me know what that outputs.

I am really going to bed now :mrgreen:
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)
subvertbeats
Know-It-All
Know-It-All
Posts: 113
Joined: Thu Jan 14, 2010 6:07 pm

battye wrote:
I am really going to bed now :mrgreen:
:D

Code: Select all

ECHOING: 4,5,6,7,8,9,10,11,12,13,14,
Warning: Cannot modify header information - headers already sent by (output started at /home/mmadent/public_html/foru/control_quiz.php:47) in /home/mmadent/public_html/foru/includes/functions.php on line 3543
subvertbeats
Know-It-All
Know-It-All
Posts: 113
Joined: Thu Jan 14, 2010 6:07 pm

is the SQL error because of the trailing ','

?
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

No, what should be happening is the numbers are being split up. You can remove the echo 'ECHOING: ' . $question_id_hidden; now.

FIND

Code: Select all

				$question_id_hidden = $_POST['questions'];
				$question_id_set = explode(',', $question_id_hidden);
				$question_id_set_count = sizeof($question_id_set);
AFTER ADD:

Code: Select all

echo $question_id_set_count . '<br />';
echo $question_id_set[0];
Let me know what is output.
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)
Post Reply