version 1.67, 2004/04/14 16:14:29
|
version 1.68, 2004/04/14 18:30:36
|
Line 541 $table
|
Line 541 $table
|
</table> |
</table> |
ENDHEAD |
ENDHEAD |
if ($ENV{'user.adv'}) { |
if ($ENV{'user.adv'}) { |
&print_dynamic_metadata($r,$uri); |
&print_dynamic_metadata($r,$uri,\%content); |
} |
} |
return; |
return; |
} |
} |
|
|
sub print_dynamic_metadata { |
sub print_dynamic_metadata { |
my ($r,$uri) = @_; |
my ($r,$uri,$content) = @_; |
|
# |
|
my %content = \$content; |
|
my %lt=&fieldnames(); |
# |
# |
my $description = 'Dynamic Metadata (updated periodically)'; |
my $description = 'Dynamic Metadata (updated periodically)'; |
$r->print('<h3>'.&mt($description).'</h3>'. |
$r->print('<h3>'.&mt($description).'</h3>'. |
Line 747 ENDEDIT
|
Line 750 ENDEDIT
|
return; |
return; |
} |
} |
|
|
############################################################## |
|
############################################################## |
|
# MySQL table columns |
|
|
|
my @columns; |
|
|
|
BEGIN { |
|
# Get columns of MySQL metadata table |
|
@columns=&Apache::lonmysql::col_order('metadata'); |
|
} |
|
|
|
# |
|
# Turn MySQL row into hash |
|
# This routine should be moved to lonmetadata |
|
# a more generic place since it has nothing to do with metadata |
|
sub metadata_col_to_hash { |
|
my @cols=@_; |
|
my %hash=(); |
|
for (my $i=0; $i<=$#columns; $i++) { |
|
$hash{$columns[$i]}=$cols[$i]; |
|
} |
|
return %hash; |
|
} |
|
|
|
|
|
1; |
1; |
__END__ |
__END__ |