RSS Feeds

RSS Feeds

by Eloy Lafuente (stronk7) -
Number of replies: 30
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi moodlers,

RSS feeds support has been implemented in 1.3 recently. It allows to publish some course contents using RSS. It has been designed to make modules have their own RSS generation. Currently, only forum RSS feeds are supported, but everything is ready to extend such functionality to other modules.

Here it's a small summary about how it works:

  • First of all, RSS feeds have to be activated in the "Admin/Configure" page.
  • Then, for each module, you can activate RSS feeds in the "Admin/Modules" page.
  • In every activity with RSS support inside every course, in the "Edit Activity" page, you will find some RSS related-prefs. There you can configure RSS feeds for that activity.

In current Forum RSS feeds, you can select to publish "discussion feeds" (only new discussions are included in the feed) or "post feeds" (every message is included in the feed). You can select the number of articles to include in the RSS feed.

When an activity is RSS enabled, you will see a little RSS button upper-right in the main activity page (ie. the list of discussions for Forums).

Copying that URL and subscribing to it from any RSS client or aggregator, all should work fine (please, note that RSS feeds are generated by Moodle's cron script so, you will need to wait some minutes to have the 1st available feed).

And this is all, please test and enjoy them, any feedback will be welcome here and in the Bugs System.

Some possible things to do (and to discuss here) could be:
  • Adding author fullname to forums feeds.
  • Extending RSS to othe modules (glossary....).
  • Showing the RSS button in other places...
  • ...


Ciao, smile
Average of ratings: -
In reply to Eloy Lafuente (stronk7)

Re: RSS Feeds

by Tom Murdock -
Eloy, this looks really interesting. Thanks!

Question for you. Would there be a way to feed the Upcoming Events (course & global) to RSS?

I guess this is similar to information in a "My Moodle" page, but one that could be syndicated to parents of younger students.

Thanks,
Tom
In reply to Tom Murdock

Re: RSS Feeds

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Tom,

RSS, as implemented actually are "module oriented", ie. code in Moodle allows to extend RSS feeds to other modules in a relatively simple task.

Adding non-modules RSS feeds can be a bit more complicated but it isn't impossible, sure. Possible (and interesting) candidates for RSS can be "Recent Activity", "Upcoming Events" and so on.

But I really think it won't be done for 1.3 because non-modules RSS (perhaps we can call them Blocks RSS) will force us to modify more than a few things and perhaps is would be too "dangerous" with 1.3 coming soon!!

Now, there is a "Feature Request" about implementing RSS feeds for the "Recent Activity" block. See Bug 1315.

Perhaps your question should fill another bug for future reference...

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: RSS Feeds

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
Yes, author fullname() should definitely be in the feeds, If a site is going to publish feeds of forum posts then they need to include the author's name.
In reply to Martin Dougiamas

Re: RSS Feeds

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
Actually, on reflection, "discussions-only" feeds probably don't need the author names so much, since these are usually going to be news forums and the like.  But I think a full feed of all posts would need authors so it made sense.
In reply to Martin Dougiamas

Re: RSS Feeds

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Some hours ago I've added fullname(user) in both posts and discussion feeds. If you want, I can remove it from discussions...

RSS feeds support has been extended to glossaries too!!

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: RSS Feeds

by Daryl Hawes -
Eloy,
I'm working on a blogging module that I hope to have in the contrib section of cvs soon. I'm porting Simplog (http://www.simplog.net) over to work as a moodle module. Currently the code handles its own side blocks, calendar and RSS publication and subscription. I hope to integrate these with the new blocks, calendar and rss modules as much as possible.
Simplog allows members to define the URL of remote RSS feeds (0.9, 2.0 or Atom). Users can then define a side block which will contain the recent headlines of that remote feed. You can use this subscription code to further expose subscribed feeds throughout moodle.
Also, simplog caches feeds that it reads to disk. I've added in caching of published feeds as well. I notice in the cvs nightly build that your rss module also caches published feeds. One difference is that in the rss module a cron action is used to update the feeds. I do a query against the age of the cached file when a request for the feed comes in.
I'm trying to figure out how to use sourceforge. In the meantime I can email you a snapshot of what I have if you would like.
Daryl
In reply to Daryl Hawes

Re: RSS Feeds

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Daryl,

I think your module is really more than a RSS aggregator (including and view external RSS feeds into Moodle). Mine is a RSS publisher (exporting Moodle info with RSS feeds). Sure they can work together!!

I'm not absolutely sure about the rest of characteristics of simplog (only visited very quickly), but it seems to be more than a simple module, isn't it? (calendar, blog, rss generation, agregation...). Perhaps some of that will conflict with some current characteristics in Moodle?

Anyway it souds good...ciao smile
In reply to Eloy Lafuente (stronk7)

Re: RSS Feeds

by Daryl Hawes -
In reply to Daryl Hawes

Re: RSS Feeds

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
Just in case this thought wasn't already occurring to you guys, an RSS-displayer would make a very nice Block (imagine a little config link in it to specify one or more feeds for display).
In reply to Martin Dougiamas

Re: RSS Feeds

by Daryl Hawes -
Funny you should mention this.
I was going to mention blocks as well yesterday.
Simplog has its own blocks structure.
I think converting simplog's blocks to moodle blocks should be relatively straight forward.
What I could use help with is getting moodle blocks to display on simplog pages. They appear to display in courses of certain formats only at the moment.

I have another question about moodle blocks. simplog blocks are designed to allow a user to add multiple instances of the same block type - since they're editable. Can you do that with moodle blocks, or can you only add one per course?

Relevant files for simplog blocks:
cvs:/contrib/simplog/blocks.php
cvs:/contrib/simplog/admin_blocks.php
cvs:/contrib/simplog/footer.php

Thanks
In reply to Daryl Hawes

Re: RSS Feeds

by John Papaioannou -
That's a very good question, Daryl. It had crossed my mind, too. It's true that for some blocks, having multiple copies (configured differently) would be useful. On the other hand, for most blocks this isn't true. And seeing as most CMS software uses the single-instance approach, I think that trying to have multiple instances of one block is the wrong idea here.

Also, I 'll be glad to help in integrating the Moodle blocks into Simplog. However, I don't have a very clear idea of what you are trying to do. I took a look into CVS /contrib/, but I couldn't find any clear documentation on how to get this thing working into Moodle. Is it just too early for that (i.e., you 're still working on it) or did I miss something? Anyway, if we could start a new forum thread to talk about how to incorporate the blocks, or you can email me directly if you prefer.

Finally, I 'd like to mention one of these crazy ideas that one day will be my downfall big grin:

You are saying "show Moodle blocks into Simplog". That got me to try and imagine what "into Simplog" means, for example, is it supposed to be incorporated as a module? While thinking about the many options, and with a little help from your mention of course formats wink, the idea hit me:

What about making Simplog an entirely new course format? For example, it could be a collection of blogs/news feeds, one for each member of the course!

Cheers,
Jon
In reply to John Papaioannou

Re: RSS Feeds

by Bryan Williams -

What about making Simplog an entirely new course format?

Friggin brilliant idea.  Wonder if Daryl is open to exploring this as a solution?  Rather than ending up with either SimpMood or MoodSimp, we would have something that looks and behaves like 100% Moodle.

In reply to John Papaioannou

Re: RSS Feeds

by Daryl Hawes -
I'm open to exploring new ideas, indeed.
However, I don't see a blog as a course format - it does not fit.
Please take a look at Martin's bug regarding blogging: "Bug #285 - New Blog module to replace Journal module" at http://moodle.org/bugs/bug.php?op=show&bugid=285&pos=7
There is an excellent comment from Vic:
"Having used blogs at my school for a few months, I'd like to add these observations.

We used blogs in two ways; one for personal reflection, the other for text-responses. In the latter, the students were directed by questions from the teacher, and as I understand, had much the same functionality of the journal module. The personal blogs on the other hand, have completely different requirements:

Firstly, students need ownership of the blog. This means the blog would have to be assigned to the *student*, not any course. This might be 'worked around' by using form groups or year groups or similar as courses, but ownership is one of the concepts we identified that makes blogs so appealing to students.

Further to this, I think that having the structure and layout of the blog customisable is very beneficial. How possible would this be (to have the students modify html and css for their own instances of such a module)?

Finally, the ability of students to include pictures and other media is very useful. "

I don't find this surprising at all. A blog is a personal space, a diary, a journal. It's for completely free form, and hopefully aethetically customizable posts. Most blogs are used to interact on a social level outside of course work. Things like "what did I have for breakfast", "Is Christina Aguilara a better artist than Jessica Simpson" and other seemingly off topics rants. However, these off topic rants allow the students to interact with each other and with the teacher at a different level. It can personalize, indivisualize, their interaction with their learning site.

< / rant >
In reply to Daryl Hawes

Re: RSS Feeds

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
Yes, I think a module makes more sense, but, I'm wary of making simpblog a standard module while it has all that other baggage attached (blocks, calendars etc).

As a general principle the module should do one thing (blog) and do it well - this allows modules to be recombined (by the teacher or student) more smoothly, and reduces duplicated work.

You have to imagine that at some future point there will be Moodle-wide mechanisms for users to choose blocks to appear on every page if they want to - the various modules don't need to know anything about this.
In reply to Martin Dougiamas

Re: RSS Feeds

by Daryl Hawes -
My vision at this point:
Simplog should be a standard module.
Simplog calendar and blocks should be converted/integrated fully with moodle's calendar and blocks with Simplog simply "subscribing" to those services. Simplog's magpieRSS feed handling should be integrated fully with the existing RSS module with Simplog simply "subscribing" to that service.
This would allow the newly trimmed simplog module to be - a blog.
I hope to start a new discussion point in the developer general section today which will talk about how to install and start testing simplog so that its components can be better understood.
Thoughts?
In reply to Daryl Hawes

Re: RSS Feeds

by Bryan Williams -

Daryl,

Your work is why Moodle is so infectious.  FANTASTIC, look forward to trying this out. 

In reply to Daryl Hawes

Re: RSS Feeds

by Daryl Hawes -
The new discussion in the general developer area has been started here:
http://moodle.org/mod/forum/discuss.php?d=7934
I started the topic by posting the best instructions I could at the moment on how to get simplog installed and start testing. Feedback on installation successes/failures and discussions on implementation/direction as well as my todo notes are encouraged smile
In reply to Martin Dougiamas

Re: RSS Feeds

by Bryan Williams -

Must have read my mind. Have a new client (mortage broker) I know will ask for this once he finds out about RSS.  We could also use a little how-to from Jon or Eloy on creating new blocks.

In reply to Martin Dougiamas

Re: RSS Feeds

by John Papaioannou -
Martin, that's a very nice idea, but unfortunately right now we only have global configuration for the blocks. This means that the RSS feed would be course-independent, and thus not very useful.

Another idea is that maybe we could make the "recent activity" nothing more than a collection of RSS feeds: feed for new user accounts, new forum posts, etc etc. And why not, feed for new calendar events.

I 'm going to search for a PHP RSS aggregator to make into a block.

Jon
In reply to John Papaioannou

Re: RSS Feeds

by Daryl Hawes -
Jon,
Please do not search further for an RSS aggregator to make into a block than simplog. It already does this and it's looking for a nice home deeper integrated in moodle.
I think I'll start a new forum thread to discuss simplog and start creating documentation on how to get it working. If you want to see it working it's best demoed at Tom Murdock's site:
http://jmurdock.org/demo/
I sent him basically the same stuff as I have uploaded to contrib and he installed the pieces in the right places and worked with me on how to get started interacting with it.
Get a feel for the user interaction with the module, then try an install.

Daryl
In reply to Daryl Hawes

Re: RSS Feeds

by John Papaioannou -
Daryl,

I certainly don't want to reinvent the wheel. I just wanted an RSS block for the courses, and found a simple small class (lastRSS) which does the job. When later the RSS library becomes more standardized, we can agree on something common to use. The block itself is trivial, so updating it to parse RSS feeds using Simplog's parser is very easy. However, my point is that first, Simplog must be integrated into Moodle.

Which brings us to the previous question: what does MoodleSimplog want to be? How do you envision it? (edit: I read your post about the journal replacement above, which answers me. Very nice! smile)

Regardless of the answer to the above question, the "Moodle way" to do things (Martin correct me if I 'm wrong) is to slowly build an rsslib.php with the library functions (possibly extracted from Simplog, which would already have such a library) so that all Moodle code can use it. Eloy has already started an rsslib.php, so I think we must get organized and work together, no sense writing duplicate code.

In fact the more I think about this the more strongly I believe it, so I have started a new thread detailing this proposal over at the general developer forum.

Jon

In reply to John Papaioannou

Re: RSS Feeds

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
I think a new table for storing course_preferences makes sense for this in future, but for now you could store even just store the preferences for feeds as a user preference. smile

"My news feeds" block, maybe.
In reply to Martin Dougiamas

Re: RSS Feeds

by John Papaioannou -
It works just fine right now with sitewide configuration, although there are many things to do (featurewise) before it's ready for "general consumption". Should I contrib/ it or blocks/ it?

Which reminds me... we have to do something about a blocks repository.
In reply to John Papaioannou

Re: RSS Feeds

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi,

Jordi Adell has sent this link in the "Moodle en Español" course. As a reference only:

RSS: A Learning Technology
Eva Kaplan-Leiserson
Learning circuits, May 2004
http://www.learningcircuits.org/2004/may2004/0405_trends.htm


About the amazing "RSS revolution" in this forum, I'm not absolutely sure, but I think we should wait after 1.3 release to start new developments in this area.

Perhaps when everybody will be using 1.3 and RSS feeds, we'll be able to detect "real" requirements in RSS system. For now, perhaps, the objective should be to make the current (limited) implementation works like a charm.

Anyway, I totally agree about one central "publisher" and "aggregator" lib, making every module, block... use it, instead of having different places doing the same...

Only one reference and one opinion, ciao smile
In reply to Eloy Lafuente (stronk7)

Re: RSS Feeds

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
Absolutely, well said, Eloy.

Let's test and debug the 1.3 release first.  There are lots of bugs needing to be fixed (not in RSS) in the bug tracker and these need all the help and attention we can get. 

After 1.3 I would like to have a live developer conference via audio to discuss the branching and future directions - I'll post separately on this.