News:

Join the Facebook Fan Page.

Main Menu

SMF Quiz

Started by Diego Andrés, February 18, 2009, 01:08:19 PM

Previous topic - Next topic

emanuele

Quote from: lucy453 on August 01, 2013, 07:54:03 AM
I have a soucy with this mod, how to know what does not work please?

PS: I don't have "fancybox", I read the previous posts


I'm really sorry lucy453 I didn't see your message before! :-[ :-[
Can you create an account for me so that I can check it directly?

Quote from: webewitch on August 26, 2013, 12:05:20 PM
I'd like to allow my members to be able to replay the quizzes after a month -

I know I can change that in Settings with 'Session Replay Time (minutes)' but is there any way I can change all of the quizzes' Play Limits globally rather than one by one? (I have 555 quizzes so doing it individually would be a pain)
At the moment I don't remember exactly (it's a while i don't touch the code) and I can't check, but it should be easy to create a scheduled task to do the same thing once per month.

I'll try to remember, if you don't see anything before next week, feel free to bump the topic. ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

webewitch

QuoteQuote from: webewitch on August 26, 2013, 12:05:20 PM
I'd like to allow my members to be able to replay the quizzes after a month -

I know I can change that in Settings with 'Session Replay Time (minutes)' but is there any way I can change all of the quizzes' Play Limits globally rather than one by one? (I have 555 quizzes so doing it individually would be a pain)




At the moment I don't remember exactly (it's a while i don't touch the code) and I can't check, but it should be easy to create a scheduled task to do the same thing once per month.
Unless I've misunderstood, I don't think a scheduled task should be necessary.
There are two factors :
Session Replay Time (minutes) - easily changed globally in Settings
Play Limit - has to be done individually - as far as I can see.

My play limits are all set to 1 - I'd like to change that to e.g. 12 - but globally

quiz_modder

Quote from: Kindred on July 03, 2013, 02:17:17 PM
(and, I believe that the original author of this mod released the code into the public domain)

Yes, I did

webewitch

QuoteQuote from: webewitch on August 26, 2013, 12:05:20 PM
I'd like to allow my members to be able to replay the quizzes after a month -

I know I can change that in Settings with 'Session Replay Time (minutes)' but is there any way I can change all of the quizzes' Play Limits globally rather than one by one? (I have 555 quizzes so doing it individually would be a pain)
At the moment I don't remember exactly (it's a while i don't touch the code) and I can't check, but it should be easy to create a scheduled task to do the same thing once per month.

I'll try to remember, if you don't see anything before next week, feel free to bump the topic.
Bump  :)

stelios2

Hi, i have installed this mod successfully on an 2.0.5 forum ,, everything seems to work properly except when i try to play a quiz the pop up window keeps loading with no content inside ....(?)

webewitch

Quote from: webewitch on September 16, 2013, 08:06:27 AM
QuoteQuote from: webewitch on August 26, 2013, 12:05:20 PM
I'd like to allow my members to be able to replay the quizzes after a month -

I know I can change that in Settings with 'Session Replay Time (minutes)' but is there any way I can change all of the quizzes' Play Limits globally rather than one by one? (I have 555 quizzes so doing it individually would be a pain)
At the moment I don't remember exactly (it's a while i don't touch the code) and I can't check, but it should be easy to create a scheduled task to do the same thing once per month.

I'll try to remember, if you don't see anything before next week, feel free to bump the topic.
Bump  :)
Bumpity bump  :)

Dave J

Quote from: stelios2 on September 18, 2013, 01:09:11 PM
Hi, i have installed this mod successfully on an 2.0.5 forum ,, everything seems to work properly except when i try to play a quiz the pop up window keeps loading with no content inside ....(?)

Do you have 'Fancy Box' installed as this is a know problem with the quiz mod?

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Quote from: webewitch on October 07, 2013, 06:14:45 AM
Quote from: webewitch on September 16, 2013, 08:06:27 AM
QuoteQuote from: webewitch on August 26, 2013, 12:05:20 PM
I'd like to allow my members to be able to replay the quizzes after a month -

I know I can change that in Settings with 'Session Replay Time (minutes)' but is there any way I can change all of the quizzes' Play Limits globally rather than one by one? (I have 555 quizzes so doing it individually would be a pain)
At the moment I don't remember exactly (it's a while i don't touch the code) and I can't check, but it should be easy to create a scheduled task to do the same thing once per month.

I'll try to remember, if you don't see anything before next week, feel free to bump the topic.
Bump  :)
Bumpity bump  :)

BACKUP your database before carrying out the following. I will not be held responsible for any failures of your site. (Note I have tested this on my own site and it works)


If you have access to 'phpMyAdmin' for your database then open it and click on 'SQL' at the top of the page insert the following into the box

UPDATE smf_quiz
SET play_limit = REPLACE(play_limit, 1, 4);


Look at the screenshot below for how to change the values you want.

Once your happy with the new value then press 'Go' on the right-hand side.

I have looked to see if there is a wildcard to substitute for the existing value so you can do them all at the same time but I can't find anything (I'm guessing someone here might have a better solution).

If you have different amounts in the current value then you will need to run the query for each value.

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Quote from: davejo on November 23, 2012, 07:24:54 AM
I would like to thank vkot for giving us the ability to add mp3 files to questions. As an update regarding the playing of music files in questions I have done the following.

The code I have added as the question is as follows:

Quote<embed type="application/x-shockwave-flash" flashvars="audioUrl=http://the route to your mp3 file&autoPlay=true" src="http://google.com/reader/ui/3523697345-audio-player.swf" ></embed>

Notice I have added the '&autoPlay=true' following the route to the mp3 file, this enables the track to auto play once the button is pressed to start the quiz.

You can create a packge of the quizzes and they will be imported to another site and play without error, but please note that the link created for the track goes back to the site where the quiz question was originally created and is not stored on your site, this means that if the original site goes down your questions will not work (this is for mp3 tracks only, all other imported packages will work fine). I would suggest that you create your own tracks and put them in a similar folder on the root of your domain.


or use the 'Quiz Importer' and add the attached 'test music mp3.xml' below and import it as a new quiz. I have used the 'Multiple Choice' for the 'Question Type' I have also set it for 'Play Limit' 20 just so the question can be tested over and over again with tweaking where it's needed.


PS> It's worth noting that you can use any type of music file you want to, although I've only tested mp3, but need to set the file with the lowest Kbs file setting as possible so as not to increase your storage too much, the antmusic.mp3 file thats being used is 40Kbs and has a size of only 89kb and it's 17.6 seconds long.

Please note that the link http://google.com/reader/ui/3523697345-audio-player.swf is no longer supported by Google.

If you want to still use the audio quizzes then you need to upload a player to a folder/root of your website and then edit the link to h**p://www.mysite/folder/miniplayer.swf

I am using the player attached below

right click 'save target as'

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

stelios2

Quote from: davejo on October 07, 2013, 07:06:04 AM
Quote from: stelios2 on September 18, 2013, 01:09:11 PM
Hi, i have installed this mod successfully on an 2.0.5 forum ,, everything seems to work properly except when i try to play a quiz the pop up window keeps loading with no content inside ....(?)

Do you have 'Fancy Box' installed as this is a know problem with the quiz mod?

un installed fancy box and problem solved !
but still when adding a new quiz, titles, questions and answers dont show in my language
i use ISO-8859-7

Dave J

Quote from: stelios2 on October 17, 2013, 04:31:46 AM
Quote from: davejo on October 07, 2013, 07:06:04 AM
Quote from: stelios2 on September 18, 2013, 01:09:11 PM
Hi, i have installed this mod successfully on an 2.0.5 forum ,, everything seems to work properly except when i try to play a quiz the pop up window keeps loading with no content inside ....(?)

Do you have 'Fancy Box' installed as this is a know problem with the quiz mod?

un installed fancy box and problem solved !
but still when adding a new quiz, titles, questions and answers dont show in my language
i use ISO-8859-7

As far as I know the only language that's supported is English. Have a look in the SMFQuiz 'Language' folder to see if there is a 'SMFQuiz.yourlanguage.php' file if not then it's english only until someone creates a new language file for you.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

stelios2

I mean that when i am adding a new quiz using my default forum char encoding (iso-8859-7) greek, when i save it  , title, questions and everything is written in iso-8859-7 (gr) dont show .  :)

Dave J

Quote from: stelios2 on October 18, 2013, 02:55:54 AM
I mean that when i am adding a new quiz using my default forum char encoding (iso-8859-7) greek, when i save it  , title, questions and everything is written in iso-8859-7 (gr) dont show .  :)


Sorry Stelios I have no idea why it's doing that or even what that means.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

stelios2

I think it doesnt save data in db if its in character encoding 8859-7 Greek  :o

vkot

When you mix latin & greek characters in a question, the latin show up? The greek are blanks? or spaces? or other strange characters? Do you see the content in the database? (with phpMyAdmin) What is the encoding of the database and the tables?
For specialized SMF installation/customization, Web Development, Linux Server Administration, click here.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

stelios2

Quote from: vkot on October 23, 2013, 04:27:34 AM
When you mix latin & greek characters in a question, the latin show up? The greek are blanks? or spaces? or other strange characters? Do you see the content in the database? (with phpMyAdmin) What is the encoding of the database and the tables?

when i mix greek latin nothing shows up ...quiz saves as blank
i see greek quiz in database as blank as well
encoding of tables in db is latin1_sweedish_ci

stelios2

Quote from: stelios2 on October 23, 2013, 06:07:18 AM
Quote from: vkot on October 23, 2013, 04:27:34 AM
When you mix latin & greek characters in a question, the latin show up? The greek are blanks? or spaces? or other strange characters? Do you see the content in the database? (with phpMyAdmin) What is the encoding of the database and the tables?

when i mix greek latin nothing shows up ...quiz saves as blank
i see greek quiz in database as blank as well
encoding of tables in db is latin1_sweedish_ci

i have solved the saving in greek questions, titles, answers -  error .. by replacing all the 'utf-8' to 'latin1_sweedish_ci' from SMFQuizDb.php file.

for example:
array(
'id_answer' => $id_answer,
'answer_text' => $smcFunc['db_escape_string'] (htmlspecialchars($answer_text, ENT_QUOTES, 'utf-8')),
'is_correct' => $is_correct,
'updated' => $updated
));


made to
array(
'id_answer' => $id_answer,
'answer_text' => $smcFunc['db_escape_string'] (htmlspecialchars($answer_text, ENT_QUOTES, 'latin1_swedish_ci')),
'is_correct' => $is_correct,
'updated' => $updated
));


But now when i try to play a "greek" quiz i have "An unexpected parser error has occured while retreiving data from the server"

any ideas ?  :-\

emanuele

Not a good idea.

Don't know about the questions already in the database, but try replacing all these db_escape_string with something like:
'answer_text' => $smcFunc['htmlspecialchars']($answer_text, ENT_QUOTES),


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

stelios2

Quote from: emanuele on October 29, 2013, 10:55:01 AM
Not a good idea.

Don't know about the questions already in the database, but try replacing all these db_escape_string with something like:
'answer_text' => $smcFunc['htmlspecialchars']($answer_text, ENT_QUOTES),

i did that ... same thing ....  :(

emanuele

Is there in the error log something related?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: