--- loncom/interface/lonsyllabus.pm 2021/04/29 17:45:22 1.149
+++ loncom/interface/lonsyllabus.pm 2022/09/18 22:33:45 1.151
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Syllabus
#
-# $Id: lonsyllabus.pm,v 1.149 2021/04/29 17:45:22 raeburn Exp $
+# $Id: lonsyllabus.pm,v 1.151 2022/09/18 22:33:45 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -314,10 +314,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 $link = $protocol.'://'.$hostname.$r->uri;
+ my $link = &Apache::lonnet::url_prefix($r,$cdom,$homeserver,'web').
+ $r->uri;
$r->print('
'
.''
.''
@@ -326,7 +324,7 @@ sub handler {
.''
.'
'."\n");
my $lonhost = $r->dir_config('lonHostID');
- $r->print(&chooser($external,$uploaded,$minimal,$cdom,$cnum,$lonhost,
+ $r->print(&chooser($r,$external,$uploaded,$minimal,$cdom,$cnum,$lonhost,
\%syllabusfields,\%syllabus));
}
} else {
@@ -789,7 +787,7 @@ sub get_breadcrumbs{
}
sub chooser {
- my ($external,$uploaded,$minimal,$cdom,$cnum,$lonhost,$fields,$values) = @_;
+ my ($r,$external,$uploaded,$minimal,$cdom,$cnum,$lonhost,$fields,$values) = @_;
my %lt = &Apache::lonlocal::texthash(
'type' => 'Syllabus Type',
'url' => 'External URL',
@@ -854,7 +852,7 @@ sub chooser {
''."\n".
'