[ALPHA] Ultimate Quiz MOD v2.1.2

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
Locked
azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by azzurri » Mon Jan 18, 2010 7:21 am

3505

Code: Select all

		echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
4273

Code: Select all

	header('Content-type: text/html; charset=UTF-8');
If I remove the 3505 line, the debug warnings disapperas.

I notice now when I try to play a quiz I get this database error
SQL ERROR [ mysql4 ]

Unknown column 'user_points' in 'field list' [1054]

SQL

UPDATE phpbb3_users SET user_points = user_points + 0 WHERE user_id = 2

BACKTRACE


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

FILE: quiz.php
LINE: 819
CALL: dbal_mysql->sql_query()
Hmm, as for now nothing seems to work for me. I am not new to installing mods, been doing it for many years. Just thought I'd let you know.

*EDIT

I found the answer to the database issue on your site...
Do you have in ACP > UQM "Turn on points compatibility" set to YES? Change to NO and the error will no longer appear. You need to have a Cash/Points MOD installed for this feature to work.

Hope that helps.
To be honest it wasn't very well explained that you need a points system mod for this so many users might get confused with the error. Too bad there isn't a built in point system so you can display a toplist of users taking the quizzies. But maybe there is a feature like this in the statistics module. I havent had time to test it out too much.

Is it possible to add pictures to a quiz?

Seems though as if the UTF problem wasnt a problem. I'll have to do further testing when the debug warnings are gone.

Forgive me if it seems as if I am whining. You have made a wonderful job for us idiots :)
Last edited by azzurri on Mon Jan 18, 2010 1:35 pm, edited 1 time in total.

_Al
Registered User
Posts: 203
Joined: Mon Oct 20, 2008 9:24 pm
Location: Sweetas - All your friends online
Contact:

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by _Al » Mon Jan 18, 2010 1:11 pm

Updated from beta2 to beta3 got this in the header any ideas?

Code: Select all

[Debug] PHP Notice: in file /includes/functions_display.php on line 856: Undefined variable: topic_row
[phpbb3 Debug] PHP Notice: in file /includes/functions.php on line 4056: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3293)
[phpbb3  Debug] PHP Notice: in file /includes/functions.php on line 4058: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3293)
[phpbb3 Debug] PHP Notice: in file /includes/functions.php on line 4059: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3293)
[phpbb3 Debug] PHP Notice: in file /includes/functions.php on line 4060: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3293)

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10932
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by battye » Mon Jan 18, 2010 1:36 pm

azzurri, I do not think you are whining at all :) I appreciate you bringing these problems to my attention. I am especially interested in the debug errors that you and now _Al have reported receiving.

azzurri, you have raised a good point about the points. I should make it clearer that a points MOD like this one is required to use that function (for Beta 4 I will make a language change).

azzurri and _AI... could you try this?

Open quiz.php and find on line 27:

Code: Select all

error_reporting(E_ALL | E_NOTICE);
Remove that line, and re-upload the file. Do the debug errors disappear?
I think they should disappear now.
Customisations Team Member

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by azzurri » Mon Jan 18, 2010 2:07 pm

That did the trick with the debug warning battye! Fantastic. Maybe now I can start enjoying this mod to the fullest.

I'm really greatful there are people like you who do this for free for us phpbb users. I think we all who use this mod should make a donation to battye, just to show our gratitude. Do you have a paypal donation site?

So if I may suggest a couple of features, if it is alright...

1.) A built in points feature where in ACP admin can choose how many points to add and subtract with right and wrong question. Not all people might be interested in installing the points mod just for this, I am not sure.

2.) When playing quzzies and viewing statistics there is no immidiate link back to the quiz index. Maybe it's just me but I have to click quiz in the main header menu. Sorry if this is stupid of me.

3.) Integrate quiz more, maybe show points in the viewtopic_profile. That would be kind of nice.

Thank you battye :)

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by azzurri » Mon Jan 18, 2010 2:40 pm

Another weird thing I notice...

I create a quiz and then I go to play it (I have choosen so that I can play my own quiz) but the quiz is empty. I click send and then go back to try again and I get the cheating message...
You are seeing this error because one of several events might have occurred:

- A cheating attempt may have been detected. You cannot leave a quiz and later re-enter it without going through the save process.
- You have tried to resubmit a quiz that you have exceeded the time limit on
- You have already played this quiz, and the admin does not allow multiple attempts.
Happened a couple of times.

*EDIT* Only thing that works is true or false quizzies. The 2 others only leave a blank field. Strange.

*EDIT 2* For some reason true/false didnt work either now. Seems almost like a random problem. Hmm.

*EDIT 3* I saw this on your page...

Someone wrote...
It works all well. But i found something strange.
I create several quizes. Than I deleted all of them.
When I create new one (after I deleted last one), I dont see questions any more. Even if I edit quiz I can edit only title and not questions.
It happend on my live server and also on my localhost. I also reuploaded all files and purge cache.
This is kind of the same problem I am having, even with the editing. And I see you are working on it.

Currently I cannot creat new quizzies so I'm on hold. :)

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10932
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by battye » Mon Jan 18, 2010 3:31 pm

1.) A built in points feature where in ACP admin can choose how many points to add and subtract with right and wrong question. Not all people might be interested in installing the points mod just for this, I am not sure.
This can be done already, to a certain extent, by modifying the way statistics are displayed.

I haven't tested this, but if you open includes/quiz_stats_class.php and find:

Code: Select all

		$result = $db->sql_query_limit($sql, $config['quiz_show_how_many_stats']);
and replace that with:

Code: Select all

		$result = $db->sql_query($sql);
Then find:

Code: Select all

				'CORRECT'			=> $row['sum_correct'],
				'INCORRECT'			=> $row['sum_incorrect'],
				'PERCENTAGE'		=> ($all_played > 0) ? number_format((100*$row['sum_correct'])/($all_played), 0) . '%' : '-',
and replace with:

Code: Select all

				'CORRECT'			=> ($row['sum_correct'] * 20),
				'INCORRECT'			=> ($row['sum_incorrect'] * -10) ,
				'PERCENTAGE'		=> (($row['sum_correct'] * 20) - ($row['sum_incorrect'] * -10))
It's not the prettiest solution, and you might need to change some language variables to things like "Points gained", "points lost", "total points" (also, changing 20 and -10 to points per correct and incorrect answer respectively)... but it is better than adding an all new custom points system I believe.
2.) When playing quzzies and viewing statistics there is no immidiate link back to the quiz index. Maybe it's just me but I have to click quiz in the main header menu. Sorry if this is stupid of me.
Hmm, that isn't a bad suggestion. I'll have a think about a way I can nicely implement a link back to the quiz index. Thanks.
3.) Integrate quiz more, maybe show points in the viewtopic_profile. That would be kind of nice.
I won't be doing any topics integration for now.
azzurri wrote:I'm really greatful there are people like you who do this for free for us phpbb users. I think we all who use this mod should make a donation to battye, just to show our gratitude. Do you have a paypal donation site?
That is a very kind thought azzurri, but I am happy in the knowledge that you like the MOD :)
Customisations Team Member

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by azzurri » Mon Jan 18, 2010 4:59 pm

That's a great alternative regarding the points! Thank you very much!

I'll have to wait for a solution for the missing quiz bug until I can try it out! :)

_Al
Registered User
Posts: 203
Joined: Mon Oct 20, 2008 9:24 pm
Location: Sweetas - All your friends online
Contact:

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by _Al » Mon Jan 18, 2010 11:55 pm

azzurri and _AI... could you try this?

Open quiz.php and find on line 27:


Code: Select all
error_reporting(E_ALL | E_NOTICE);

Remove that line, and re-upload the file. Do the debug errors disappear?
I think they should disappear now.
Yes, Thank you :)

Do you have any screan shots of beta3?, as im not sure of the new features funtioning correctly

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10932
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by battye » Tue Jan 19, 2010 11:41 am

_AI, I haven't taken any screenshots for a while. I will do some tonight... what would you like screenshots of? :)
Customisations Team Member

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by azzurri » Tue Jan 19, 2010 10:17 pm

Sorry if this has been asked many times, but my bugreport was never really confirmed and I'm wondering if it will be solved any time soon because it makes the quiz mod unusable, at least min my case?

Someone wrote on your forum...
i found something strange.
I create several quizes. Than I deleted all of them.
When I create new one (after I deleted last one), I dont see questions any more. Even if I edit quiz I can edit only title and not questions.
It happend on my live server and also on my localhost. I also reuploaded all files and purge cache.

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10932
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by battye » Wed Jan 20, 2010 2:05 am

azzurri wrote:Sorry if this has been asked many times, but my bugreport was never really confirmed and I'm wondering if it will be solved any time soon because it makes the quiz mod unusable, at least min my case?

Someone wrote on your forum...
i found something strange.
I create several quizes. Than I deleted all of them.
When I create new one (after I deleted last one), I dont see questions any more. Even if I edit quiz I can edit only title and not questions.
It happend on my live server and also on my localhost. I also reuploaded all files and purge cache.
I am currently writing a fix for it, I know what the problem is. :)
Customisations Team Member

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10932
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by battye » Wed Jan 20, 2010 5:49 am

Here is the fix, I have got it working at my site and it will be included in the next beta. I tried adding some quizzes, deleting them all and adding a new quiz - and it worked fine.

In phpbb_config table add a new row:

Code: Select all

config_name: quiz_latest_id_submitted
config_value: 0
is_dynamic: 1
OPEN includes/functions_quiz.php

FIND

Code: Select all

function quiz_latest_id()
{
        global $db;

	$sql = "SELECT quiz_id FROM " . QUIZ_TABLE . "
			ORDER BY quiz_id DESC
			LIMIT 1";
	$result = $db->sql_query($sql);

	$latest_quiz_id = $db->sql_fetchfield('quiz_id');
	$db->sql_freeresult($result);

	return $latest_quiz_id;
}
REPLACE WITH:

Code: Select all

function quiz_latest_id()
{
	global $config;
	return $config['quiz_latest_id_submitted'];
}
OPEN quiz.php (around line 196)

FIND

Code: Select all

		$quiz_sql = 'INSERT INTO ' . QUIZ_TABLE . ' ' . $db->sql_build_array('INSERT', $quiz_array);
		$db->sql_query($quiz_sql);
AFTER ADD

Code: Select all

		// update the latest quiz id
		set_config('quiz_latest_id_submitted', ($config['quiz_latest_id_submitted'] + 1));
Customisations Team Member

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by azzurri » Wed Jan 20, 2010 6:14 am

Yeah! Well done! I will try it when I get home from work!!

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by azzurri » Wed Jan 20, 2010 5:09 pm

Hmm, still blank.

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10932
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [BETA] Ultimate Quiz MOD v2.0.0 (Beta 3)

Post by battye » Thu Jan 21, 2010 4:35 am

azzurri wrote:Hmm, still blank.
Ah, of course. I cleared my tables when I did this... instead of:

Code: Select all

config_name: quiz_latest_id_submitted
config_value: 0
is_dynamic: 1
Instead of setting the config_value to 0, you will need to set it to the current highest quiz id. (so just hover over the latest quiz you submitted, and if it is q=23, then the value you would need to use is 23).
Customisations Team Member

Locked

Return to “[3.0.x] MODs in Development”