Random Quote/Rotating Content block

Random Quote/Rotating Content block

by Tim Allen -
Number of replies: 7
Hi,

I thought I'd make a new thread, becuase the other one was getting quite long.

I have just installed this block, and it is working beautifully, except for one small thing. Ths glossary I have associated with the block allows students to add their own entries, but the block is using the wrong text. See my settings below:



If students are allowed to add their own entries to the glossary,a link to the glossary is shown with the following text:

If students are only allowed to see the entire content of the glossary, a link to the glossary is shown with the following text:





It should show "add your own words!", but instead it is showing "more words...".

Does anyone have any idea why this is not working?

TIA, Tim.  smile  
Average of ratings: -
In reply to Tim Allen

Re: Random Quote/Rotating Content block

by Tim Allen -

Ooops, sorry, my setting didn't show up when I pasted them in.  Here they are again:

If students are allowed to add their own entries to the glossary,a link to the glossary is shown with the following text:

Add a new word!

If students are only allowed to see the entire content of the glossary, a link to the glossary is shown with the following text:

More words...

In reply to Tim Allen

Re: Random Quote/Rotating Content block

by Jan Dierckx -
blush stupid typo. It is now fixed. I also renamed one of the constants as it was already used by the Quiz module. (Thanks, Chardelle for pointing this out)
I will rename the block, because random quote does not really describe what the block does. Martin suggested Random Glossary Entry. (with block_glossary_random as name for the code)
Maybe the title is not that important because every teacher can change the block's title via the block's preferences. I will upload a new version, together with Nicolas' French translation and my Dutch translation....
now I need to find out how CVS committing works...


In reply to Jan Dierckx

Re: Random Quote/Rotating Content block

by Chardelle Busch -
Picture of Core developers

Hi Jan,

Would you let us know when you get this into cvs contrib?  Good luck with thatwink.  Do you have Tortoise CVS?   (tortoisecvs.org ) I think that is the easiest way to do it.

How about block_random_content?  or block_random_glossary?

Well crap, I had something else to tell you but I got interrupted and now it's gone.  Guess its time to shut things down for the night.

Thanks again

Chardelle

In reply to Jan Dierckx

Re: Random Quote/Rotating Content block

by Tim Allen -
Thanks for that and the great block Jan.  smile 
In reply to Jan Dierckx

Re: Random Quote/Rotating Content block

by Jan Dierckx -
Ok, I figured out how CVS works (or maybe I didn't, it ended up in HEAD, while I thought it would end up in 1.4)
I followed Martin's suggestion and called it block_glossary_random. As a result I had to rename the database table as well. As most of the information for the block is inside the glossary used, I thought deleting the old block (with the database table) and then installing the new version (with the new database table) would be the easiest way.

I still have one problem: I have access to cvs:moodle/blocks (where I uploaded the block)but I do not have access to moodle/lang/en (or fr or du for  that matter) so I haven't been able to upload the lang file for this block.
That's why I post it here.
Can anyone help me with that?

In reply to Jan Dierckx

Re: Random Quote/Rotating Content block

by Jan Dierckx -

I removed the new version from CVS again (because of the changes in block code )

You can download it here . French and Dutch translation are included.

I used the names Martin suggested. This name change makes it difficult to upgrade an already installed earlier version (as far as Moodle knows, this is an entirely differet block)

As most of the information for the block is inside the glossary used, I suggest deleting the old block (with the database table) and then installing the new version (with the new database table) I think this is the easiest way.

Average of ratings: Useful (1)
In reply to Jan Dierckx

Re: Random Quote/Rotating Content block

by Chardelle Busch -
Picture of Core developers

Thanks Jan

I just follwed your suggestions above and it works fine.