--- loncom/interface/lonsyllabus.pm 2006/10/23 18:48:47 1.55 +++ loncom/interface/lonsyllabus.pm 2007/05/02 01:33:49 1.59 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.55 2006/10/23 18:48:47 albertel Exp $ +# $Id: lonsyllabus.pm,v 1.59 2007/05/02 01:33:49 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -120,10 +120,10 @@ sub handler { $env{'form.register'},}); $r->print($start_page.'
'. &Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'
'.&mt('This syllabus can be publicly viewed at') .' http://'. - $Apache::lonnet::hostname{$homeserver}.$r->uri.''. + &Apache::lonnet::hostname($homeserver).$r->uri.''. &Apache::loncommon::help_open_topic('Syllabus_ExtLink').'
'. ''.&mt('You can specify an external URL as Syllabus in the [_1].',''.&mt('Course Parameters').'').'
'. ''.
@@ -225,9 +225,10 @@ sub handler {
my $host = $1;
my $remainder=$2;
# remove the hostname from internal URLs
- foreach my $possible_host (keys(%Apache::lonnet::hostname)) {
- if ($possible_host =~
- /\Q$Apache::lonnet::hostname{$host}\E/i) {
+ my $hostname = &Apache::lonnet::hostname($host);
+ my %all_hostnames = &Apache::lonnet::all_hostnames();
+ foreach my $possible_host (keys(%all_hostnames)) {
+ if ($possible_host =~ /\Q$hostname\E/i) {
$url=$remainder;
}
}
@@ -306,7 +307,7 @@ sub handler {
}
} else {
&Apache::lonfeedback::newline_to_br(\$message);
- $message =~s|(https*://[^\s]+)|$1/g;
+ $message =~s|(https*://[^\s]+)|$1|g;
if ($allowed) {
$message=&Apache::lonspeller::markeduptext($message);
}
@@ -323,7 +324,7 @@ sub handler {
if ($allowed) {
$r->print('
');
+ ' ');
}
}
}