version 1.134, 2005/12/05 20:30:16
|
version 1.135, 2005/12/08 02:17:56
|
Line 603 sub prettyinput {
|
Line 603 sub prettyinput {
|
",'rights')\">".&mt('Select').'</a>'. |
",'rights')\">".&mt('Select').'</a>'. |
&relatedfield(0,$relatedsearchflag,$relatedsep); |
&relatedfield(0,$relatedsearchflag,$relatedsep); |
} |
} |
|
if ($type eq 'courserestricted') { |
|
return ('<input type="hidden" name="new_courserestricted" value="'.$course_key.'" />'); |
|
} |
|
|
# Dates |
# Dates |
if (($type eq 'creationdate') || |
if (($type eq 'creationdate') || |
($type eq 'lastrevisiondate')) { |
($type eq 'lastrevisiondate')) { |
Line 1097 ENDEDIT
|
Line 1101 ENDEDIT
|
'default'; |
'default'; |
} |
} |
if ($metacourse ne 'none') { |
if ($metacourse ne 'none') { |
$r->print('Document metadata restricted by :<strong> '.$env{$metacourse.".description"}."</strong><br />"); |
$r->print('Using: <strong> '.$env{$metacourse.".description"}."</strong> metadata framework<br />"); |
} |
} |
foreach my $field_name(@fields) { |
foreach my $field_name(@fields) { |
|
|
Line 1152 ENDEDIT
|
Line 1156 ENDEDIT
|
$Apache::lonpublisher::metadatakeys{$unikey}) |
$Apache::lonpublisher::metadatakeys{$unikey}) |
) { |
) { |
my $value= |
my $value= |
$Apache::lonpublisher::metadatafields{$unikey.'.'.$_}; |
$Apache::lonpublisher::metadatafields{$unikey.'.'.$_}; |
$value=~s/\"/\'\'/g; |
$value=~s/\"/\'\'/g; |
$file_content.=' '.$_.'="'.$value.'"' ; |
$file_content.=' '.$_.'="'.$value.'"' ; |
# print $mfh ' '.$_.'="'.$value.'"'; |
# print $mfh ' '.$_.'="'.$value.'"'; |
Line 1166 ENDEDIT
|
Line 1170 ENDEDIT
|
if ($fn =~ /\/portfolio\//) { |
if ($fn =~ /\/portfolio\//) { |
$fn =~ /\/portfolio\/(.*)$/; |
$fn =~ /\/portfolio\/(.*)$/; |
my $new_fn = '/'.$1; |
my $new_fn = '/'.$1; |
$env{'form.'.$formname}=$file_content; |
$env{'form.'.$formname}=$file_content."\n"; |
$env{'form.'.$formname.'.filename'}=$new_fn; |
$env{'form.'.$formname.'.filename'}=$new_fn; |
&Apache::lonnet::userfileupload('uploaddoc','', |
&Apache::lonnet::userfileupload('uploaddoc','', |
'portfolio'.$env{'form.currentpath'}); |
'portfolio'.$env{'form.currentpath'}); |
Line 1192 ENDEDIT
|
Line 1196 ENDEDIT
|
} |
} |
} |
} |
} |
} |
$r->print($output.'<br /><input type="submit" name="store" value="'. |
my $button_label; |
&mt('Store Catalog Information').'">'); |
if ($fn =~ /\/portfolio\//) { |
|
$button_label = 'Store Metadata'; |
|
} else { |
|
$button_label = 'Store Catalog Information'; |
|
} |
|
$r->print($output.'<br /><input type="submit" name="store" value="'. |
|
&mt($button_label).'">'); |
} |
} |
$r->print('</form>'); |
$r->print('</form>'); |
return; |
return; |