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

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 20 Jul 2006 22:50:50 -0000


raeburn		Thu Jul 20 18:50:50 2006 EDT

  Modified files:              
    /loncom/interface	lonbulletin.pm 
  Log:
  Include some hierarchy in storage of uploaded photos in bulletin boards to avoiding overwriting between group boards or between course boards created by a single user when filenames are in common.
  
  
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.37 loncom/interface/lonbulletin.pm:1.38
--- loncom/interface/lonbulletin.pm:1.37	Mon Jul 17 17:59:24 2006
+++ loncom/interface/lonbulletin.pm	Thu Jul 20 18:50:50 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Bulletin Board Handler
 #
-# $Id: lonbulletin.pm,v 1.37 2006/07/17 21:59:24 raeburn Exp $
+# $Id: lonbulletin.pm,v 1.38 2006/07/20 22:50:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -197,8 +197,15 @@
 	      if ($syllabus{'uploaded.photourl'}) {
 		  &Apache::lonnet::removeuploadedurl($syllabus{'uploaded.photourl'});
 	      }
-	      $syllabus{'uploaded.photourl'}=
-		  &Apache::lonnet::userfileupload('uploaddoc',1,'bulletin');
+              if ($group ne '') {
+	          $syllabus{'uploaded.photourl'}=
+		      &Apache::lonnet::userfileupload('uploaddoc',1,
+                                                      'bulletin/'.$group.'/'.$marker);
+              } else {
+                  $syllabus{'uploaded.photourl'}=
+                      &Apache::lonnet::userfileupload('uploaddoc',1,
+                                                      'bulletin/'.$marker);
+              }
  	  }
           $syllabus{'uploaded.lastmodified'}=time;
           &Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs);