RSS feed (news) in a block

Re: RSS feed (news) in a block

by Jan Dierckx -
Number of replies: 7
Really nice feature. Makes your course homepage much more lively. Students discover new things everytime they log in. Thanks!
However in my installation, I had to rename the table 'rssfeed' to 'mdl_rssfeed' because nothing got added to the database.
(I think it might work if you put 'CREATE TABLE prefix_rssfeed' in the mysql.sql-file)
This block really shows that there should be a possibility for teachers to configure their own blocks. is this possible?
In reply to Jan Dierckx

Re: RSS feed (news) in a block

by W Page -
Jon and Jan,  thank you for your help with this.

De Jong,  thank you for the block.

Yes, you are correct Jan.  The "rss.php" feed does indeed work.  Your and Jon's posts help me figure out what is going on.

The text box next to the site and course names in the RSSFeed block's Settings window, allows for only 1 RSS feed in that particular course's RSSFeed block.

WP1


In reply to Jan Dierckx

Re: RSS feed (news) in a block

by De Jong Paul -

Hi,

Sorry, I forgot other people uses prefixes in their databases. Good point!
Well, for our Moodle sites (
www.mystudyguide.nl and www.e-study.nl, test.e-study.nl for now) we use 1 block per course. We don't need more.

Programming a block is not that difficult. I won't be very hard to make it working for groups. However you have to change the whole administration area (make an apart table for the subscriptions).

Greets.

Paul

In reply to De Jong Paul

Re: RSS feed (news) in a block

by W Page -
Hi De Jong,

Suggest you do the following to really help make this a block many Moodlers can easily install and use,

WP1
In reply to De Jong Paul

Re: RSS feed (news) in a block

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Paul, it would be really useful to be able to display a description (or title) for the RSS feed in each course, configurable in the Settings page.

A Feed for each course is really useful, but it would help if I could display where the news was coming from. I can't edit the lang file because that affects all feeds. Similarly, it would be good if the block footer was also configurable per course.
In reply to Jon Bolton

Re: RSS feed (news) in a block

by Jan Dierckx -

I agree that there should be more things configurable per course. I don't think it would be a good idea to add all these settings to the Settings page of the block. This page contains sitewide settings (and should be set by the admin). The number of hours newsfeeds should remain cached is probably a good example of such a setting.

The other settings (footer, name of newsfeed, url  of newsfeed, number of items to fetch, etc...) should be handled by a different settings page (for the teacher of the course).

There is however not yet a standard way of printing this type of config page for blocks.

I thought of adding code that changes the footer of the block to something like 'Configure this block' whenever you log in as a teacher. Clicking on this link would open a form to type in footer, url, number of items, etc....

These could be stored in the same databasetable that is used for caching the rssfeeds. There is however one disadvantage: in the end every type of block will have its own way of configuring and this will confuse users. (Compare it with the modules: clicking on the little editing icon always shows the options for whatever module you are using. There should be something like that for every block too.)

My question to the moodle masters smile

Is this the way per course settings for blocks should be handled? Or should we wait until a more generic interface gets addded to the blockcode?

In reply to Jan Dierckx

Re: RSS feed (news) in a block

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi, Jan,

You can just link to an arbitrary script of your own choosing from within the blocks to provide course-level settings and also user-level settings.  As long as the feeds do get cached why not allow students to set their own additional feeds?

For blocks there the config.html file is currently reserved for site-level settings, so perhaps the other scripts can be prefs.php and prefs.html.

You can store things for users using set_user_preference() and get_user_preference().