version 1.142, 2005/12/22 03:39:36
|
version 1.145, 2006/01/06 21:04:33
|
Line 273 ENDENTERKEY
|
Line 273 ENDENTERKEY
|
# Send the user to the course they selected |
# Send the user to the course they selected |
} elsif ($env{'request.course.id'}) { |
} elsif ($env{'request.course.id'}) { |
if (&Apache::lonnet::allowed('whn', |
if (&Apache::lonnet::allowed('whn', |
$env{'request.course.id'})) { |
$env{'request.course.id'}) |
|
|| &Apache::lonnet::allowed('whn', |
|
$env{'request.course.id'}.'/' |
|
.$env{'request.course.sec'}) |
|
) { |
my $startpage = &courseloadpage($courseid); |
my $startpage = &courseloadpage($courseid); |
unless ($startpage eq 'firstres') { |
unless ($startpage eq 'firstres') { |
$msg = &mt('Entering course ....'); |
$msg = &mt('Entering course ....'); |
Line 531 ENDHEADER
|
Line 535 ENDHEADER
|
foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } } |
foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } } |
if (!$allowed) { |
if (!$allowed) { |
$button=0; |
$button=0; |
$switchserver=&Apache::lonnet::escape('http://'. |
$switchserver='otherserver='.$home.'&role='.$trolecode; |
$Apache::lonnet::hostname{$home}. |
|
'/adm/login?domain='.$env{'user.domain'}. |
|
'&username='.$env{'user.name'}. |
|
'&firsturl=/priv/'.$env{'user.name'}.'/'); |
|
} |
} |
#next if ($home eq 'no_host'); |
#next if ($home eq 'no_host'); |
$home = $Apache::lonnet::hostname{$home}; |
$home = $Apache::lonnet::hostname{$home}; |
Line 1033 sub set_privileges {
|
Line 1033 sub set_privileges {
|
sub courseloadpage { |
sub courseloadpage { |
my ($courseid) = @_; |
my ($courseid) = @_; |
my $startpage; |
my $startpage; |
my %entry_settings = |
my %entry_settings = &Apache::lonnet::get('nohist_whatsnew', |
&Apache::lonnet::dump('nohist_whatsnew',$env{'user.domain'}, |
[$courseid.':courseinit']); |
$env{'user.name'},$courseid.':courseinit'); |
|
my ($tmp) = %entry_settings; |
my ($tmp) = %entry_settings; |
unless ($tmp =~ /^Error/) { |
unless ($tmp =~ /^error: 2 /) { |
$startpage = $entry_settings{$courseid.':courseinit'}; |
$startpage = $entry_settings{$courseid.':courseinit'}; |
} |
} |
if ($startpage eq '') { |
if ($startpage eq '') { |