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

raeburn raeburn@source.lon-capa.org
Mon, 15 Dec 2008 06:32:01 -0000


raeburn		Mon Dec 15 06:32:01 2008 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Extra randomness in file name of new sequence. 
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.322 loncom/interface/londocs.pm:1.323
--- loncom/interface/londocs.pm:1.322	Mon Dec 15 06:09:37 2008
+++ loncom/interface/londocs.pm	Mon Dec 15 06:32:01 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.322 2008/12/15 06:09:37 raeburn Exp $
+# $Id: londocs.pm,v 1.323 2008/12/15 06:32:01 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1280,7 +1280,7 @@
 # Maps need to be copied first
     if (($url=~/\.(page|sequence)$/) && ($url=~/^\/uploaded\//)) {
 	$title=&mt('Copy of').' '.$title;
-	my $newid=$$.time;
+	my $newid=$$.int(rand(100)).time;
 	my ($oldid,$ext) = ($url=~/^(.+)\.(\w+)$/);
         if ($oldid =~ m{^(/uploaded/\Q$coursedom\E/\Q$coursenum\E/)(\D+)(\d+)$}) {
             my $path = $1;