[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 27 Nov 2002 16:39:38 -0000
albertel Wed Nov 27 11:39:38 2002 EDT
Modified files:
/loncom/homework grades.pm
Log:
- didn't send messages that were newly created
- always created a new message
- Fixes BUG#1008
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.61 loncom/homework/grades.pm:1.62
--- loncom/homework/grades.pm:1.61 Wed Nov 27 10:54:24 2002
+++ loncom/homework/grades.pm Wed Nov 27 11:39:37 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.61 2002/11/27 15:54:24 albertel Exp $
+# $Id: grades.pm,v 1.62 2002/11/27 16:39:37 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -352,7 +352,7 @@
'<input type="hidden" name="section" value="'.$getsec.'" />'."\n".
'<input type="hidden" name="submitonly" value="'.$submitonly.'" />'."\n".
'<input type="hidden" name="response" value="'.$ENV{'form.response'}.'" />'."\n".
- '<input type="hidden" name="handgrade" value="'.$ENV{'form.handgrade'}.'" /><br />'."\n".
+ '<input type="hidden" name="handgrade": #falue="'.$ENV{'form.handgrade'}.'" /><br />'."\n".
'<input type="hidden" name="showgrading" value="'.$ENV{'form.showgrading'}.'" /><br />'."\n".
'<input type="hidden" name="url" value="'.$url.'" />'."\n".
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n".
@@ -672,21 +672,21 @@
pWin.document.write("<tr bgcolor=\\"#ffffdd\\">");
pWin.document.write("<td>Subject</td>");
pWin.document.write("<td align=\\"center\\"><input name=\\"subchk\\" type=\\"checkbox\\"" +shwsel+"></td>");
- pWin.document.write("<td><input name=\\"msgsub\\" type=\\"text\\" value=\\""+msg+" \\"size=\\"60\\" maxlength=\\"80\\"></td></tr>");
+ pWin.document.write("<td><input name=\\"msgsub\\" type=\\"text\\" value=\\""+msg+"\\"size=\\"60\\" maxlength=\\"80\\"></td></tr>");
}
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><input name=\\"msg"+ctr+"\\" type=\\"text\\" value=\\""+msg+"\\" size=\\"60\\" maxlength=\\"80\\"></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><input name=\\"newmsg\\" type=\\"text\\" onchange=\\"javascript:this.form.newmsgchk.checked=true\\" value=\\""+newmsg+"\\" size=\\"60\\" maxlength=\\"80\\"></td></tr>");
}
function msgTail() {
@@ -1226,7 +1226,7 @@
my $includemsg = $ENV{'form.includemsg'.$ctr};
my ($subject,$message,$msgstatus) = ('','','');
- if ($includemsg =~ /savemsg|new$ctr/) {
+ if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) {
$subject = $ENV{'form.msgsub'} if ($includemsg =~ /^msgsub/);
my (@msgnum) = split(/,/,$includemsg);
foreach (@msgnum) {