--- loncom/interface/londocs.pm 2017/05/07 13:57:58 1.625 +++ loncom/interface/londocs.pm 2017/05/08 14:20:20 1.626 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.625 2017/05/07 13:57:58 raeburn Exp $ +# $Id: londocs.pm,v 1.626 2017/05/08 14:20:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -654,7 +654,7 @@ sub group_import { } } if ($url) { - if ($url =~ m{^(/adm/$coursedom/$coursenum/(\d+)/exttool)\:?(.*)$}) { + if ($url =~ m{^(/adm/$coursedom/$coursenum/(\d+)/ext\.tool)\:?(.*)$}) { $url = $1; my $marker = $2; my $info = $3; @@ -1292,7 +1292,7 @@ sub print_paste_buffer { my $extension = (split(/\./,$env{'docs.markedcopy_url_'.$suffix}))[-1]; if ($url =~ m{^(?:/adm/wrapper/ext|(?:http|https)(?::|:))//} ) { $is_external = 1; - } elsif ($url =~ m{^/adm/$match_domain/$match_courseid/\d+/exttool$}) { + } elsif ($url =~ m{^/adm/$match_domain/$match_courseid/\d+/ext\.tool$}) { $is_exttool = 1; } if ($folder =~ /^supplemental/) { @@ -1503,7 +1503,7 @@ sub supp_pasteable { ($url =~ m{^/uploaded/$match_domain/$match_courseid/(docs|supplemental)/(default|\d+)/\d+/}) || ($url =~ m{^/adm/$match_domain/$match_username/aboutme}) || ($url =~ m{^/public/$match_domain/$match_courseid/syllabus}) || - ($url =~ m{^/adm/$match_domain/$match_courseid/\d+/exttool$})) { + ($url =~ m{^/adm/$match_domain/$match_courseid/\d+/ext\.tool$})) { return 1; } return; @@ -3233,7 +3233,7 @@ sub editor { } else { return $errortxt; } - } elsif ($url =~ m{^/adm/$coursedom/$coursenum/new/exttool}) { + } elsif ($url =~ m{^/adm/$coursedom/$coursenum/new/ext\.tool}) { my ($suffix,$errortxt,$locknotfreed) = &new_timebased_suffix($coursedom,$coursenum,'exttool'); if ($locknotfreed) { @@ -3851,7 +3851,7 @@ END |/aboutme$ |/navmaps$ |/bulletinboard$ - |/exttool$ + |/ext\.tool$ |\.html$)}x) || $isexternal) { $skip_confirm = 1; @@ -4010,7 +4010,7 @@ END if (($ENV{'SERVER_PORT'} == 443) && ($exturl !~ /^https:/)) { $nomodal = 1; } - } elsif ($url=~m{^/adm/$coursedom/$coursenum/\d+/exttool$}) { + } elsif ($url=~m{^/adm/$coursedom/$coursenum/\d+/ext\.tool$}) { $url='/adm/wrapper'.$url; } elsif ($url eq "/public/$coursedom/$coursenum/syllabus") { if (($ENV{'SERVER_PORT'} == 443) && @@ -4185,7 +4185,7 @@ $form_end; } } elsif ($supplementalflag && !$allowed) { my $isexttool; - if ($url=~m{^/adm/$coursedom/$coursenum/\d+/exttool$}) { + if ($url=~m{^/adm/$coursedom/$coursenum/\d+/ext\.tool$}) { $url='/adm/wrapper'.$url; $isexttool = 1; } @@ -4210,7 +4210,7 @@ $form_end; &Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem, undef,undef,undef,undef,undef,undef, undef,$disabled); - } elsif ($orig_url =~ m{^/adm/$coursedom/$coursenum/\d+/exttool$}) { + } elsif ($orig_url =~ m{^/adm/$coursedom/$coursenum/\d+/ext\.tool$}) { ($editlink,$extresform) = &Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem, undef,undef,undef,'tool',$coursedom, @@ -4425,6 +4425,8 @@ sub new_timebased_suffix { $errtext = &mt('Failed to acquire a unique timestamp-based suffix for the new folder/page.'); } elsif ($type eq 'smppg') { $errtext = &mt('Failed to acquire a unique timestamp-based suffix for the new simple page.'); + } elsif ($type eq 'exttool') { + $errtext = &mt('Failed to acquire a unique timestamp-based suffix for the new external tool.'); } else { $errtext = &mt('Failed to acquire a unique timestamp-based suffix for the new discussion board.'); } @@ -4453,6 +4455,9 @@ sub new_timebased_suffix { } elsif ($type eq 'smppg') { $locknotfreed .= &mt('This will prevent creation of additional simple pages in this course.'); + } elsif ($type eq 'exttool') { + $locknotfreed .= + &mt('This will prevent creation of additional external tools in this course.'); } else { $locknotfreed .= &mt('This will prevent creation of additional discussion boards in this course.');