version 1.31, 2003/04/15 00:53:04
|
version 1.34, 2003/09/09 18:46:28
|
Line 70 sub dynamicmeta {
|
Line 70 sub dynamicmeta {
|
'usage' => 'cnt' |
'usage' => 'cnt' |
); |
); |
foreach (keys %evaldata) { |
foreach (keys %evaldata) { |
my ($item,$purl,$cat)=split(/\_\_\_/,$_); |
my ($item,$purl,$cat)=&Apache::lonnet::decode_symb($_); |
### print "\n".$_.' - '.$item.'<br />'; |
### print "\n".$_.' - '.$item.'<br />'; |
if (defined($cnt{$cat})) { $cnt{$cat}++; } else { $cnt{$cat}=1; } |
if (defined($cnt{$cat})) { $cnt{$cat}++; } else { $cnt{$cat}=1; } |
unless ($listitems{$cat} eq 'app') { |
unless ($listitems{$cat} eq 'app') { |
Line 290 ENDHEAD
|
Line 290 ENDHEAD
|
delete($content{'lastrevisiondate'}); |
delete($content{'lastrevisiondate'}); |
delete($content{'owner'}); |
delete($content{'owner'}); |
delete($content{'copyright'}); |
delete($content{'copyright'}); |
|
delete($content{'customdistributionfile'}); |
if ($ENV{'user.adv'}) { |
if ($ENV{'user.adv'}) { |
# ------------------------------------------------------------ Dynamic Metadata |
# ------------------------------------------------------------ Dynamic Metadata |
$r->print( |
$r->print( |
Line 382 $dynmeta{$_}." </td></tr>\n");
|
Line 383 $dynmeta{$_}." </td></tr>\n");
|
'<h3>Additional Metadata (non-standard, parameters, exports)</h3>'); |
'<h3>Additional Metadata (non-standard, parameters, exports)</h3>'); |
foreach (sort keys %content) { |
foreach (sort keys %content) { |
my $name=$_; |
my $name=$_; |
my $display=&Apache::lonnet::metadata($uri,$name.'.display'); |
unless ($name=~/\.display$/) { |
unless ($display) { $display=$name; }; |
my $display=&Apache::lonnet::metadata($uri,$name.'.display'); |
my $otherinfo=''; |
unless ($display) { $display=$name; }; |
foreach ('name','part','type','default') { |
my $otherinfo=''; |
if (defined(&Apache::lonnet::metadata($uri,$name.'.'.$_))) { |
foreach ('name','part','type','default') { |
$otherinfo.=' '.$_.'='. |
if (defined(&Apache::lonnet::metadata($uri,$name.'.'.$_))) { |
&Apache::lonnet::metadata($uri,$name.'.'.$_).'; '; |
$otherinfo.=' '.$_.'='. |
} |
&Apache::lonnet::metadata($uri,$name.'.'.$_).'; '; |
|
} |
|
} |
|
$r->print('<b>'.$display.':</b> '.$content{$name}); |
|
if ($otherinfo) { |
|
$r->print(' ('.$otherinfo.')'); |
|
} |
|
$r->print("<br>\n"); |
} |
} |
$r->print('<b>'.$display.':</b> '.$content{$name}); |
|
if ($otherinfo) { |
|
$r->print(' ('.$otherinfo.')'); |
|
} |
|
$r->print("<br>\n"); |
|
} |
} |
} |
} |
# ===================================================== End Resource Space Call |
# ===================================================== End Resource Space Call |
Line 434 ENDEDIT
|
Line 437 ENDEDIT
|
if ($ENV{'form.new_'.$_}) { |
if ($ENV{'form.new_'.$_}) { |
$Apache::lonpublisher::metadatafields{$_}=$ENV{'form.new_'.$_}; |
$Apache::lonpublisher::metadatafields{$_}=$ENV{'form.new_'.$_}; |
} |
} |
$r->print( |
if (m/copyright/) { |
&Apache::lonpublisher::textfield($_,'new_'.$_, |
$r->print(&Apache::lonpublisher::selectbox($_,'new_'.$_, |
$Apache::lonpublisher::metadatafields{$_})); |
$Apache::lonpublisher::metadatafields{$_}, |
|
\&Apache::loncommon::copyrightdescription, |
|
(&Apache::loncommon::copyrightids))); |
|
} elsif (m/language/) { |
|
$r->print(&Apache::lonpublisher::selectbox($_,'new_'.$_, |
|
$Apache::lonpublisher::metadatafields{$_}, |
|
\&Apache::loncommon::languagedescription, |
|
(&Apache::loncommon::languageids))); |
|
} else { |
|
$r->print(&Apache::lonpublisher::textfield($_,'new_'.$_, |
|
$Apache::lonpublisher::metadatafields{$_})); |
|
} |
} |
} |
if ($ENV{'form.store'}) { |
if ($ENV{'form.store'}) { |
my $mfh; |
my $mfh; |