version 1.143, 2017/02/20 18:29:23
|
version 1.144, 2018/12/27 18:14:25
|
Line 306 sub handler {
|
Line 306 sub handler {
|
if ($allowed) { |
if ($allowed) { |
#---------------------------------- Print External URL Syllabus Info if editing |
#---------------------------------- Print External URL Syllabus Info if editing |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
|
my $hostname = &Apache::lonnet::hostname($homeserver); |
my $protocol = $Apache::lonnet::protocol{$homeserver}; |
my $protocol = $Apache::lonnet::protocol{$homeserver}; |
$protocol = 'http' if ($protocol ne 'https'); |
$protocol = 'http' if ($protocol ne 'https'); |
my $link = $r->uri; |
my $link = $r->uri; |
Line 313 sub handler {
|
Line 314 sub handler {
|
$link .= '?usehttp=1'; |
$link .= '?usehttp=1'; |
$protocol = 'http'; |
$protocol = 'http'; |
} |
} |
$link = $protocol.'://'.&Apache::lonnet::hostname($homeserver).$link; |
$link = $protocol.'://'.$hostname.$link; |
$r->print('<div class="LC_left_float">' |
$r->print('<div class="LC_left_float">' |
.'<span class="LC_help_open_topic LC_info">' |
.'<span class="LC_help_open_topic LC_info">' |
.'<span class="LC_info">' |
.'<span class="LC_info">' |
Line 899 sub chooser {
|
Line 900 sub chooser {
|
|
|
sub syllabus_file_info { |
sub syllabus_file_info { |
my ($item,$cnum,$cdom,$lonhost,$context) = @_; |
my ($item,$cnum,$cdom,$lonhost,$context) = @_; |
|
my $hostname = &Apache::lonnet::hostname($lonhost); |
my $protocol = $Apache::lonnet::protocol{$lonhost}; |
my $protocol = $Apache::lonnet::protocol{$lonhost}; |
$protocol = 'http' if ($protocol ne 'https'); |
$protocol = 'http' if ($protocol ne 'https'); |
my $absurl = $protocol.'://'.&Apache::lonnet::hostname($lonhost).$item; |
my $absurl = $protocol.'://'.$hostname.$item; |
my ($filename) = ($item =~ m{([^/]+)$}); |
my ($filename) = ($item =~ m{([^/]+)$}); |
my $file=&Apache::lonnet::filelocation("",$item); |
my $file=&Apache::lonnet::filelocation("",$item); |
my ($depbutton,$filetype,$editable); |
my ($depbutton,$filetype,$editable); |
Line 1574 sub home_http_host {
|
Line 1576 sub home_http_host {
|
my ($cdom,$cnum) = @_; |
my ($cdom,$cnum) = @_; |
my $home=&Apache::lonnet::homeserver($cnum,$cdom); |
my $home=&Apache::lonnet::homeserver($cnum,$cdom); |
if ($home ne 'no_host') { |
if ($home ne 'no_host') { |
|
my $hostname = &Apache::lonnet::hostname($home); |
my $protocol = $Apache::lonnet::protocol{$home}; |
my $protocol = $Apache::lonnet::protocol{$home}; |
$protocol = 'http' if ($protocol ne 'https'); |
$protocol = 'http' if ($protocol ne 'https'); |
return $protocol.'://'.&Apache::lonnet::hostname($home); |
return $protocol.'://'.$hostname; |
} |
} |
return; |
return; |
} |
} |