'."\n";
$result.= ''.
- 'Username | Fullname | '."\n";
+ 'Username | Domain | Fullname | '."\n";
my %scoreptr = (
'correct' =>'correct_by_override',
@@ -1966,16 +2007,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 $usercolon = $user;
+ $usercolon =~s/_/:/;
+ my ($uname,$udom)=split(/_/,$user);
my %newrecord;
my $updateflag = 0;
- my @userdom = grep /^$user:/,keys %$classlist;
- my (undef,$udom) = split(/:/,$userdom[0]);
- $result .= ''.$user.' | '.
- $$fullname{$userdom[0]}.' | ';
+ $line .= ' '.$uname.' | '.
+ $udom.' | '.
+ $$fullname{$usercolon}.' | ';
foreach (@partid) {
my $old_aw = $ENV{'form.GD_'.$user.'_'.$_.'_awarded_s'};
my $old_part_pcr = $old_aw/($weight{$_} ne '0' ? $weight{$_}:1);
@@ -1995,7 +2039,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 : '').' | ';
@@ -2018,17 +2062,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,$user);
+ $udom,$uname);
+ $result.=$line;
+ } else {
+ $noupdate.=$line;
}
}
+ if ($noupdate) {
+ $result .= 'No Changes Occured For the Students Below | '.$noupdate;
+ }
$result .= '
|