[LON-CAPA-cvs] cvs: loncom /interface lonwhatsnew.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 07 Apr 2005 04:22:03 -0000


albertel		Thu Apr  7 00:22:03 2005 EDT

  Modified files:              
    /loncom/interface	lonwhatsnew.pm 
  Log:
  - modding it to use the lonfeedback helper functions
  
  
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.3 loncom/interface/lonwhatsnew.pm:1.4
--- loncom/interface/lonwhatsnew.pm:1.3	Thu Apr  7 00:12:31 2005
+++ loncom/interface/lonwhatsnew.pm	Thu Apr  7 00:22:03 2005
@@ -1,5 +1,5 @@
 #
-# $Id: lonwhatsnew.pm,v 1.3 2005/04/07 04:12:31 albertel Exp $
+# $Id: lonwhatsnew.pm,v 1.4 2005/04/07 04:22:03 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -251,12 +251,7 @@
         my $rowNum = 0;
         foreach my $ressymb (@newdiscussions) {
             my $forum_title = $unread{$ressymb}{'title'};
-            my ($map,$ind,$url)=&Apache::lonnet::decode_symb($ressymb);
-            my $feedurl = &Apache::lonnet::clutter($url);
-# backward compatibility (bulletin boards used to be 'wrapped')
-            if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {
-                $feedurl=~s|^/adm/wrapper||;
-            }
+	    my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb);
             my $unreadnum = keys(%{$unread{$ressymb}});
             $unreadnum = $unreadnum - 2;
             if ($unreadnum > 0) {
@@ -431,10 +426,8 @@
         my $title = $resource->compTitle();
         my $ressymb = $symb;
         if ($ressymb =~ m-(___adm/\w+/\w+)/(\d+)/bulletinboard$-) {
-            $ressymb = 'bulletin___'.$2.$1.'/'.$2.'/bulletinboard';
-            unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) {
-                 $ressymb=~s|(bulletin___\d+___)|$1adm/wrapper/|;
-            }
+            $ressymb = &Apache::lonfeedback::wrap_symb('bulletin___'.$2.$1.'/'.
+						       $2.'/bulletinboard');
         }
 
 # Check for unread discussion postings