");
}
function displaySavedMsg(ctr,msg,shwsel) {
pWin.document.write("
");
pWin.document.write("
"+ctr+"
");
pWin.document.write("
");
- pWin.document.write("
");
+ pWin.document.write("
");
}
function newMsg(newmsg,shwsel) {
pWin.document.write("
");
pWin.document.write("
New
");
pWin.document.write("
");
- pWin.document.write("
");
+ pWin.document.write("
");
}
function msgTail() {
@@ -1173,9 +1173,9 @@ sub get_last_submission {
for ($version=1;$version<=$returnhash{'version'};$version++) {
foreach (sort(split(/\:/,$returnhash{$version.':keys'}))) {
$lasthash{$_}=$returnhash{$version.':'.$_};
- if ($returnhash{$version.':'.$_} =~ /(SUBMITTED|DRAFT)$/) {
+# if ($returnhash{$version.':'.$_} =~ /(SUBMITTED|DRAFT)$/) {
$timestamp = scalar(localtime($returnhash{$version.':timestamp'}));
- }
+# }
}
}
foreach ((keys %lasthash)) {
@@ -1199,7 +1199,7 @@ sub keywords_highlight {
(my $styleoff = $styleon) =~ s/\\<\//;
my @keylist = split(/[,\s+]/,$ENV{'form.keywords'});
foreach (@keylist) {
- $string =~ s/\b$_(\b|\.)/\$styleon$_$styleoff\<\/font\>/gi;
+ $string =~ s/\b\Q$_\E(\b|\.)/\$styleon$_$styleoff\<\/font\>/gi;
}
# This is not really the right place to do this, but I cannot find a
# better one at this time. So here we go - the m in the s:::mg causes
@@ -1226,7 +1226,7 @@ sub processHandGrade {
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) {
@@ -1657,7 +1657,7 @@ sub viewgrades {
$weight{$partid}.' (problem weight)'."\n";
$result.= '