version 1.12, 2012/07/21 20:18:37
|
version 1.13, 2012/07/21 21:20:25
|
Line 242 sub recurse_courses {
|
Line 242 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 503 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; |
|
} |
|
|