--- loncom/interface/lonmeta.pm 2000/11/27 23:10:59 1.4
+++ loncom/interface/lonmeta.pm 2001/08/10 17:20:19 1.7
@@ -6,7 +6,7 @@
#
# 05/29/00,05/30,10/11 Gerd Kortemeyer)
#
-# 10/19,10/21,10/23,11/27 Gerd Kortemeyer
+# 10/19,10/21,10/23,11/27,08/09/01 Gerd Kortemeyer
package Apache::lonmeta;
@@ -35,6 +35,14 @@ sub handler {
$content{$_}=&Apache::lonnet::metadata($uri,$_);
} split(/\,/,&Apache::lonnet::metadata($uri,'keys'));
+# ------------------------------------------------------------------ Hide stuff
+
+ unless ($ENV{'user.adv'}) {
+ map {
+ $content{$_}='- not displayed -';
+ } ('keywords','notes','abstract','subject');
+ }
+
# --------------------------------------------------------------- Render Output
my $creationdate=localtime($content{'creationdate'});
@@ -72,12 +80,25 @@ ENDHEAD
delete($content{'lastrevisiondate'});
delete($content{'owner'});
delete($content{'copyright'});
- map {
+ if ($ENV{'user.adv'}) {
+ map {
my $name=$_;
my $display=&Apache::lonnet::metadata($uri,$name.'.display');
- unless ($display) { $display=$name; };
- $r->print(''.$display.': '.$content{$name}.'
');
- } sort keys %content;
+ unless ($display) { $display=$name; };
+ my $otherinfo='';
+ map {
+ if (defined(&Apache::lonnet::metadata($uri,$name.'.'.$_))) {
+ $otherinfo.=' '.$_.'='.
+ &Apache::lonnet::metadata($uri,$name.'.'.$_).'; ';
+ }
+ } ('name','part','type','default');
+ $r->print(''.$display.': '.$content{$name});
+ if ($otherinfo) {
+ $r->print(' ('.$otherinfo.')');
+ }
+ $r->print("
\n");
+ } sort keys %content;
+ }
$r->print('