Diff for /loncom/interface/londocs.pm between versions 1.242 and 1.244

version 1.242, 2006/07/20 20:42:48 version 1.244, 2006/08/11 22:00:07
Line 36  use Apache::loncommon; Line 36  use Apache::loncommon;
 use Apache::lonratedt;  use Apache::lonratedt;
 use Apache::lonratsrv;  use Apache::lonratsrv;
 use Apache::lonxml;  use Apache::lonxml;
 use Apache::loncreatecourse;  use Apache::lonclonecourse;
 use Apache::lonnavmaps;  use Apache::lonnavmaps;
 use HTML::Entities;  use HTML::Entities;
 use GDBM_File;  use GDBM_File;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Cwd;  use Cwd;
 use lib '/home/httpd/lib/perl/';  
 use LONCAPA;  use LONCAPA;
   
 my $iconpath;  my $iconpath;
Line 186  sub dumpcourse { Line 185  sub dumpcourse {
     $r->print('<br /><tt>'.$_.'</tt> => <tt>'.$newfilename.'</tt>: ');      $r->print('<br /><tt>'.$_.'</tt> => <tt>'.$newfilename.'</tt>: ');
     if (my $fh=Apache::File->new('>'.$path.'/'.$newfilename)) {      if (my $fh=Apache::File->new('>'.$path.'/'.$newfilename)) {
  if ($_=~/\.(sequence|page|html|htm|xml|xhtml)$/) {   if ($_=~/\.(sequence|page|html|htm|xml|xhtml)$/) {
     print $fh &Apache::loncreatecourse::rewritefile(      print $fh &Apache::lonclonecourse::rewritefile(
          &Apache::loncreatecourse::readfile($env{'request.course.id'},$_),           &Apache::lonclonecourse::readfile($env{'request.course.id'},$_),
      (%replacehash,$crs => '')       (%replacehash,$crs => '')
     );      );
  } else {   } else {
     print $fh      print $fh
          &Apache::loncreatecourse::readfile($env{'request.course.id'},$_);           &Apache::lonclonecourse::readfile($env{'request.course.id'},$_);
        }         }
  $fh->close();   $fh->close();
     } else {      } else {
Line 230  sub dumpcourse { Line 229  sub dumpcourse {
  $r->print('<h3>'.&mt('Folder in Construction Space').'</h3><input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />');   $r->print('<h3>'.&mt('Folder in Construction Space').'</h3><input type="text" size="50" name="authorfolder" value="'.$title.'" /><br />');
  &tiehash();   &tiehash();
  $r->print('<h3>'.&mt('Filenames in Construction Space').'</h3><table border="2"><tr><th>'.&mt('Internal Filename').'</th><th>'.&mt('Title').'</th><th>'.&mt('Save as ...').'</th></tr>');   $r->print('<h3>'.&mt('Filenames in Construction Space').'</h3><table border="2"><tr><th>'.&mt('Internal Filename').'</th><th>'.&mt('Title').'</th><th>'.&mt('Save as ...').'</th></tr>');
  foreach (&Apache::loncreatecourse::crsdirlist($origcrsid,'userfiles')) {   foreach (&Apache::lonclonecourse::crsdirlist($origcrsid,'userfiles')) {
     $r->print('<tr><td>'.$_.'</td>');      $r->print('<tr><td>'.$_.'</td>');
     my ($ext)=($_=~/\.(\w+)$/);      my ($ext)=($_=~/\.(\w+)$/);
     my $title=$hash{'title_'.$hash{      my $title=$hash{'title_'.$hash{
Line 1098  sub editor { Line 1097  sub editor {
     my $newurl=$1.$newid.'.'.$2;      my $newurl=$1.$newid.'.'.$2;
     my $storefn=$newurl;      my $storefn=$newurl;
                     $storefn=~s/^\/\w+\/\w+\/\w+\///;                      $storefn=~s/^\/\w+\/\w+\/\w+\///;
     &Apache::loncreatecourse::writefile      &Apache::lonclonecourse::writefile
  ($env{'request.course.id'},$storefn,   ($env{'request.course.id'},$storefn,
  &Apache::lonnet::getfile($url));   &Apache::lonnet::getfile($url));
     $url=$newurl;      $url=$newurl;
Line 1192  sub editor { Line 1191  sub editor {
 # Group import/search  # Group import/search
     if ($env{'form.importdetail'}) {      if ($env{'form.importdetail'}) {
  my @imports;   my @imports;
  &Apache::lonnet::logthis("imp detail ".$env{'form.importdetail'});  # &Apache::lonnet::logthis("imp detail ".$env{'form.importdetail'});
  foreach (split(/\&/,$env{'form.importdetail'})) {   foreach (split(/\&/,$env{'form.importdetail'})) {
     if (defined($_)) {      if (defined($_)) {
  my ($name,$url)=split(/\=/,$_);   my ($name,$url)=split(/\=/,$_);

Removed from v.1.242  
changed lines
  Added in v.1.244


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>