--- loncom/interface/lonmeta.pm 2003/12/29 21:17:00 1.48 +++ loncom/interface/lonmeta.pm 2003/12/30 22:19:18 1.51 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.48 2003/12/29 21:17:00 www Exp $ +# $Id: lonmeta.pm,v 1.51 2003/12/30 22:19:18 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -37,6 +37,7 @@ use Apache::lonmsg; use Apache::lonpublisher; use Apache::lonlocal; use Apache::lonmysql; +use Apache::lonmsg; # MySQL table columns @@ -432,8 +433,8 @@ sub handler { # --------------------------------------------------------------- Render Output # displayed url my ($thisversion)=($uri=~/\.(\d+)\.(\w+)\.meta$/); + $uri=~s/\.meta$//; my $disuri=&Apache::lonnet::clutter($uri); - $disuri=~s/\.meta$//; $disuri=&Apache::lonhtmlcommon::crumbs($disuri); # version my $currentversion=&Apache::lonnet::getversion($disuri); @@ -525,22 +526,15 @@ ENDHEAD &prettyprint($dynmeta{$_})."\n"); } $r->print(''); - $disuri=~/^(\w+)\/(\w+)\//; + $uri=~/^\/res\/(\w+)\/(\w+)\//; if ((($ENV{'user.domain'} eq $1) && ($ENV{'user.name'} eq $2)) || ($ENV{'user.role.ca./'.$1.'/'.$2})) { - $r->print( - '

'.&mt('Evaluation Comments').' ('.&mt('visible to author and co-authors only').')

'. + $r->print('

'.&mt('Evaluation Comments').' ('. + &mt('visible to author and co-authors only').')

'. '
'.$dynmeta{'comments'}.'
'); - $r->print('

'.&mt('Error Messages').' ('. - &mt('visible to author and co-authors only').')

'); - my %errormsgs=&Apache::lonnet::dump('nohist_res_msgs',$1,$2); - foreach (keys %errormsgs) { - if ($_=~/^\Q$disuri\E\_\d+$/) { - my %content=&Apache::lonmsg::unpackagemsg($errormsgs{$_}); - $r->print(''.$content{'time'}.': '.$content{'message'}. - '
'); - } - } + $r->print('

'.&mt('Error Messages').' ('. + &mt('visible to author and co-authors only').')

'. + &Apache::lonmsg::retrieve_author_res_msg($uri)); } # ------------------------------------------------------------- All other stuff $r->print(