]> git.mjollnir.org Git - moodle.git/commitdiff
Preparing rss stuff to be showed in lists of activities...
authorstronk7 <stronk7>
Sat, 7 Aug 2004 16:54:25 +0000 (16:54 +0000)
committerstronk7 <stronk7>
Sat, 7 Aug 2004 16:54:25 +0000 (16:54 +0000)
rss/rsslib.php

index 7a13d01777c47c4ab84fc1bf9b419fde8ba71af1..a3e5565bc0a61a7cc168ca720bf9cb54c5e7c598 100644 (file)
@@ -1,8 +1,8 @@
 <?PHP  // $Id$
        // This file contains all the common stuff to be used in RSS System
 
-//This function prints the icon (from theme) with the link to rss/file.php
-function rss_print_link($courseid, $userid, $modulename, $id, $tooltiptext="") {
+//This function returns the icon (from theme) with the link to rss/file.php
+function rss_get_link($courseid, $userid, $modulename, $id, $tooltiptext="") {
 
  global $CFG, $THEME, $USER;
 
@@ -25,10 +25,16 @@ function rss_print_link($courseid, $userid, $modulename, $id, $tooltiptext="") {
 
     $rsspix = $pixpath."/i/rss.gif";
 
-     echo "<a href=\"".$rsspath."\"><img src=\"$rsspix\" title=\"$tooltiptext\"></a>";
+    return "<a href=\"".$rsspath."\"><img src=\"$rsspix\" title=\"$tooltiptext\"></a>";
 
 }
 
+//This function prints the icon (from theme) with the link to rss/file.php
+function rss_print_link($courseid, $userid, $modulename, $id, $tooltiptext="") {
+
+    echo rss_get_link($courseid, $userid, $modulename, $id, $tooltiptext);
+
+}
 //This function iterates over each module in the server to see if
 //it supports generating rss feeds, searching for a MODULENAME_rss_feeds()
 //function and invoking it foreach activity as necessary