version 1.174, 2006/09/11 22:48:47
|
version 1.175, 2006/09/13 20:12:20
|
Line 744 sub handler {
|
Line 744 sub handler {
|
$r->print(&Apache::loncommon::start_page('Edit Group Portfolio File Catalog Information', |
$r->print(&Apache::loncommon::start_page('Edit Group Portfolio File Catalog Information', |
undef, |
undef, |
{'domain' => $resdomain,})); |
{'domain' => $resdomain,})); |
|
|
&present_editable_metadata($r,$uri,'groups'); |
&present_editable_metadata($r,$uri,'groups'); |
} elsif ($uri=~m|^/~|) { |
} elsif ($uri=~m|^/~|) { |
# Construction space |
# Construction space |
Line 1278 ENDEDIT
|
Line 1277 ENDEDIT
|
$Apache::lonpublisher::metadatafields{'keywords'} = |
$Apache::lonpublisher::metadatafields{'keywords'} = |
join (',', &Apache::loncommon::get_env_multiple('form.new_keywords')); |
join (',', &Apache::loncommon::get_env_multiple('form.new_keywords')); |
} |
} |
|
|
foreach my $field (sort keys %Apache::lonpublisher::metadatafields) { |
foreach my $field (sort keys %Apache::lonpublisher::metadatafields) { |
next if ($field =~ /\./); |
next if ($field =~ /\./); |
my $unikey=$field; |
my $unikey=$field; |
Line 1293 ENDEDIT
|
Line 1291 ENDEDIT
|
$Apache::lonpublisher::metadatafields{$unikey.'.'.$key}; |
$Apache::lonpublisher::metadatafields{$unikey.'.'.$key}; |
$value=~s/\"/\'\'/g; |
$value=~s/\"/\'\'/g; |
$file_content.=' '.$key.'="'.$value.'"' ; |
$file_content.=' '.$key.'="'.$value.'"' ; |
# print $mfh ' '.$key.'="'.$value.'"'; |
|
} |
} |
$file_content.= '>'. |
$file_content.= '>'. |
&HTML::Entities::encode |
&HTML::Entities::encode |
Line 1310 ENDEDIT
|
Line 1307 ENDEDIT
|
} |
} |
$r->print(&store_portfolio_metadata($formname,$file_content,$path, |
$r->print(&store_portfolio_metadata($formname,$file_content,$path, |
$new_fn)); |
$new_fn)); |
if (! $env{'form.associate'}) { |
|
$r->print(&Apache::portfolio::done("Return to Portfolio",'/adm/portfolio')); |
|
return; |
|
} |
|
} else { |
} else { |
if (! ($mfh=Apache::File->new('>'.$fn))) { |
if (! ($mfh=Apache::File->new('>'.$fn))) { |
$r->print('<p><font color="red">'. |
$r->print('<p><font color="red">'. |
Line 1325 ENDEDIT
|
Line 1318 ENDEDIT
|
' '.&Apache::lonlocal::locallocaltime(time). |
' '.&Apache::lonlocal::locallocaltime(time). |
'</font></p>'); |
'</font></p>'); |
} |
} |
if (! $env{'form.associate'}) { |
|
$r->print(&Apache::portfolio::done("Return to Portfolio",'/adm/portfolio')); |
|
return; |
|
} |
|
} |
} |
} |
} |
|
|
$r->print($output.'<br /><input type="submit" name="store" value="'. |
$r->print($output.'<br /><input type="submit" name="store" value="'. |
&mt('Store Catalog Information').'" />'); |
&mt('Store Catalog Information').'" />'); |
|
|
Line 1341 ENDEDIT
|
Line 1329 ENDEDIT
|
$r->print('<input type="hidden" name="group" value="'.$group.'" />'); |
$r->print('<input type="hidden" name="group" value="'.$group.'" />'); |
} |
} |
$r->print('<input type="hidden" name="currentpath" value="'.$env{'form.currentpath'}.'" />'); |
$r->print('<input type="hidden" name="currentpath" value="'.$env{'form.currentpath'}.'" />'); |
$r->print('</form> |
$r->print('</form><br /><br /><form method="post" action="'.$port_path.'">'); |
<br /><br /><form method="post" action="'.$port_path.'">'. |
if ($group) { |
'<input type="hidden" name="group" value="'.$group.'" />'. |
$r->print('<input type="hidden" name="group" value="'.$group.'" />'); |
'<input type="hidden" name="currentpath" value="'.$path.'" />'. |
} |
|
$r->print('<input type="hidden" name="currentpath" value="'.$path.'" />'. |
'<input type="submit" name="cancel" value="'.&mt('Discard Edits and Return to Portfolio').'" />'); |
'<input type="submit" name="cancel" value="'.&mt('Discard Edits and Return to Portfolio').'" />'); |
} |
} |
} |
} |