Diff for /loncom/imspackages/imsimport.pm between versions 1.19 and 1.22

version 1.19, 2006/04/04 08:18:33 version 1.22, 2006/12/05 02:55:54
Line 34  use HTML::Entities(); Line 34  use HTML::Entities();
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonupload;  use Apache::lonupload;
 use File::Basename();  use File::Basename();
                                                                                               use LONCAPA;
   
 # ----------------------------------------------------------------  Jscript One  # ----------------------------------------------------------------  Jscript One
 sub jscript_one {  sub jscript_one {
     my ($fullpath,$jsref) = @_;      my ($fullpath,$jsref) = @_;
   
       my %body_layout = ('rightmargin'  => "0",
          'leftmargin'   => "0",
          'marginwidth'  => "0",
          'topmargin'    => "0",
          'marginheight' => "0");
     my $start_page =       my $start_page = 
  &Apache::loncommon::start_page('Create IMS import directory',undef,   &Apache::loncommon::start_page('Create IMS import directory',undef,
        {'only_body'   => 1,         {'only_body'   => 1,
  'add_entries' => "topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'",   'add_entries' => \%body_layout,
  'js_ready'    => 1,});   'js_ready'    => 1,});
     my $end_page =       my $end_page = 
  &Apache::loncommon::end_page({'js_ready' => 1,});   &Apache::loncommon::end_page({'js_ready' => 1,});
Line 752  sub get_ccroles { Line 758  sub get_ccroles {
     my @crslist = ();      my @crslist = ();
     my %descrip =();      my %descrip =();
     foreach my $key (keys %roles ) {      foreach my $key (keys %roles ) {
         if ($key =~ m/^\/(\w+)\/(\w+)_cc$/) {          if ($key =~ m{^/($LONCAPA::domain_re)/($LONCAPA::username_re)_cc$}) {
             my $cdom = $1;              my $cdom = $1;
             my $crs = $2;              my $crs = $2;
             my $role_end = 0;              my $role_end = 0;
Line 821  sub handler { Line 827  sub handler {
     my $javascript = '';      my $javascript = '';
     my $page_name = '';      my $page_name = '';
     my $current_page = '';      my $current_page = '';
     my $loadentries = '';  
     my $qcount = '';      my $qcount = '';
   
 # get personal information for this user  # get personal information for this user
Line 851  sub handler { Line 856  sub handler {
         $fn=$env{'form.filename'};          $fn=$env{'form.filename'};
         $fn=~s/^http\:\/\/[^\/]+\///;          $fn=~s/^http\:\/\/[^\/]+\///;
         $fn=~s/^\///;          $fn=~s/^\///;
         $fn=~s/(\~|priv\/)(\w+)//;          $fn=~s/(\~|priv\/)($LONCAPA::username_re)//;
         $fn=~s/\/+/\//g;          $fn=~s/\/+/\//g;
     } else {      } else {
         $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}.          $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}.
Line 864  sub handler { Line 869  sub handler {
     unless ($pathname eq '/') {      unless ($pathname eq '/') {
         $fullpath .= '/';          $fullpath .= '/';
     }      }
     my $loadentries = '';  
   
     my @areas = ();      my @areas = ();
     my %cmsmap = ();      my %cmsmap = ();
Line 886  sub handler { Line 890  sub handler {
     $javascript = "<script type=\"text/javascript\">\n//<!--\n$javascript\n// --></script>\n";      $javascript = "<script type=\"text/javascript\">\n//<!--\n$javascript\n// --></script>\n";
   
     my $title = 'Upload IMS package to Construction Space';      my $title = 'Upload IMS package to Construction Space';
     $r->print(&Apache::loncommon::start_page($title, $javascript,      $r->print(&Apache::loncommon::start_page($title, $javascript));
      {'add_entries' =>  
   $loadentries,}));  
   
     if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {      if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
         $r->print('<h3><font color=red>'.&mt('Co-Author').': '.$uname.          $r->print('<h3><font color=red>'.&mt('Co-Author').': '.$uname.

Removed from v.1.19  
changed lines
  Added in v.1.22


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