--- loncom/homework/grades.pm 2003/04/30 20:16:02 1.88
+++ loncom/homework/grades.pm 2003/05/16 19:00:23 1.89
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.88 2003/04/30 20:16:02 www Exp $
+# $Id: grades.pm,v 1.89 2003/05/16 19:00:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1302,7 +1302,7 @@ KEYWORDS
my $lastone = pop @col_fullnames;
$msgfor .= ', '.(join ', ',@col_fullnames).' and '.$lastone.'.';
}
- $msgfor =~ s/\'/\\'/g; #\'
+ $msgfor =~ s/\'/\\'/g; #' stupid emacs
$result.='
'."\n".
' '.
@@ -1914,7 +1914,7 @@ sub viewgrades {
my $ctr = 0;
foreach (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
my ($uname,$udom) = split(/:/);
- $result.=''."\n";
+ $result.=''."\n";
$result.=&viewstudentgrade($url,$symb,$ENV{'request.course.id'},
$_,$$fullname{$_},\@parts,\%weight);
$ctr++;
@@ -1942,19 +1942,19 @@ sub viewstudentgrade {
if ($type eq 'awarded') {
my $pts = $score eq '' ? '' : $score*$$weight{$part};
$result.=''."\n";
+ 'GD_'.$student.'_'.$part.'_awarded_s" value="'.$pts.'" />'."\n";
$result.=' | | '."\n";
} elsif ($type eq 'solved') {
my ($status,$foo)=split(/_/,$score,2);
$status = 'nothing' if ($status eq '');
- $result.=''."\n";
$result.=' | \n";
} else {
$result.=''.
+ 'GD_'.$student.'_'.$part.'_'.$type.'_s" value="'.$score.'" />'.
"\n";
$result.=' | '."\n";
}
}
@@ -1985,7 +1985,7 @@ sub editgrades {
$title.='Section: '.$ENV{'form.section'}.''."\n";
my $result= ''."\n";
$result.= ''.
- 'Username | Fullname | '."\n";
+ 'Username | Domain | Fullname | '."\n";
my %scoreptr = (
'correct' =>'correct_by_override',
@@ -2036,13 +2036,13 @@ sub editgrades {
for ($i=0; $i<$ENV{'form.total'}; $i++) {
my $user = $ENV{'form.ctr'.$i};
+ 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]}.' | ';
+ $result .= ' '.$uname.' | '.
+ $udom.' | '.
+ $$fullname{$user}.' | ';
foreach (@partid) {
my $old_aw = $ENV{'form.GD_'.$user.'_'.$_.'_awarded_s'};
my $old_part_pcr = $old_aw/($weight{$_} ne '0' ? $weight{$_}:1);
@@ -2093,7 +2093,7 @@ sub editgrades {
if ($updateflag) {
$count++;
&Apache::lonnet::cstore(\%newrecord,$symb,$ENV{'request.course.id'},
- $udom,$user);
+ $udom,$uname);
}
}
$result .= '
|
'."\n".