--- loncom/homework/grades.pm 2003/05/16 19:00:23 1.89 +++ loncom/homework/grades.pm 2003/05/30 20:57:40 1.90 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.89 2003/05/16 19:00:23 albertel Exp $ +# $Id: grades.pm,v 1.90 2003/05/30 20:57:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1913,8 +1913,9 @@ sub viewgrades { my (undef,undef,$fullname) = &getclasslist($ENV{'form.section'},'1'); my $ctr = 0; foreach (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) { - my ($uname,$udom) = split(/:/); - $result.=''."\n"; + my $uname = $_; + $uname=~s/:/_/; + $result.=''."\n"; $result.=&viewstudentgrade($url,$symb,$ENV{'request.course.id'}, $_,$$fullname{$_},\@parts,\%weight); $ctr++; @@ -1931,6 +1932,7 @@ sub viewgrades { sub viewstudentgrade { my ($url,$symb,$courseid,$student,$fullname,$parts,$weight) = @_; my ($uname,$udom) = split(/:/,$student); + $student=~s/:/_/; my %record=&Apache::lonnet::restore($symb,$courseid,$udom,$uname); my $result=''. 'compTitle(); my $symbx = $curRes->symb(); $studentTable.=''.$question. @@ -2751,18 +2753,6 @@ sub displayPage { return ''; } -sub temp_parts_fix { #remove sub once lonnavmap is fixed - my $parts = shift; - my %seen = (); - my @correctParts = (); - foreach (@{$parts}) { - next if ($seen{$_} > 0); - $seen{$_}++; - push @correctParts,$_; - } - return \@correctParts; -} - sub updateGradeByPage { my ($request) = shift; @@ -2802,8 +2792,8 @@ sub updateGradeByPage { if($curRes == $iterator->END_MAP) { $depth++; } if (ref($curRes) && $curRes->is_problem() && !$curRes->randomout) { - my $parts = $curRes->parts(); - $parts = &temp_parts_fix($parts); # remove line when lonnavmap is fixed + my $parts = ['0',@{$curRes->parts()}]; + &APache::lonnet::logthis("parts ".join(':',@$parts)); my $title = $curRes->compTitle(); my $symbx = $curRes->symb(); $studentTable.=''.$question.