version 1.40, 2005/12/20 15:56:38
|
version 1.42, 2005/12/22 03:39:39
|
Line 62 sub handler {
|
Line 62 sub handler {
|
$r->send_http_header; |
$r->send_http_header; |
my $crsid = $env{'request.course.id'}; |
my $crsid = $env{'request.course.id'}; |
$crsid =~ s/_/\//; |
$crsid =~ s/_/\//; |
if ((!($env{'request.course.id'})) || |
if ((!($env{'request.course.fn'})) || |
($env{'request.role'} !~ /\Q$crsid\E$/)) { |
(!(&Apache::lonnet::allowed('whn', |
|
$env{'request.course.id'})))) { |
# Not in a course, or no role in course |
# Not in a course, or no role in course |
$env{'user.error.msg'}="/adm/whatsnew::0:0:Cannot display what's new screen"; |
$env{'user.error.msg'}="/adm/whatsnew::whn:0:0:Cannot display what's new page"; |
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |
|
|
Line 1401 sub get_display_settings {
|
Line 1402 sub get_display_settings {
|
my ($tmp) = keys(%settings); |
my ($tmp) = keys(%settings); |
if ($tmp=~ /^(con_lost|error|no_such_host)/i) { |
if ($tmp=~ /^(con_lost|error|no_such_host)/i) { |
%settings = (); |
%settings = (); |
unless ($tmp eq 'error: 2 tie(GDBM) Failed while attempting dump') { |
unless ($tmp =~ /^error: 2 /) { |
&logthis('Error retrieving whatsnew settings: '.$tmp.' for '. |
&Apache::lonnet::logthis('Error retrieving whatsnew settings: '. |
$uname.':'.$udom.' for course: '.$cid); |
$tmp.' for '.$uname.':'.$udom.' for course: '.$cid); |
} |
} |
} |
} |
return %settings; |
return %settings; |