version 1.138, 2005/12/15 23:31:22
|
version 1.142, 2005/12/22 03:39:36
|
Line 51 sub redirect_user {
|
Line 51 sub redirect_user {
|
my $navwindow; |
my $navwindow; |
if ($launch_nav eq 'on') { |
if ($launch_nav eq 'on') { |
$navwindow.=&Apache::lonnavmaps::launch_win('now',undef,undef, |
$navwindow.=&Apache::lonnavmaps::launch_win('now',undef,undef, |
($url eq '/adm/whatsnew')); |
($url =~ m-^/adm/whatsnew-)); |
} else { |
} else { |
$navwindow.=&Apache::lonnavmaps::close(); |
$navwindow.=&Apache::lonnavmaps::close(); |
} |
} |
Line 271 ENDENTERKEY
|
Line 271 ENDENTERKEY
|
'.course.helper.not.run'}) { |
'.course.helper.not.run'}) { |
$furl = "/adm/helper/course.initialization.helper"; |
$furl = "/adm/helper/course.initialization.helper"; |
# Send the user to the course they selected |
# Send the user to the course they selected |
} elsif (($env{'request.course.fn'}) |
} elsif ($env{'request.course.id'}) { |
&& ($role eq 'cc' && ($env{'environment.course_init_display'} ne 'firstres'))) { |
if (&Apache::lonnet::allowed('whn', |
$msg = &mt('Entering course ....'); |
$env{'request.course.id'})) { |
&redirect_user($r,&mt('New in course'), |
my $startpage = &courseloadpage($courseid); |
'/adm/whatsnew',$msg, |
unless ($startpage eq 'firstres') { |
$env{'environment.remotenavmap'}); |
$msg = &mt('Entering course ....'); |
return OK; |
&redirect_user($r,&mt('New in course'), |
|
'/adm/whatsnew?refpage=start',$msg, |
|
$env{'environment.remotenavmap'}); |
|
return OK; |
|
} |
|
} |
} |
} |
&redirect_user($r,&mt('Entering Course'), |
&redirect_user($r,&mt('Entering Course'), |
$furl,$msg, |
$furl,$msg, |
Line 1025 sub set_privileges {
|
Line 1030 sub set_privileges {
|
&Apache::lonnet::appenv('request.role.adv' => $tadv); |
&Apache::lonnet::appenv('request.role.adv' => $tadv); |
} |
} |
|
|
|
sub courseloadpage { |
|
my ($courseid) = @_; |
|
my $startpage; |
|
my %entry_settings = |
|
&Apache::lonnet::dump('nohist_whatsnew',$env{'user.domain'}, |
|
$env{'user.name'},$courseid.':courseinit'); |
|
my ($tmp) = %entry_settings; |
|
unless ($tmp =~ /^Error/) { |
|
$startpage = $entry_settings{$courseid.':courseinit'}; |
|
} |
|
if ($startpage eq '') { |
|
if (exists($env{'environment.course_init_display'})) { |
|
$startpage = $env{'environment.course_init_display'}; |
|
} |
|
} |
|
return $startpage; |
|
} |
|
|
1; |
1; |
__END__ |
__END__ |
|
|