--- loncom/interface/lonmeta.pm 2002/09/16 21:01:41 1.20 +++ loncom/interface/lonmeta.pm 2002/10/18 13:49:49 1.22 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.20 2002/09/16 21:01:41 www Exp $ +# $Id: lonmeta.pm,v 1.22 2002/10/18 13:49:49 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -179,13 +179,23 @@ sub handler { } # --------------------------------------------------------------- Render Output - -my $creationdate=localtime($content{'creationdate'}); -my $lastrevisiondate=localtime($content{'lastrevisiondate'}); + my ($thisversion)=($uri=~/\.(\d+)\.(\w+)\.meta/); +my $creationdate=localtime( + &Apache::loncommon::unsqltime($content{'creationdate'})); +my $lastrevisiondate=localtime( + &Apache::loncommon::unsqltime($content{'lastrevisiondate'})); my $language=&Apache::loncommon::languagedescription($content{'language'}); my $mime=&Apache::loncommon::filedescription($content{'mime'}); my $disuri=&Apache::lonnet::declutter($uri); $disuri=~s/\.meta$//; +my $currentversion=&Apache::lonnet::getversion($disuri); +my $versiondisplay=''; +if ($thisversion) { + $versiondisplay='Version: '.$thisversion. + ' (most recent version: '.$currentversion.')'; +} else { + $versiondisplay='Version: '.$currentversion; +} my $bodytag=&Apache::loncommon::bodytag ('Catalog Information','','','',$resdomain); $r->print(<$content{'title'}

$disuri

+$versiondisplay
Author(s) $content{'author'}