[LON-CAPA-cvs] cvs: loncom(version_0_6_1) /homework grades.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 17 Mar 2003 19:12:56 -0000


albertel		Mon Mar 17 14:12:56 2003 EDT

  Modified files:              (Branch: version_0_6_1)
    /loncom/homework	grades.pm 
  Log:
  - backport change from 1.72 that allows multiline comments to students
  - backport 1.73 change to allow messages to contain newlines
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.66 loncom/homework/grades.pm:1.66.2.1
--- loncom/homework/grades.pm:1.66	Thu Jan  9 16:33:07 2003
+++ loncom/homework/grades.pm	Mon Mar 17 14:12:56 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.66 2003/01/09 21:33:07 albertel Exp $
+# $Id: grades.pm,v 1.66.2.1 2003/03/17 19:12:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -675,18 +675,18 @@
     pWin.document.write("<td><input name=\\"msgsub\\" type=\\"text\\" value=\\""+msg+"\\"size=\\"60\\" maxlength=\\"80\\"></td></tr>");
 }
 
-function displaySavedMsg(ctr,msg,shwsel) {
+  function displaySavedMsg(ctr,msg,shwsel) {
     pWin.document.write("<tr bgcolor=\\"#ffffdd\\">");
     pWin.document.write("<td align=\\"center\\">"+ctr+"</td>");
     pWin.document.write("<td align=\\"center\\"><input name=\\"msgn"+ctr+"\\" type=\\"checkbox\\"" +shwsel+"></td>");
-    pWin.document.write("<td><input name=\\"msg"+ctr+"\\" type=\\"text\\" value=\\""+msg+"\\" size=\\"60\\" maxlength=\\"80\\"></td></tr>");
+    pWin.document.write("<td><textarea name=\\"msg"+ctr+"\\" cols=\\"60\\" rows=\\"3\\">"+msg+"</textarea></td></tr>");
 }
 
   function newMsg(newmsg,shwsel) {
     pWin.document.write("<tr bgcolor=\\"#ffffdd\\">");
     pWin.document.write("<td align=\\"center\\">New</td>");
     pWin.document.write("<td align=\\"center\\"><input name=\\"newmsgchk\\" type=\\"checkbox\\"" +shwsel+"></td>");
-    pWin.document.write("<td><input name=\\"newmsg\\" type=\\"text\\" onchange=\\"javascript:this.form.newmsgchk.checked=true\\" value=\\""+newmsg+"\\" size=\\"60\\" maxlength=\\"80\\"></td></tr>");
+    pWin.document.write("<td><textarea name=\\"newmsg\\" cols=\\"60\\" rows=\\"3\\" onchange=\\"javascript:this.form.newmsgchk.checked=true\\" >"+newmsg+"</textarea></td></tr>");
 }
 
   function msgTail() {
@@ -1232,7 +1232,7 @@
 		foreach (@msgnum) {
 		    $message.=$ENV{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne '');
 		}
-		$message =~ s/\s+/ /g;
+		#$message =~ s/\s+/ /g;
 		$msgstatus = &Apache::lonmsg::user_normal_msg ($uname,$udom,
 							       $ENV{'form.msgsub'},$message);
 	    }