version 1.88, 2005/01/18 01:44:12
|
version 1.91, 2005/02/10 22:01:40
|
Line 236 sub diffgraph {
|
Line 236 sub diffgraph {
|
|
|
# The field names |
# The field names |
sub fieldnames { |
sub fieldnames { |
|
my $file_type=shift; |
|
if ($file_type eq 'portfolio') { |
|
return &Apache::lonlocal::texthash |
|
( |
|
'title' => 'Title', |
|
'author' =>'Author(s)', |
|
'authorspace' => 'Author Space', |
|
'modifyinguser' => 'Last Modifying User', |
|
'subject' => 'Subject', |
|
'keywords' => 'Keyword(s)', |
|
'notes' => 'Notes', |
|
'abstract' => 'Abstract', |
|
'lowestgradelevel' => 'Lowest Grade Level', |
|
'highestgradelevel' => 'Highest Grade Level'); |
|
} else { |
return &Apache::lonlocal::texthash |
return &Apache::lonlocal::texthash |
( |
( |
'title' => 'Title', |
'title' => 'Title', |
Line 280 sub fieldnames {
|
Line 295 sub fieldnames {
|
'disc' => 'Degree of discrimination', |
'disc' => 'Degree of discrimination', |
'dependencies' => 'Resources used by this resource', |
'dependencies' => 'Resources used by this resource', |
); |
); |
|
} |
} |
} |
|
|
# Pretty printing of metadata field |
# Pretty printing of metadata field |
Line 537 sub handler {
|
Line 553 sub handler {
|
$r->print(&Apache::loncommon::bodytag('Error Messages')); |
$r->print(&Apache::loncommon::bodytag('Error Messages')); |
# Looking for all bombs? |
# Looking for all bombs? |
&report_bombs($r,$uri); |
&report_bombs($r,$uri); |
|
} elsif ($uri=~/\/portfolio\//) { |
|
$r->print(&Apache::loncommon::bodytag |
|
('Edit Portfolio File Information','','','',$resdomain)); |
|
&present_editable_metadata($r,$uri,'portfolio'); |
|
|
} elsif ($uri=~/^\/\~/) { |
} elsif ($uri=~/^\/\~/) { |
# Construction space |
# Construction space |
$r->print(&Apache::loncommon::bodytag |
$r->print(&Apache::loncommon::bodytag |
Line 870 sub print_dynamic_metadata {
|
Line 891 sub print_dynamic_metadata {
|
##################################################### |
##################################################### |
##################################################### |
##################################################### |
sub present_editable_metadata { |
sub present_editable_metadata { |
my ($r,$uri) = @_; |
my ($r,$uri, $file_type) = @_; |
# Construction Space Call |
# Construction Space Call |
# Header |
# Header |
my $disuri=$uri; |
my $disuri=$uri; |
Line 915 ENDEDIT
|
Line 936 ENDEDIT
|
$r->print('<script language="JavaScript">'. |
$r->print('<script language="JavaScript">'. |
&Apache::loncommon::browser_and_searcher_javascript(). |
&Apache::loncommon::browser_and_searcher_javascript(). |
'</script>'); |
'</script>'); |
my %lt=&fieldnames(); |
my %lt=&fieldnames($file_type); |
my $output; |
my $output; |
foreach ('author','title','subject','keywords','abstract','notes', |
my @fields; |
|
if ($file_type eq 'portfolio') { |
|
@fields = ('author','title','subject','keywords','abstract','notes','lowestgradelevel', |
|
'highestgradelevel'); |
|
} else { |
|
@fields = ('author','title','subject','keywords','abstract','notes', |
'copyright','customdistributionfile','language', |
'copyright','customdistributionfile','language', |
'standards', |
'standards', |
'lowestgradelevel','highestgradelevel','sourceavail','sourcerights', |
'lowestgradelevel','highestgradelevel','sourceavail','sourcerights', |
'obsolete','obsoletereplacement') { |
'obsolete','obsoletereplacement'); |
|
} |
|
foreach (@fields) { |
if (defined($ENV{'form.new_'.$_})) { |
if (defined($ENV{'form.new_'.$_})) { |
$Apache::lonpublisher::metadatafields{$_}= |
$Apache::lonpublisher::metadatafields{$_}= |
$ENV{'form.new_'.$_}; |
$ENV{'form.new_'.$_}; |