--- loncom/interface/lonmeta.pm 2009/01/15 18:31:11 1.224
+++ loncom/interface/lonmeta.pm 2009/04/04 20:06:37 1.229
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.224 2009/01/15 18:31:11 bisitz Exp $
+# $Id: lonmeta.pm,v 1.229 2009/04/04 20:06:37 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -432,7 +432,7 @@ sub prettyprint {
}
# Title
if ($type eq 'title') {
- return ''.$value.'';
+ return $value;
}
# Dates
if (($type eq 'creationdate') ||
@@ -482,7 +482,7 @@ sub prettyprint {
($type eq 'comefrom_list') ||
($type eq 'sequsage_list') ||
($type eq 'dependencies')) {
- return ''.join("\n",map {
+ return '
';
+ } split(/\s*\,\s*/,$value)).'';
}
# Evaluations
if (($type eq 'clear') ||
@@ -519,7 +519,7 @@ sub prettyprint {
# List of courses
if ($type=~/\_list/) {
my @Courses = split(/\s*\,\s*/,$value);
- my $Str=''.join("\n",map {
my $url = &Apache::lonnet::clutter_with_no_wrapper($_);
my $title = &Apache::lonnet::gettitle($url);
if ($title eq '') {
@@ -500,9 +500,9 @@ sub prettyprint {
}
}
$_ = '
';
+ my $Str='
';
+ return $Str.'';
}
# No pretty print found
return $value;
@@ -558,7 +558,7 @@ sub selectbox {
foreach my $id (@idlist) {
$selout.='';
+ $selout.=' selected="selected">'.&{$functionref}($id).'';
} else {
$selout.='>'.&{$functionref}($id).'';
}
@@ -578,7 +578,7 @@ sub relatedfield {
return $relatedsep.' ';
}
return $relatedsep.'';
+ ($relatedvalue?' checked="checked"':'').' />';
}
sub prettyinput {
@@ -691,7 +691,7 @@ sub prettyinput {
# Obsolete
if ($type eq 'obsolete') {
return ''.
+ ($value?' checked="checked"':'').' />'.
&relatedfield(0,$relatedsearchflag,$relatedsep);
}
# Obsolete replacement file
@@ -762,7 +762,7 @@ sub handler {
} elsif ($uri=~m|^/editupload/[^/]+/[^/]+/portfolio/|) {
($resdomain,$resuser)=
(&Apache::lonnet::declutter($uri)=~m|^($match_domain)/($match_name)/portfolio|);
- $r->print(&Apache::loncommon::start_page('Edit Portfolio File Catalog Information',
+ $r->print(&Apache::loncommon::start_page('Edit Portfolio File Metadata',
undef,
{'domain' => $resdomain,}));
if ($env{'form.store'}) {
@@ -781,13 +781,13 @@ sub handler {
}
}
} elsif ($uri=~m|^/editupload/[^/]+/[^/]+/groups/|) {
- $r->print(&Apache::loncommon::start_page('Edit Group Portfolio File Catalog Information',
+ $r->print(&Apache::loncommon::start_page('Edit Group Portfolio File Metadata',
undef,
{'domain' => $resdomain,}));
&present_editable_metadata($r,$uri,'groups');
} elsif ($uri=~m|^/~|) {
# Construction space
- $r->print(&Apache::loncommon::start_page('Edit Catalog Information',
+ $r->print(&Apache::loncommon::start_page('Edit Metadata',
"\n".'',
@@ -1467,26 +1467,26 @@ sub store_metadata {
$output .= $result;
} else {
if (! ($mfh=Apache::File->new('>'.$fn))) {
- $output .= '';
my %descriptions;
foreach my $course (@Courses) {
my %courseinfo =
@@ -538,7 +538,7 @@ sub prettyprint {
$Str .= $descriptions{$course};
}
- return $Str.'
';
+ $output .= ' ';
if ($caller eq 'transfer') {
$output .= &mt('Could not transfer data in added fields to notes');
} else {
$output .= &mt('Could not write metadata');
}
- $output .= ', '.&mt('FAIL').'
';
+ $output .= ' ';
if ($caller eq 'transfer') {
$output .= &mt('Transferred data in added fields to notes');
} else {
$output .= &mt('Wrote Metadata');
}
$output .= ' '.&Apache::lonlocal::locallocaltime(time).
- '
';
+ $output = ' ';
if ($caller eq 'transfer') {
$output .=
&mt('Could not transfer data in added fields to notes');
} else {
$output .= &mt('Could not write metadata');
}
- $output .= ', '.&mt('FAIL').'
';
+ $output = ' ';
if ($caller eq 'transfer') {
$output .= &mt('Transferred data in added fields to notes');
} else {
$output .= &mt('Wrote Metadata');
}
$output .= ' '.&Apache::lonlocal::locallocaltime(time).
- '