version 1.444, 2006/08/11 22:00:07
|
version 1.446, 2006/08/18 20:24:54
|
Line 5849 sub construct_course {
|
Line 5849 sub construct_course {
|
# |
# |
unless (($args->{'nonstandard'}) || ($args->{'firstres'} eq 'blank') |
unless (($args->{'nonstandard'}) || ($args->{'firstres'} eq 'blank') |
|| ($cloneid)) { |
|| ($cloneid)) { |
|
use LONCAPA::map; |
$outcome .= &mt('Setting first resource').': '; |
$outcome .= &mt('Setting first resource').': '; |
my ($errtext,$fatal)= |
|
&Apache::londocs::mapread($$crsunum,$$crsudom,'default.sequence'); |
my $map = '/uploaded/'.$$crsudom.'/'.$$crsunum.'/default.sequence'; |
|
my ($errtext,$fatal)=&LONCAPA::map::mapread($map); |
|
|
$outcome .= ($fatal?$errtext:'read ok').' - '; |
$outcome .= ($fatal?$errtext:'read ok').' - '; |
my $title; my $url; |
my $title; my $url; |
if ($args->{'firstres'} eq 'syl') { |
if ($args->{'firstres'} eq 'syl') { |
Line 5861 sub construct_course {
|
Line 5864 sub construct_course {
|
$title='Navigate Contents'; |
$title='Navigate Contents'; |
$url='/adm/navmaps'; |
$url='/adm/navmaps'; |
} |
} |
$Apache::lonratedt::resources[1]=$title.':'.$url.':false:start:res'; |
|
($errtext,$fatal)= |
$LONCAPA::map::resources[1]=$title.':'.$url.':false:start:res'; |
&Apache::londocs::storemap($$crsunum,$$crsudom,'default.sequence'); |
(my $outtext,$errtext) = &LONCAPA::map::storemap($map,1); |
$outcome .= ($fatal?$errtext:'write ok').'<br>'; |
|
|
if ($errtext) { $fatal=2; } |
|
$outcome .= ($fatal?$errtext:'write ok').'<br />'; |
} |
} |
return $outcome; |
return $outcome; |
} |
} |
Line 5916 sub lonhttpdurl {
|
Line 5921 sub lonhttpdurl {
|
return 'http://'.$ENV{'SERVER_NAME'}.':'.$lonhttpd_port.$url; |
return 'http://'.$ENV{'SERVER_NAME'}.':'.$lonhttpd_port.$url; |
} |
} |
|
|
|
sub absolute_url { |
|
my ($host_name) = @_; |
|
my $protocol = ($ENV{'SERVER_PORT'} == 443?'https://':'http://'); |
|
if ($host_name eq '') { |
|
$host_name = $ENV{'SERVER_NAME'}; |
|
} |
|
return $protocol.$host_name; |
|
} |
|
|
sub connection_aborted { |
sub connection_aborted { |
my ($r)=@_; |
my ($r)=@_; |
$r->print(" ");$r->rflush(); |
$r->print(" ");$r->rflush(); |