--- loncom/homework/grades.pm 2005/08/29 10:06:07 1.280
+++ loncom/homework/grades.pm 2005/08/30 14:52:51 1.281
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.280 2005/08/29 10:06:07 foxr Exp $
+# $Id: grades.pm,v 1.281 2005/08/30 14:52:51 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2656,7 +2656,6 @@ sub viewgrades {
sub viewstudentgrade {
my ($url,$symb,$courseid,$student,$fullname,$parts,$weight,$ctr,$last_resets) = @_;
my ($uname,$udom) = split(/:/,$student);
- $student=~s/:/_/;
my %record=&Apache::lonnet::restore($symb,$courseid,$udom,$uname);
my %aggregates = ();
my $result='
'.
@@ -2665,6 +2664,7 @@ sub viewstudentgrade {
''.$fullname.' '.
'('.$uname.($env{'user.domain'} eq $udom ? '' : ':'.$udom).') | '."\n";
+ $student=~s/:/_/; # colon doen't work in javascript for names
foreach my $apart (@$parts) {
my ($part,$type) = &split_part_type($apart);
my $score=$record{"resource.$part.$type"};
@@ -2786,12 +2786,10 @@ sub editgrades {
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 ($uname,$udom)=split(/:/,$user);
my %newrecord;
my $updateflag = 0;
- $line .= ''.&nameUserString(undef,$$fullname{$usercolon},$uname,$udom).' | ';
+ $line .= ''.&nameUserString(undef,$$fullname{$user},$uname,$udom).' | ';
my $usec=$classlist->{"$uname:$udom"}[5];
if (!&canmodify($usec)) {
my $numcols=scalar(@partid)*4+2;
@@ -2800,6 +2798,7 @@ sub editgrades {
}
my %aggregate = ();
my $aggregateflag = 0;
+ $user=~s/:/_/; # colon doen't work in javascript for names
foreach (@partid) {
my $old_aw = $env{'form.GD_'.$user.'_'.$_.'_awarded_s'};
my $old_part_pcr = $old_aw/($weight{$_} ne '0' ? $weight{$_}:1);