--- loncom/homework/grades.pm 2002/11/10 15:44:38 1.58
+++ loncom/homework/grades.pm 2003/01/24 20:40:37 1.67
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.58 2002/11/10 15:44:38 albertel Exp $
+# $Id: grades.pm,v 1.67 2003/01/24 20:40:37 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -672,21 +672,21 @@ sub sub_page_js {
pWin.document.write("
");
pWin.document.write("
Subject
");
pWin.document.write("
");
- pWin.document.write("
");
+ pWin.document.write("
");
}
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() {
@@ -846,7 +846,7 @@ sub submission {
# option to display problem, only once else it cause problems
# with the form later since the problem has a form.
- if ($ENV{'form.vProb'} eq 'yes') {
+ if ($ENV{'form.vProb'} eq 'yes' or !$ENV{'form.vProb'}) {
&show_problem($request,$symb,$uname,$udom,0);
}
@@ -1021,7 +1021,12 @@ KEYWORDS
my ($ressub,$subval) = split(/:/,$_,2);
$lastsubonly.='
Part '.
$partid.' ( ID '.$respid.
- ' ) Answer: '.
+ ' ) '.
+ ($record{"resource.$partid.$respid.uploadedurl"}?
+ ' File uploaded by student Like all files provided by users, this file may contain virusses ':'').
+ 'Answer: '.
&keywords_highlight($subval).'
'."\n"
if ($ENV{'form.lastSub'} eq 'lastonly' ||
($ENV{'form.lastSub'} eq 'hdgrade' &&
@@ -1173,9 +1178,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 +1204,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 +1231,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 +1662,7 @@ sub viewgrades {
$weight{$partid}.' (problem weight)'."\n";
$result.= '