--- loncom/interface/lonmeta.pm 2004/04/14 16:14:29 1.67
+++ loncom/interface/lonmeta.pm 2004/04/14 18:56:36 1.69
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.67 2004/04/14 16:14:29 matthew Exp $
+# $Id: lonmeta.pm,v 1.69 2004/04/14 18:56:36 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -541,13 +541,16 @@ $table
ENDHEAD
if ($ENV{'user.adv'}) {
- &print_dynamic_metadata($r,$uri);
+ &print_dynamic_metadata($r,$uri,\%content);
}
return;
}
sub print_dynamic_metadata {
- my ($r,$uri) = @_;
+ my ($r,$uri,$content) = @_;
+ #
+ my %content = %$content;
+ my %lt=&fieldnames();
#
my $description = 'Dynamic Metadata (updated periodically)';
$r->print('
'.&mt($description).'
'.
@@ -569,6 +572,8 @@ sub print_dynamic_metadata {
&prettyprint($_,$dynmeta{$_})."\n");
}
$r->print('');
+ #
+ # Assessment statistics
if ($uri=~/\.(problem|exam|quiz|assess|survey|form)$/) {
# This is an assessment, print assessment data
$r->print(
@@ -602,6 +607,7 @@ sub print_dynamic_metadata {
''.
&Apache::lonmsg::retrieve_author_res_msg($uri));
}
+ #
# All other stuff
$r->print(''.
&mt('Additional Metadata (non-standard, parameters, exports)').
@@ -747,30 +753,5 @@ ENDEDIT
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;
__END__