Diff for /loncom/publisher/loncfile.pm between versions 1.129 and 1.129.2.1

version 1.129, 2024/05/21 02:57:16 version 1.129.2.1, 2024/08/24 22:09:30
Line 2027  ENDJS Line 2027  ENDJS
     $trailfile =~ s{^/(priv/)}{$londocroot/$1};      $trailfile =~ s{^/(priv/)}{$londocroot/$1};
   
     # Breadcrumbs      # Breadcrumbs
     my $crsauthor;  
     my $text = 'Authoring Space';      my $text = 'Authoring Space';
     my $title = 'Authoring Space File Operation',      my $title = 'Authoring Space File Operation',
     my $href = &Apache::loncommon::authorspace(&url($fn));      my $href = &Apache::loncommon::authorspace(&url($fn));
     if ($env{'request.course.id'}) {  
         my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};  
         my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};  
         if ($href eq "/priv/$cdom/$cnum/") {  
             $text = 'Course Authoring Space';  
             $title = 'Course Authoring Space File Operation',  
             $crsauthor = 1;  
         }  
     }  
     &Apache::lonhtmlcommon::clear_breadcrumbs();      &Apache::lonhtmlcommon::clear_breadcrumbs();
     &Apache::lonhtmlcommon::add_breadcrumb({      &Apache::lonhtmlcommon::add_breadcrumb({
         'text'  => $text,          'text'  => $text,
Line 2062  ENDJS Line 2052  ENDJS
     }      }
   
     if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {      if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
         unless ($crsauthor) {          $r->print('<p class="LC_info">'
             $r->print('<p class="LC_info">'                   .&mt('Co-Author [_1]',$uname.':'.$udom)
                      .&mt('Co-Author [_1]',$uname.':'.$udom)                   .'</p>'
                      .'</p>'          );
             );  
         }  
     }      }
   
   
Line 2092  ENDJS Line 2080  ENDJS
  'Select Action'   => 'New Resource',   'Select Action'   => 'New Resource',
     );      );
     if ($action{$env{'form.action'}}) {      if ($action{$env{'form.action'}}) {
         if ($crsauthor) {          if ($env{'form.action'} eq 'archive') {
             my @disallowed = qw(page sequence rights library);  
             my $newtype;  
             if ($env{'form.action'} =~ /^new(\w+)file$/) {  
                 $newtype = $1;  
             } elsif ($env{'form.action'} eq 'newfile') {  
                 ($newtype) = ($env{'form.newfilename'} =~ m{\.([^/.]+)$});  
                 $newtype = lc($newtype);  
             }  
             if (($newtype ne '') &&  
                 (grep(/^\Q$newtype\E$/,@disallowed))) {  
                 $r->print('<p class="LC_error">'  
                          .&mt('Creation of a new file of type: [_1] is not permitted in Course Authoring Space',$newtype)  
                          .'</p>'  
                          .&Apache::loncommon::end_page()  
                 );  
                 return OK;  
             }  
             if ($env{'form.action'} eq 'archive') {  
                 $r->print('<p>'.&mt('Location').': '.&display($fn).'</p>'."\n".  
                           '<p class="LC_error">'.  
                           &mt('Export to an archive file is not permitted in Course Authoring Space').  
                           '</p>'."\n".  
                           &Apache::loncommon::end_page());  
                 return OK;   
             }  
         } elsif ($env{'form.action'} eq 'archive') {  
             if ($env{'environment.canarchive'}) {              if ($env{'environment.canarchive'}) {
                 if ($archive_earlyout) {                  if ($archive_earlyout) {
                     my $fname = &url($fn);                      my $fname = &url($fn);

Removed from v.1.129  
changed lines
  Added in v.1.129.2.1


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