Page 12 of 32

Re: [BETA 2] Ultimate Quiz MOD v2.0.0 Progress

Posted: Thu Jan 14, 2010 6:23 pm
by battye
Hi subvertbeats, Beta 4 will be coming out in the coming days so if you want to wait it might save some upgrade time.

The answer to your question is yes, you can use it to do predictions. But obviously it was not created with that in mind. :)
In the _quiz_statistics table everyone's answer is recorded (I originally did this as part of a statistics module). It would not be difficult to write a script (I could help you with this) which would output the answers users selected, I don't imagine it would be too hard to have it cross-reference the list of correct answers you specify.

Re: [BETA 2] Ultimate Quiz MOD v2.0.0 Progress

Posted: Thu Jan 14, 2010 6:28 pm
by subvertbeats
Hi battye,

Thank you for the quick reply, good advice, and kind offer of help

I do have some coding experience, though am pretty rusty.
I'll keep an eye out for b4, and go from there!

Cheers again!

Ben

BETA 3

Posted: Sun Jan 17, 2010 2:51 pm
by battye
I'm happy to announce the release of Ultimate Quiz MOD v2.0.0 Beta 3 :D A special mention to quahappy and mtrs for their help squashing bugs in the lead-up to this release :wink:

The download is available from: Ultimate_Quiz_MOD_v200_beta3b.zip (Beta 3)

Here is a quick overview of the major changes:
ACP option can user play own quiz
ACP option to only allow admins to submit quizzes
Include quiz title on the results page
Fix the statistics / delete quiz bug
Change some language file structures and some additional small bugs
Show a message explaining that the final category cannot be deleted
ACP definable (optional) introductory text to the quiz index
A "new quiz" icon to show new quizzes since last login (also, new quizzes appear at the top of the quiz category)
Update details from Beta 2 are in the DIY instructions, but to briefly summarise... re-upload all of the quiz files and undo the change to the language/en/common.php file. There has been a change in the language file structure (thank you to mtrs for this idea) so that edit is no longer required. The SQL update includes a few changes to the phpbb_config table:
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES
('quiz_index_introduction', 'Introductory text to UQM.', 1),
('quiz_play_own_quiz', '0', 1),
('quiz_admin_only_submit', '0', 1);
Thanks :)

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 3:41 pm
by xpmen
hello Battye,
thank you for beta 3

I just test it locally, and I see a problem ACP
accents are not taken

Image

I do not see my text on the page quiz "welcome message on quiz index "

Image

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 3:52 pm
by battye
Ah, thanks xpmen. Sorry about that.

Open includes/acp/acp_quiz.php

FIND

Code: Select all

$quiz_welcome_message = $db->sql_escape( utf8_normalize_nfc(request_var('quiz_intro_index', '')) );
REPLACE WITH

Code: Select all

$quiz_welcome_message = $db->sql_escape( utf8_normalize_nfc(request_var('quiz_intro_index', '', true)) );
Does that fix it?

Thanks

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 4:20 pm
by xpmen
but why I do not see my text on the index?

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 4:24 pm
by battye
Did you refresh the cache after you re-uploaded the template files?

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 4:37 pm
by xpmen
yes
cache refreshes
style and template also Image

and I do not see an icon if new quiz
this option is not part of the beta 3?

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 4:43 pm
by battye
You've definitely re-uploaded quiz.php?

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 5:00 pm
by xpmen
I re checked and everything is good
this must surely be a problem of the passage of the beta 2 to beta 3
may be in db

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 5:07 pm
by battye
As far as I know neither quahappy or mtrs had this problem, and they have both tested Beta 3.

Download quiz.php from your server and open it in Notepad or another text editor. If you look at line 1084, do you see:

Code: Select all

				// is the quiz new? posted since last login
				$is_quiz_new_login = ($user->data['user_lastvisit'] < $row['quiz_date']) ? $user->img('icon_topic_newest', 'VIEW_NEWEST_POST') . ' ' : '';
? That confirms that you definitely are using the right set of files. It doesn't sound like a database problem, or else you would be getting an error or a blank area. Plus, if it is staying in the ACP field then it is working partially.

Have you tried clearing the cache directly? ie. going to the /cache/ folder in your FTP client and removing all of the files except .htaccess and index.htm

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 5:27 pm
by xpmen
My apologies Battye
it came well quiz.php of which was not transferred

thank you for your patience and your help

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 5:39 pm
by xpmen
another question please Battye

For me, I find that 255 characters is too court
I only see that you use a table phpbb_config, and I can not change the varchar to text.

THERE will be possible to use another table or it will be possible to use the text to be able to more than 225 characters?

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Sun Jan 17, 2010 8:32 pm
by zagor256
Hi Battye.
Nice mod. Thank you.

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.

Thanks

Re: [BETA 3] Ultimate Quiz MOD v2.0.0 Progress

Posted: Mon Jan 18, 2010 1:46 pm
by battye
xpmen, I am glad to hear that the problem was because of quiz.php not being transferred and not a bug in the MOD! :)
Regarding the 255 character limit, here is what you can do. Presuming you will not be changing the text regularly, open styles/prosilver/template/quiz_body.html and FIND:

Code: Select all

<!-- IF U_QUIZ_INTRODUCTION_VALID -->
<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>
	{U_QUIZ_INTRODUCTION_TEXT}
	<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
Now, FIND:

Code: Select all

{U_QUIZ_INTRODUCTION_TEXT}
REPLACE WITH the text you want to appear in the introduction message :)
You can still turn the introduction message on or off by leaving the field in the ACP completed or empty :)



zagor256, thank you for the kind words :) About the deleting problem, did you delete the quizzes through phpMyAdmin or using the Quiz Control Panel?