[LON-CAPA-cvs] cvs: loncom /imspackages imsimport.pm imsimportdocs.pm imsprocessor.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 27 Oct 2005 18:19:37 -0000


raeburn		Thu Oct 27 14:19:37 2005 EDT

  Modified files:              
    /loncom/imspackages	imsprocessor.pm imsimport.pm imsimportdocs.pm 
  Log:
  Remove redundant code now $chome is no longer required by &Apache::lonnet::process_coursefile().
  
  
Index: loncom/imspackages/imsprocessor.pm
diff -u loncom/imspackages/imsprocessor.pm:1.31 loncom/imspackages/imsprocessor.pm:1.32
--- loncom/imspackages/imsprocessor.pm:1.31	Thu Oct 27 13:07:23 2005
+++ loncom/imspackages/imsprocessor.pm	Thu Oct 27 14:19:36 2005
@@ -365,7 +365,7 @@
 }
 
 sub copy_resources {
-    my ($context,$cms,$hrefs,$tempdir,$targets,$url,$crs,$cdom,$chome,$destdir,$timenow) = @_;
+    my ($context,$cms,$hrefs,$tempdir,$targets,$url,$crs,$cdom,$destdir,$timenow) = @_;
     if ($context eq 'DOCS') {
         foreach my $key (sort keys %{$hrefs}) {
             if (grep/^$key$/,@{$targets}) {
@@ -4005,7 +4005,6 @@
         print $fh $contents;
         close($fh);
         if ($context eq 'DOCS') {
-            my $chome = &Apache::lonnet::homeserver($cname,$cdom);
             my $copyfile = $dirname.'/'.$filename;
             my $source = "$docroot/$res/webimages/$filename";
             my $fileresult;
Index: loncom/imspackages/imsimport.pm
diff -u loncom/imspackages/imsimport.pm:1.11 loncom/imspackages/imsimport.pm:1.12
--- loncom/imspackages/imsimport.pm:1.11	Thu Apr  7 02:56:22 2005
+++ loncom/imspackages/imsimport.pm	Thu Oct 27 14:19:36 2005
@@ -606,14 +606,12 @@
     my ($r,$uname,$udom,$areas,$areaname,$cmsmap,$destdir,$newdir) = @_;
     my $crs = '';
     my $cdom = '';
-    my $chome = '';
     my $db_handling = '';
     my $timenow = time; 
     my $announce_handling = 'ok';
     my $cms = $env{'form.source'};
     if ( defined($env{'form.bb_crs'}) ) {
         ($cdom,$crs) = split/\//,$env{'form.bb_crs'};
-        $chome = &Apache::lonnet::homeserver($crs,$cdom);
     } 
     my $user_crs = '';
     my $user_cdom = '';
@@ -699,7 +697,7 @@
 
         &Apache::imsprocessor::process_resinfo($cms,'CSTR',$tempdir,$destdir,\%items,\%resources,\@targets,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$seqstem,$seqstem,\@resrcfiles,\@packages,\%hrefs,\@pages,\@sequences,\%randompicks);
 
-        my $copy_result = &Apache::imsprocessor::copy_resources('CSTR',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow,\%importareas);
+        my $copy_result = &Apache::imsprocessor::copy_resources('CSTR',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$destdir,$timenow,\%importareas);
    
         &Apache::imsprocessor::build_structure($cms,'CSTR',$destdir,\%items,\%resinfo,\%resources,\@targets,\%hrefs,$udom,$uname,$newdir,$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames,\@packages,\%includeditems,\%randompicks);
 
Index: loncom/imspackages/imsimportdocs.pm
diff -u loncom/imspackages/imsimportdocs.pm:1.13 loncom/imspackages/imsimportdocs.pm:1.14
--- loncom/imspackages/imsimportdocs.pm:1.13	Thu Oct 27 13:07:23 2005
+++ loncom/imspackages/imsimportdocs.pm	Thu Oct 27 14:19:36 2005
@@ -145,7 +145,6 @@
 # get course data
     my $coursenum=$env{'course.'.$env{'request.course.id'}.'.num'};
     my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'};
-    my $coursehome=$env{'course.'.$env{'request.course.id'}.'.home'};
 
 # get personal data
  
@@ -193,7 +192,7 @@
     } elsif ($env{'form.phase'} eq 'two') {
         &display_two($r,$coursenum,\@areas,\%areaname,%cmsmap);
     } elsif ($env{'form.phase'} eq 'three') {
-        &display_three($r,$coursenum,$coursedom,$coursehome,$uname,$udom,\@areas,%cmsmap);
+        &display_three($r,$coursenum,$coursedom,$uname,$udom,\@areas,%cmsmap);
     }   
     $r->print("</body><html>");
     return OK;
@@ -502,7 +501,7 @@
 
 
 sub display_three {
-    my ($r,$crs,$cdom,$chome,$uname,$udom,$areas,%cmsmap) = @_;
+    my ($r,$crs,$cdom,$uname,$udom,$areas,%cmsmap) = @_;
     my $folder = $env{'form.folder'};
     my $cms = $env{'form.source'};
     my $tempdir = $env{'form.tempdir'};
@@ -614,7 +613,7 @@
 
         &Apache::imsprocessor::process_resinfo($cms,'DOCS',$tempdir,$destdir,\%items,\%resources,\@targets,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$seqstem,$seqstem,\@resrcfiles,\@packages,\%hrefs,\@pages,\@sequences);
 
-        my $copy_result = &Apache::imsprocessor::copy_resources('DOCS',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow,\%importareas);
+        my $copy_result = &Apache::imsprocessor::copy_resources('DOCS',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$destdir,$timenow,\%importareas);
 
         &Apache::imsprocessor::build_structure($cms,'DOCS',$destdir,\%items,\%resinfo,\%resources,\@targets,\%hrefs,$udom,$uname,'',$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames,\@packages,\%includeditems);