version 1.57, 2004/04/12 21:11:45
|
version 1.61, 2005/03/09 18:22:19
|
Line 119 if (defined($oneuser)) {
|
Line 119 if (defined($oneuser)) {
|
## |
## |
## Use variables for table names so we can test this routine a little easier |
## Use variables for table names so we can test this routine a little easier |
my $oldname = 'metadata'; |
my $oldname = 'metadata'; |
my $newname = 'newmetadata'; |
my $newname = 'newmetadata'.$$; # append pid to have unique temporary table |
|
|
# |
# |
# Read loncapa_apache.conf and loncapa.conf |
# Read loncapa_apache.conf and loncapa.conf |
Line 142 if ($wwwid!=$<) {
|
Line 142 if ($wwwid!=$<) {
|
} |
} |
# |
# |
# Let people know we are running |
# Let people know we are running |
open(LOG,'>'.$perlvar{'lonDaemons'}.'/logs/searchcat.log'); |
open(LOG,'>>'.$perlvar{'lonDaemons'}.'/logs/searchcat.log'); |
&log(0,'==== Searchcat Run '.localtime()."===="); |
&log(0,'==== Searchcat Run '.localtime()."===="); |
|
|
|
|
Line 321 sub process_meta_file {
|
Line 321 sub process_meta_file {
|
my $ref=&metadata($filename); |
my $ref=&metadata($filename); |
# |
# |
# $url is the original file url, not the metadata file |
# $url is the original file url, not the metadata file |
my $url='/res/'.&declutter($filename); |
my $target = $filename; |
$url=~s/\.meta$//; |
$target =~ s/\.meta$//; |
|
my $url='/res/'.&declutter($target); |
&log(3," ".$url) if ($debug); |
&log(3," ".$url) if ($debug); |
# |
# |
# Ignore some files based on their metadata |
# Ignore some files based on their metadata |
Line 347 sub process_meta_file {
|
Line 348 sub process_meta_file {
|
&count_type($url); |
&count_type($url); |
} |
} |
# |
# |
|
if (! defined($ref->{'creationdate'}) || |
|
$ref->{'creationdate'} =~ /^\s*$/) { |
|
$ref->{'creationdate'} = (stat($target))[9]; |
|
} |
|
if (! defined($ref->{'lastrevisiondate'}) || |
|
$ref->{'lastrevisiondate'} =~ /^\s*$/) { |
|
$ref->{'lastrevisiondate'} = (stat($target))[9]; |
|
} |
$ref->{'creationdate'} = &sqltime($ref->{'creationdate'}); |
$ref->{'creationdate'} = &sqltime($ref->{'creationdate'}); |
$ref->{'lastrevisiondate'} = &sqltime($ref->{'lastrevisiondate'}); |
$ref->{'lastrevisiondate'} = &sqltime($ref->{'lastrevisiondate'}); |
my %Data = ( |
my %Data = ( |
Line 443 sub getfile {
|
Line 452 sub getfile {
|
######################################################## |
######################################################## |
######################################################## |
######################################################## |
## |
## |
## Dynamic metadata description |
## Dynamic metadata description (incomplete) |
|
## |
|
## For a full description of all fields, |
|
## see LONCAPA::lonmetadata |
## |
## |
## Field Type |
## Field Type |
##----------------------------------------------------------- |
##----------------------------------------------------------- |
## count integer |
## count integer |
## course integer |
## course integer |
## course_list comma seperated list of course ids |
## course_list comma separated list of course ids |
## avetries real |
## avetries real |
## avetries_list comma seperated list of real numbers |
## avetries_list comma separated list of real numbers |
## stdno real |
## stdno real |
## stdno_list comma seperated list of real numbers |
## stdno_list comma separated list of real numbers |
## usage integer |
## usage integer |
## usage_list comma seperated list of resources |
## usage_list comma separated list of resources |
## goto scalar |
## goto scalar |
## goto_list comma seperated list of resources |
## goto_list comma separated list of resources |
## comefrom scalar |
## comefrom scalar |
## comefrom_list comma seperated list of resources |
## comefrom_list comma separated list of resources |
## difficulty real |
## difficulty real |
## difficulty_list comma seperated list of real numbers |
## difficulty_list comma separated list of real numbers |
## sequsage scalar |
## sequsage scalar |
## sequsage_list comma seperated list of resources |
## sequsage_list comma separated list of resources |
## clear real |
## clear real |
## technical real |
## technical real |
## correct real |
## correct real |