[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm lonmsg.pm

www lon-capa-cvs@mail.lon-capa.org
Tue, 30 Dec 2003 20:39:30 -0000


www		Tue Dec 30 15:39:30 2003 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm lonmsg.pm 
  Log:
  Work on Bug #2444: retrieval of bombs possible again.
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.49 loncom/interface/lonmeta.pm:1.50
--- loncom/interface/lonmeta.pm:1.49	Tue Dec 30 09:57:49 2003
+++ loncom/interface/lonmeta.pm	Tue Dec 30 15:39:30 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.49 2003/12/30 14:57:49 www Exp $
+# $Id: lonmeta.pm,v 1.50 2003/12/30 20:39:30 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -433,8 +433,8 @@
 # --------------------------------------------------------------- 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);
@@ -526,16 +526,15 @@
 		    &prettyprint($dynmeta{$_})."</td></tr>\n");
      }    
       $r->print('</table>');
-      $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(
-		    '<h4>'.&mt('Evaluation Comments').' ('.
+	  $r->print('<h4>'.&mt('Evaluation Comments').' ('.
 		    &mt('visible to author and co-authors only').')</h4>'.
 		    '<blockquote>'.$dynmeta{'comments'}.'</blockquote>');
 	  $r->print('<h4>'.&mt('Error Messages').' ('.
 		    &mt('visible to author and co-authors only').')</h4>'.
-		    &Apache::lonmsg::retrieve_author_res_msg($2,$1,$disuri));
+		    &Apache::lonmsg::retrieve_author_res_msg($2,$1,$uri));
       }
 # ------------------------------------------------------------- All other stuff
       $r->print(
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.73 loncom/interface/lonmsg.pm:1.74
--- loncom/interface/lonmsg.pm:1.73	Tue Dec 30 09:57:49 2003
+++ loncom/interface/lonmsg.pm	Tue Dec 30 15:39:30 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.73 2003/12/30 14:57:49 www Exp $
+# $Id: lonmsg.pm,v 1.74 2003/12/30 20:39:30 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -294,8 +294,9 @@
     foreach (keys %errormsgs) {
 	if ($_=~/^\Q$url\E\_\d+$/) {
 	    my %content=&unpackagemsg($errormsgs{$_});
-	    $msgs.='<b>'.$content{'time'}.'</b>: '.$content{'message'}.
-		      '<br />';
+	    $msgs.='<p><img src="/adm/lonMisc/bomb.gif" /><b>'.
+		$content{'time'}.'</b>: '.$content{'message'}.
+		'<br /></p>';
 	}
     } 
     return $msgs;