RSS feeds of the Courses Resources

RSS feeds of the Courses Resources

by Maurizio Caporali -
Number of replies: 1

This filesgive the possibility to create the feeds of the courses resources, example:

http://www.saul.unisi.it/unisi/course/category.php?id=15

Thestudents cans subscribe the course feed and he receives automatically thecourse status.


1-Copy the folder rss_resources in the root of moodle installation, It contains the feedcreator.class.php (FeedCreator class) developed by Kai Blankenhorn (www.bitfolge.de) and there will be copy automatically the XML files.
2-Copy the file rss_resources.php
3-Modify the file rss_resources.php with your data, in particular:
$image = new FeedImage();
$image->title = "Unisi logo";
$image->url = "";
$image->link = "$CFG->wwwroot";
$image->description = "Feed provided by http://www.saul.unisi.it/disco/ 3_is. Click to visit.";
$item->author = "3_is - caporali@unisi.it";
And you can choice the feed output:
// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1 (deprecated),
// MBOX, OPML, ATOM, ATOM0.3, HTML, JS
echo $rss->saveFeed("RSS1.0", "../news/feedresources-$id.xml");
4-For the visualization and creation of the feed call the URL:
http://www.yoursite.it/moodledir/course/3_is_rss_resources.php?id=courseid
Another way is to insert the RSS logo near the course name, for example:
http://www.saul.unisi.it/unisi/course/category.php?id=15
In the case you have to modify moodle/unisi/course/lib.php file, in this way:
You goes to line 1381 and after the } you inserts:
echo "<span> echo "Resources feed: ";
echo '<a title="Resources of the Course RSS '.$course->fullname.'" href="'.$CFG->wwwroot.'/course/3_is_rss_resources.php?id='.$course->id.'">';
echo '<img src="'.$CFG->pixpath.'/i/rss.gif" height="14" width="36" border="0" alt="Resources of the Course RSS '.$course->fullname.'" /></a>';
echo "</span>\n";

I hope thatit will be useful.

RegardsMaurizio

Average of ratings: -
In reply to Maurizio Caporali

Re: RSS feeds of the Courses Resources

by Robert Adams -
I am confused about where to place the rss resource file after I have modified it. Can someone more familiar with this point me in the right direction.

Thanks.

Robert Adams