version 1.325, 2005/04/15 21:28:54
|
version 1.327, 2005/04/16 15:33:14
|
Line 2112 sub generate_course_user_opt {
|
Line 2112 sub generate_course_user_opt {
|
|
|
my $uname=$env{'user.name'}; |
my $uname=$env{'user.name'}; |
my $udom=$env{'user.domain'}; |
my $udom=$env{'user.domain'}; |
my $uhome=$env{'user.home'}; |
|
my $cid=$env{'request.course.id'}; |
my $cid=$env{'request.course.id'}; |
my ($cdom,$cnum)=split(/\_/,$cid); |
my $cdom=$env{'course.'.$cid.'.domain'}; |
|
my $cnum=$env{'course.'.$cid.'.num'}; |
|
|
my %useropt; my %courseopt; |
|
unless ($uhome eq 'no_host') { |
|
# ------------------------------------------------- Get coursedata (if present) |
# ------------------------------------------------- Get coursedata (if present) |
%courseopt=&Apache::lonnet::dump('resourcedata',$cdom,$cnum); |
my $courseopt=&Apache::lonnet::get_courseresdata($cnum,$cdom); |
# Check for network failure |
# Check for network failure |
my ($tmp)=keys(%courseopt); |
if (!ref($courseopt)) { |
|
if ( $courseopt =~ /no.such.host/i || $courseopt =~ /con_lost/i) { |
if ( $tmp =~ /no.such.host/i || $tmp =~ /con_lost/i) { |
|
$self->{NETWORK_FAILURE} = 1; |
$self->{NETWORK_FAILURE} = 1; |
undef(%courseopt); |
|
} elsif ($tmp=~/^error\:/) { |
|
undef(%courseopt); |
|
} |
} |
|
undef($courseopt); |
|
} |
|
|
# --------------------------------------------------- Get userdata (if present) |
# --------------------------------------------------- Get userdata (if present) |
|
|
%useropt=&Apache::lonnet::dump('resourcedata',$udom,$uname); |
my $useropt=&Apache::lonnet::get_userresdata($uname,$udom); |
($tmp)=keys(%courseopt); |
# Check for network failure |
if ($tmp=~/^error\:/) { |
if (!ref($useropt)) { |
undef(%useropt); |
if ( $useropt =~ /no.such.host/i || $useropt =~ /con_lost/i) { |
} elsif ( $tmp=~/no.such.host/i || $tmp=~/con.lost/i ) { |
|
# check to see if network failed |
|
$self->{NETWORK_FAILURE} = 1; |
$self->{NETWORK_FAILURE} = 1; |
undef(%useropt); |
|
} |
} |
$self->{COURSE_OPT} = \%courseopt; |
undef($useropt); |
$self->{USER_OPT} = \%useropt; |
|
} |
} |
|
|
|
$self->{COURSE_OPT} = $courseopt; |
|
$self->{USER_OPT} = $useropt; |
|
|
$self->{COURSE_USER_OPT_GENERATED} = 1; |
$self->{COURSE_USER_OPT_GENERATED} = 1; |
|
|
return; |
return; |
Line 2156 sub generate_email_discuss_status {
|
Line 2151 sub generate_email_discuss_status {
|
if ($self->{EMAIL_DISCUSS_GENERATED}) { return; } |
if ($self->{EMAIL_DISCUSS_GENERATED}) { return; } |
|
|
my $cid=$env{'request.course.id'}; |
my $cid=$env{'request.course.id'}; |
my ($cdom,$cnum)=split(/\_/,$cid); |
my $cdom=$env{'course.'.$cid.'.domain'}; |
|
my $cnum=$env{'course.'.$cid.'.num'}; |
|
|
my %emailstatus = &Apache::lonnet::dump('email_status'); |
my %emailstatus = &Apache::lonnet::dump('email_status'); |
my $logoutTime = $emailstatus{'logout'}; |
my $logoutTime = $emailstatus{'logout'}; |