--- loncom/homework/grades.pm 2003/05/30 21:20:20 1.91
+++ loncom/homework/grades.pm 2003/06/12 20:11:07 1.95
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.91 2003/05/30 21:20:20 albertel Exp $
+# $Id: grades.pm,v 1.95 2003/06/12 20:11:07 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2035,16 +2035,19 @@ sub editgrades {
$result .= '
';
$result .= $header;
$result .= '
'."\n";
-
+ my $noupdate;
for ($i=0; $i<$ENV{'form.total'}; $i++) {
+ my $line;
my $user = $ENV{'form.ctr'.$i};
- my ($uname,$udom)=split(/:/,$user);
+ my $usercolon = $user;
+ $usercolon =~s/_/:/;
+ my ($uname,$udom)=split(/_/,$user);
my %newrecord;
my $updateflag = 0;
- $result .= ''.$uname.' | '.
+ $line .= ' |
'.$uname.' | '.
$udom.' | '.
- $$fullname{$user}.' | ';
+ $$fullname{$usercolon}.' ';
foreach (@partid) {
my $old_aw = $ENV{'form.GD_'.$user.'_'.$_.'_awarded_s'};
my $old_part_pcr = $old_aw/($weight{$_} ne '0' ? $weight{$_}:1);
@@ -2064,7 +2067,7 @@ sub editgrades {
}
$score = 'excused' if (($ENV{'form.GD_'.$user.'_'.$_.'_solved'} eq 'excused') &&
($score ne 'excused'));
- $result .= ''.$old_aw.' | '.
+ $line .= ''.$old_aw.' | '.
''.$awarded.
($score eq 'excused' ? $score : '').' | ';
@@ -2087,17 +2090,23 @@ sub editgrades {
$newrecord{'resource.'.$part.'regrader'}="$ENV{'user.name'}:$ENV{'user.domain'}";
$updateflag=1;
}
- $result .= ''.$old_aw.' | '.
+ $line .= ''.$old_aw.' | '.
''.$awarded.' | ';
}
}
- $result .= '
'."\n";
+ $line.=''."\n";
if ($updateflag) {
$count++;
&Apache::lonnet::cstore(\%newrecord,$symb,$ENV{'request.course.id'},
$udom,$uname);
+ $result.=$line;
+ } else {
+ $noupdate.=$line;
}
}
+ if ($noupdate) {
+ $result .= 'No Changes Occured For the Students Below |
'.$noupdate;
+ }
$result .= ''."\n".
&show_grading_menu_form ($symb,$url);
my $msg = 'Number of records updated = '.$rec_update.
@@ -2581,14 +2590,14 @@ sub getSymbMap {
$mapiterator->next(); # skip the first BEGIN_MAP
my $mapcurRes = $mapiterator->next(); # for "current resource"
my $ctr=0;
- while ($mapdepth > 0 && $ctr < 100) {
+ while ($mapdepth > 0) {
if($mapcurRes == $mapiterator->BEGIN_MAP) { $mapdepth++; }
if($mapcurRes == $mapiterator->END_MAP) { $mapdepth++; }
if (ref($mapcurRes) && $mapcurRes->is_problem() && !$mapcurRes->randomout) {
$countProblems++;
}
- $ctr++;
+ $mapcurRes = $mapiterator->next();
}
if ($countProblems > 0) {
my $title = $curRes->compTitle();