[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
harris41
lon-capa-cvs@mail.lon-capa.org
Mon, 11 Feb 2002 04:19:40 -0000
harris41 Sun Feb 10 23:19:40 2002 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
map to foreach
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.13 loncom/interface/lonmeta.pm:1.14
--- loncom/interface/lonmeta.pm:1.13 Tue Dec 25 16:02:35 2001
+++ loncom/interface/lonmeta.pm Sun Feb 10 23:19:40 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.13 2001/12/25 21:02:35 www Exp $
+# $Id: lonmeta.pm,v 1.14 2002/02/11 04:19:40 harris41 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -154,16 +154,16 @@
# ------------------------------------------------------------------- Read file
my $uri=$r->uri;
- map {
+ foreach (split(/\,/,&Apache::lonnet::metadata($uri,'keys'))) {
$content{$_}=&Apache::lonnet::metadata($uri,$_);
- } split(/\,/,&Apache::lonnet::metadata($uri,'keys'));
+ }
# ------------------------------------------------------------------ Hide stuff
unless ($ENV{'user.adv'}) {
- map {
+ foreach ('keywords','notes','abstract','subject') {
$content{$_}='<i>- not displayed -</i>';
- } ('keywords','notes','abstract','subject');
+ }
}
# --------------------------------------------------------------- Render Output
@@ -278,12 +278,12 @@
my $display=&Apache::lonnet::metadata($uri,$name.'.display');
unless ($display) { $display=$name; };
my $otherinfo='';
- map {
+ foreach ('name','part','type','default') {
if (defined(&Apache::lonnet::metadata($uri,$name.'.'.$_))) {
$otherinfo.=' '.$_.'='.
&Apache::lonnet::metadata($uri,$name.'.'.$_).'; ';
}
- } ('name','part','type','default');
+ }
$r->print('<b>'.$display.':</b> '.$content{$name});
if ($otherinfo) {
$r->print(' ('.$otherinfo.')');