--- loncom/interface/lonsyllabus.pm 2021/05/04 18:47:36 1.150 +++ loncom/interface/lonsyllabus.pm 2022/10/27 20:33:31 1.152 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.150 2021/05/04 18:47:36 raeburn Exp $ +# $Id: lonsyllabus.pm,v 1.152 2022/10/27 20:33:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -170,6 +170,7 @@ sub handler { } else { my $brcrum; if ($env{'form.folderpath'} =~ /^supplemental/) { + &Apache::loncommon::validate_folderpath(1,'',$cnum,$cdom); my $title = $env{'form.title'}; if ($title eq '') { $title = &mt('Syllabus'); @@ -205,6 +206,7 @@ sub handler { $is_pdf = 1; } if ($env{'form.folderpath'} =~ /^supplemental/) { + &Apache::loncommon::validate_folderpath(1,'',$cnum,$cdom); my $title = $env{'form.title'}; if ($title eq '') { $title = &mt('Syllabus'); @@ -314,12 +316,8 @@ sub handler { if ($allowed) { #---------------------------------- Print External URL Syllabus Info if editing if ($target ne 'tex') { - my $hostname = &Apache::lonnet::hostname($homeserver); - my $protocol = $Apache::lonnet::protocol{$homeserver}; - $protocol = 'http' if ($protocol ne 'https'); - my $alias = &Apache::lonnet::use_proxy_alias($r,$homeserver); - $hostname = $alias if ($alias ne ''); - my $link = $protocol.'://'.$hostname.$r->uri; + my $link = &Apache::lonnet::url_prefix($r,$cdom,$homeserver,'web'). + $r->uri; $r->print('
' .'' .'' @@ -767,6 +765,7 @@ sub get_breadcrumbs{ my ($cdom,$cnum,$crstype,$args) = @_; return unless (ref($args) eq 'HASH'); if ($env{'form.folderpath'} =~ /^supplemental/) { + &Apache::loncommon::validate_folderpath(1,'',$cnum,$cdom); my $title = $env{'form.title'}; if ($title eq '') { $title = &mt('Syllabus');