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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 30 Jun 2006 02:05:22 -0000


albertel		Thu Jun 29 22:05:22 2006 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - BUG# 4880, fix up the replying to critical messages so it doesn't look werid
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.35 loncom/interface/lonmsgdisplay.pm:1.36
--- loncom/interface/lonmsgdisplay.pm:1.35	Thu Jun 29 09:52:19 2006
+++ loncom/interface/lonmsgdisplay.pm	Thu Jun 29 22:05:22 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.35 2006/06/29 13:52:19 albertel Exp $
+# $Id: lonmsgdisplay.pm,v 1.36 2006/06/30 02:05:22 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -883,6 +883,9 @@
        my $studentsel = &discourse();
        $r->print($studentsel);
     }
+    if ($env{'form.displayedcrit'}) {
+	$r->print('<input type="hidden" name="displayedcrit" value="true" />');
+    }
     $r->print('</form>'.
 	      &Apache::lonfeedback::generate_preview_button('compemail','message').
 	      &Apache::lonhtmlcommon::htmlareaselectactive('message'));
@@ -1896,6 +1899,7 @@
 	&compout($r,'',$env{'form.replyto'},undef,undef,$folder,$dismode);
     } elsif ($env{'form.confirm'}) {
 	&printheader($r,'','Confirmed Receipt');
+	my $replying = 0;
 	foreach (keys %env) {
 	    if ($_=~/^form\.rec\_(.*)$/) {
 		$r->print('<b>'.&mt('Confirming Receipt').':</b> '.
@@ -1906,9 +1910,12 @@
 		$r->print('<b>'.&mt('Confirming Receipt').':</b> '.
 			  &Apache::lonmsg::user_crit_received($msgid).'<br>');
 		&compout($r,'','','',$msgid);
+		$replying = 1;
 	    }
 	}
-	&discrit($r);
+	if (!$replying) {
+	    &discrit($r);
+	}
     } elsif ($env{'form.critical'}) {
 	&printheader($r,'','Displaying Critical Messages');
 	&discrit($r);
@@ -2002,7 +2009,9 @@
 				      $env{'form.subject'},
 				      $env{'form.message'},'/adm/communicate','public');
 	}
-	&disall($r,($folder?$folder:$dismode));
+	if (!$env{'form.displayedcrit'}) {
+	    &disall($r,($folder?$folder:$dismode));
+	}
     } elsif ($env{'form.newfolder'}) {
 	&printheader($r,'','New Folder');
 	&makefolder($env{'form.newfolder'});