version 1.12, 2012/07/21 20:18:37
|
version 1.14, 2013/05/10 15:57:36
|
Line 85 my @ids=&Apache::lonnet::current_machine
|
Line 85 my @ids=&Apache::lonnet::current_machine
|
$env{'allowed.bre'} = 'F'; |
$env{'allowed.bre'} = 'F'; |
|
|
foreach my $dom (@domains) { |
foreach my $dom (@domains) { |
|
$env{'user.domain'} = $dom; |
|
$env{'user.name'} = &Apache::lonnet::get_domainconfiguser($dom); |
my %courseshash; |
my %courseshash; |
my %currhash = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.',1,\@ids,'.'); |
my %currhash = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.',1,\@ids,'.'); |
my %lastaccess = &Apache::lonnet::courselastaccess($dom,undef,\@ids); |
my %lastaccess = &Apache::lonnet::courselastaccess($dom,undef,\@ids); |
Line 101 foreach my $dom (@domains) {
|
Line 103 foreach my $dom (@domains) {
|
} |
} |
} |
} |
} |
} |
|
delete($env{'user.name'}; |
|
delete($env{'user.domain'}); |
} |
} |
|
|
delete($env{'allowed.bre'}); |
delete($env{'allowed.bre'}); |
Line 242 sub recurse_courses {
|
Line 246 sub recurse_courses {
|
} |
} |
|
|
unless ($chome eq 'no_host') { |
unless ($chome eq 'no_host') { |
|
if (($lastaccess->{$cid} eq '') || |
|
($lastaccess->{$cid} > $twodaysago)) { |
|
my $contentchange; |
|
if ($courseinfo{'internal.created'} eq '') { |
|
$contentchange = &last_map_update($cnum,$cdom); |
|
} else { |
|
unless ($courseinfo{'internal.created'} > $lastaccess->{$cid}) { |
|
$contentchange = &last_map_update($cnum,$cdom); |
|
} |
|
} |
|
if (($contentchange) && ($contentchange > $courseinfo{'internal.contentchange'})) { |
|
$changes{'internal.contentchange'} = $contentchange; |
|
} |
|
} |
$courseshash->{$chome}{$cid} = { |
$courseshash->{$chome}{$cid} = { |
description => $courseinfo{'description'}, |
description => $courseinfo{'description'}, |
inst_code => $inst_code, |
inst_code => $inst_code, |
Line 489 sub read_paramdata {
|
Line 507 sub read_paramdata {
|
return $resourcedata; |
return $resourcedata; |
} |
} |
|
|
|
sub last_map_update { |
|
my ($cnum,$cdom) = @_; |
|
my $lastupdate = 0; |
|
my $path = &LONCAPA::propath($cdom,$cnum); |
|
if (-d "$path/userfiles") { |
|
if (opendir(my $dirh, "$path/userfiles")) { |
|
my @maps = grep(/^default_?\d*\.(?:sequence|page)$/,readdir($dirh)); |
|
foreach my $map (@maps) { |
|
my $mtime = (stat("$path/userfiles/$map"))[9]; |
|
if ($mtime > $lastupdate) { |
|
$lastupdate = $mtime; |
|
} |
|
} |
|
} |
|
} |
|
return $lastupdate; |
|
} |
|
|