A new random quote block

A new random quote block

από Scott Elliott -
Αριθμός απαντήσεων: 21
I've created a random quote block that allows users to submit quotes.

I have not tested it fully and am still toying with some of the features, but feel free to check it out and give me some feed back.

Here's a link to a test site with the block activated on the main site:  http://cs1.jal.cc.il.us/~scott/moodle_15

Feel free to create an account and try it out!


Μέσος όρος βαθμολογίας: -
Σε απάντηση σε Scott Elliott

Re: A new random quote block

από Sean S -
Is it available for download? Also is it possible to restrict submission to only admins, creators, and teachers? I would rather not have my students adding quotes - but I'm all for other teachers being able to.
Σε απάντηση σε Sean S

Re: A new random quote block

από Scott Elliott -
I will make it available for download on my test site (http://cs1.jal.cc.il.us/~scott/moodle_15).

Right now it allows submissions from any user, but quotes must be approved by a teacher of the course before they will appear in the block.  Don't discount a student's ability to contribute wisdom to a course.  I was thinking about how advice from a student in regards to how to study/prepare may go a little further than from from me! κλείσιμο ματιού

Having said that, I can see that a block setting to restrict submissions would be simple enough though.  I'll try to work this in.
Σε απάντηση σε Scott Elliott

Re: A new random quote block

από Scott Elliott -

Ok, I now have a settings page created to allow restrictions on who can submit a quote.

All users -> Registered users, Teachers, and Admin can submit
Teacher -> Teachers and Admin can submit
Admins -> Only Admins can submit

I also have updated the block to work in version 1.5.

I would greatly appreciate any feedback and comments / suggestions.

Thanks!

Σε απάντηση σε Scott Elliott

Re: A new random quote block

από Jan Dierckx -
Scott,
It's great to have a 1.4 and a 1.5 version of the same block. I am looking at what things need changes to make a block compliant with moodle 1.5, and this is a great help.
I have one question.
The glossary module already has code for managing a collection of quotes. Students can submit quotes which can be approved and graded by teachers. Teachers can backup/export/import complete collections of quotes, sort them in categories, display lists of quotes by author, by student who contributed them, etc....
That's why I decided all that was needed for a random quote block was a configuration page (how is the block named, how often should it be refreshed, should it always display the next entry, or a completely random one) and a link at the bottom of the block: to a list with all the quotes if students are not allowed to submit / to the add a new glossary entry page if they are allowed to do so. The rest should then be handled inside the glossary module.
Why have you chosen this different approach? Has it got to do with speeding  up the displaying of the block?  (I have switched filters off for my site,  so I don't know what happens when the content of the block passes through the filters)

Σε απάντηση σε Jan Dierckx

Re: A new random quote block

από Jan Dierckx -
Er ... that's a lot of words to ask a simple question:

Hey Scott, what's wrong with my old one? big grin
Σε απάντηση σε Jan Dierckx

Re: A new random quote block

από Scott Elliott -

Good question.  To be honest, I never thought about using the glossary tool for student submission of quotes.  I saw the need for me and just started writing the code.

I'll check out your suggested approach.

Σε απάντηση σε Scott Elliott

Re: A new random quote block

από Jan Dierckx -
Ok, you can find the code here  (but works only in Moodle 1.4)
Σε απάντηση σε Jan Dierckx

Re: A new random quote block

από Sean S -
I just tried this but I'm getting the following error

Block RandomGlossary: /path/to/blocks/RandomGlossary/block_RandomGlossary.php was not readable
Σε απάντηση σε Sean S

Re: A new random quote block

από Jan Dierckx -
Sean,

That path doesn't seem ok. It should look like path/to/blocks/glossary_random/block_glossary_random.php

When you unzip the file, you get two directories, one called glossary_random, the other called lang.
1. Place the directory 'glossary_random' inside the directory 'moodle/blocks/'
2. Copy the file lang/en/block_glossary_random.php to the directory 'moodle/lang/en/' (unless you want to use the dutch version)
3. Visit the admin page of your moodle site for the changes to take effect
now you can add the block to your course, but it will be really useful if you also do the following:
4. add a glossary to your course
5. add at least one entry to the glossary


Σε απάντηση σε Scott Elliott

Re: A new random quote block

από Martin Dougiamas -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers
Jan, is there a 1.5 version of the glossary_random block I can add to the distribution?
Σε απάντηση σε Martin Dougiamas

glossary_random block for 1.5

από Jan Dierckx -
Yes, I upgraded the block some time ago. Marc Dastous has been testing the new version and reported some problems. I was looking into them when I found out about the empty directory that seems to be in the development download of Moodle 1.5 and causes some install problems.
Not to cause anymore trouble... where should I commit it to?

Σε απάντηση σε Jan Dierckx

Re: glossary_random block for 1.5

από Martin Dougiamas -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers
Thanks, yes, please put your latest code into CVS into that empty directory "glossary_random".
Σε απάντηση σε Martin Dougiamas

Re: glossary_random block for 1.5

από Jan Dierckx -
Done that.
It seems I cannot commit to the lang directory. I have translations for en/nl/fr
As I don't have a Moodle 1.5 install on the web (only local copy) I cannot use the xhtml validation link provided at the bottom.
I did my best to take out all the old html
Σε απάντηση σε Jan Dierckx

Re: glossary_random block for 1.5

από Nicolas Martignoni -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers Φωτογραφία Translators
Hi Jan,

You can attach here the french lang file, and I'll put it in the CVS, if it's OK for Martin μοχθηρό χαμόγελο

Nicolas (french translation)
Σε απάντηση σε Nicolas Martignoni

Re: glossary_random block for 1.5

από Jan Dierckx -
Σε απάντηση σε Jan Dierckx

Re: glossary_random block for 1.5

από Nicolas Martignoni -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers Φωτογραφία Translators
Thanks, the file is now in the CVS.

Cheers
Nicolas
Σε απάντηση σε Nicolas Martignoni

Re: glossary_random block for 1.5

από Martin Dougiamas -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers
Check it closely, Nicolas, because I just put a modified English version into CVS with many changes.   I also worked on the block itself quite a bit to make it Postgres-compatible and cleaned up a few things. 

Thanks for the block, Jan!  It's really fun to use!
Σε απάντηση σε Jan Dierckx

Re: glossary_random block for 1.5

από Martin Dougiamas -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers
Hi, Jan.

Just attach them here, thanks!