version 1.280, 2005/08/29 10:06:07
|
version 1.281, 2005/08/30 14:52:51
|
Line 2656 sub viewgrades {
|
Line 2656 sub viewgrades {
|
sub viewstudentgrade { |
sub viewstudentgrade { |
my ($url,$symb,$courseid,$student,$fullname,$parts,$weight,$ctr,$last_resets) = @_; |
my ($url,$symb,$courseid,$student,$fullname,$parts,$weight,$ctr,$last_resets) = @_; |
my ($uname,$udom) = split(/:/,$student); |
my ($uname,$udom) = split(/:/,$student); |
$student=~s/:/_/; |
|
my %record=&Apache::lonnet::restore($symb,$courseid,$udom,$uname); |
my %record=&Apache::lonnet::restore($symb,$courseid,$udom,$uname); |
my %aggregates = (); |
my %aggregates = (); |
my $result='<tr bgcolor="#ffffdd"><td align="right">'. |
my $result='<tr bgcolor="#ffffdd"><td align="right">'. |
Line 2665 sub viewstudentgrade {
|
Line 2664 sub viewstudentgrade {
|
'<a href="javascript:viewOneStudent(\''.$uname.'\',\''.$udom. |
'<a href="javascript:viewOneStudent(\''.$uname.'\',\''.$udom. |
'\')"; TARGET=_self>'.$fullname.'</a> '. |
'\')"; TARGET=_self>'.$fullname.'</a> '. |
'<font color="#999999">('.$uname.($env{'user.domain'} eq $udom ? '' : ':'.$udom).')</font></td>'."\n"; |
'<font color="#999999">('.$uname.($env{'user.domain'} eq $udom ? '' : ':'.$udom).')</font></td>'."\n"; |
|
$student=~s/:/_/; # colon doen't work in javascript for names |
foreach my $apart (@$parts) { |
foreach my $apart (@$parts) { |
my ($part,$type) = &split_part_type($apart); |
my ($part,$type) = &split_part_type($apart); |
my $score=$record{"resource.$part.$type"}; |
my $score=$record{"resource.$part.$type"}; |
Line 2786 sub editgrades {
|
Line 2786 sub editgrades {
|
for ($i=0; $i<$env{'form.total'}; $i++) { |
for ($i=0; $i<$env{'form.total'}; $i++) { |
my $line; |
my $line; |
my $user = $env{'form.ctr'.$i}; |
my $user = $env{'form.ctr'.$i}; |
my $usercolon = $user; |
my ($uname,$udom)=split(/:/,$user); |
$usercolon =~s/_/:/; |
|
my ($uname,$udom)=split(/_/,$user); |
|
my %newrecord; |
my %newrecord; |
my $updateflag = 0; |
my $updateflag = 0; |
$line .= '<td>'.&nameUserString(undef,$$fullname{$usercolon},$uname,$udom).'</td>'; |
$line .= '<td>'.&nameUserString(undef,$$fullname{$user},$uname,$udom).'</td>'; |
my $usec=$classlist->{"$uname:$udom"}[5]; |
my $usec=$classlist->{"$uname:$udom"}[5]; |
if (!&canmodify($usec)) { |
if (!&canmodify($usec)) { |
my $numcols=scalar(@partid)*4+2; |
my $numcols=scalar(@partid)*4+2; |
Line 2800 sub editgrades {
|
Line 2798 sub editgrades {
|
} |
} |
my %aggregate = (); |
my %aggregate = (); |
my $aggregateflag = 0; |
my $aggregateflag = 0; |
|
$user=~s/:/_/; # colon doen't work in javascript for names |
foreach (@partid) { |
foreach (@partid) { |
my $old_aw = $env{'form.GD_'.$user.'_'.$_.'_awarded_s'}; |
my $old_aw = $env{'form.GD_'.$user.'_'.$_.'_awarded_s'}; |
my $old_part_pcr = $old_aw/($weight{$_} ne '0' ? $weight{$_}:1); |
my $old_part_pcr = $old_aw/($weight{$_} ne '0' ? $weight{$_}:1); |