'."\n".
- '';
+ $result.= &Apache::loncommon::start_data_table();
#radio buttons/text box for assigning points for a section or class.
#handles different parts of a problem
my ($partlist,$handgrade,$responseType) = &response_type($symb);
my %weight = ();
my $ctsparts = 0;
- $result.='';
my %seen = ();
my @part_response_id = &flatten_responseType($responseType);
foreach my $part_response_id (@part_response_id) {
@@ -3188,12 +3190,14 @@ sub viewgrades {
my $wgt = &Apache::lonnet::EXT('resource.'.$partid.'.weight',$symb);
$weight{$partid} = $wgt eq '' ? '1' : $wgt;
+ $result.=&Apache::loncommon::start_data_table_row().'';
$result.=''."\n";
$result.=''."\n";
my $display_part=&get_display_part($partid,$symb);
- $result.=' | Part: '.$display_part.' Point: | ';
+ $result.=
+ 'Part: '.$display_part.' Point: | ';
$result.=''.' | '.' | '."\n".
+ $result.=&Apache::loncommon::end_data_table()."\n".
'';
$result.='';
+ 'onClick="javascript:resetEntry('.$ctsparts.');" />';
#table listing all the students in a section/class
#header of table
$result.= 'Assign Grade to Specific Students in '.$sectionClass;
- $result.= ''."\n".
- ' No. | '.
- ''.&nameUserString('header')." | \n";
+ $result.= &Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ 'No. | '.
+ ''.&nameUserString('header')." | \n";
my (@parts) = sort(&getpartlist($symb));
my (undef,undef,$url)=&Apache::lonnet::decode_symb($symb);
my @partids = ();
@@ -3239,16 +3244,16 @@ sub viewgrades {
push(@partids, $partid);
my $display_part=&get_display_part($partid,$symb);
if ($display =~ /^Partial Credit Factor/) {
- $result.='Score Part: '.$display_part.
- ' (weight = '.$weight{$partid}.') | '."\n";
+ $result.='Score Part: '.$display_part.
+ ' (weight = '.$weight{$partid}.') | '."\n";
next;
} else {
$display =~s/\[Part: \Q$partid\E\]/Part:<\/b> $display_part/;
}
$display =~ s|Problem Status|Grade Status |;
- $result.=''.$display.' | '."\n";
+ $result.=''.$display.' | '."\n";
}
- $result.=' ';
+ $result.=&Apache::loncommon::end_data_table_header_row();
my %last_resets =
&get_last_resets($symb,$env{'request.course.id'},\@partids);
@@ -3268,7 +3273,7 @@ sub viewgrades {
$result.=&viewstudentgrade($symb,$env{'request.course.id'},
$_,$$fullname{$_},\@parts,\%weight,$ctr,\%last_resets);
}
- $result.='
| ';
+ $result.=&Apache::loncommon::end_data_table();
$result.=''."\n";
$result.=''."\n";
@@ -3291,7 +3296,7 @@ sub viewstudentgrade {
my ($uname,$udom) = split(/:/,$student);
my %record=&Apache::lonnet::restore($symb,$courseid,$udom,$uname);
my %aggregates = ();
- my $result=' |
'."\n";
- $result.= ''.
- ' No. | '.
- ''.&nameUserString('header')." | \n";
-
+ my $result= &Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ ''.&mt('No.').' | '.
+ ''.&nameUserString('header')." | \n";
my %scoreptr = (
'correct' =>'correct_by_override',
'incorrect'=>'incorrect_by_override',
@@ -3390,8 +3394,8 @@ sub editgrades {
}
my (undef,undef,$url) = &Apache::lonnet::decode_symb($symb);
foreach my $partid (@partid) {
- $header .= ' Old Score | '.
- ' New Score | ';
+ $header .= ''.&mt('Old Score').' | '.
+ ''.&mt('New Score').' | ';
$columns{$partid}=2;
foreach my $stores (@parts) {
my ($part,$type) = &split_part_type($stores);
@@ -3400,22 +3404,23 @@ sub editgrades {
my $display=&Apache::lonnet::metadata($url,$stores.'.display');
$display =~ s/\[Part: (\w)+\]//;
$display =~ s/Number of Attempts/Tries/;
- $header .= ' Old '.$display.' | '.
- ' New '.$display.' | ';
+ $header .= ''.&mt('Old '.$display).' | '.
+ ''.&mt('New '.$display).' | ';
$columns{$partid}+=2;
}
}
foreach my $partid (@partid) {
my $display_part=&get_display_part($partid,$symb);
- $result .= 'Part: '.$display_part.
- ' (Weight = '.$weight{$partid}.') | ';
+ $result .= ''.
+ &mt('Part: [_1] (Weight = [_2])',$display_part,$weight{$partid}).
+ ' | ';
}
- $result .= ' ';
- $result .= $header;
- $result .= ' '."\n";
- my $noupdate;
+ $result .= &Apache::loncommon::end_data_table_header_row().
+ &Apache::loncommon::start_data_table_header_row().
+ $header.
+ &Apache::loncommon::end_data_table_header_row();
+ my @noupdate;
my ($updateCtr,$noupdateCtr) = (1,1);
for ($i=0; $i<$env{'form.total'}; $i++) {
my $line;
@@ -3427,7 +3432,9 @@ sub editgrades {
my $usec=$classlist->{"$uname:$udom"}[5];
if (!&canmodify($usec)) {
my $numcols=scalar(@partid)*4+2;
- $noupdate.=$line."Not allowed to modify student | ";
+ push(@noupdate,
+ $line."".
+ &mt('Not allowed to modify student')." | ");
next;
}
my %aggregate = ();
@@ -3496,7 +3503,7 @@ sub editgrades {
''.$awarded.' | ';
}
}
- $line.=''."\n";
+ $line.="\n";
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
@@ -3529,10 +3536,13 @@ sub editgrades {
}
}
- $result.=' '.$updateCtr.' | '.$line;
+ $result.=&Apache::loncommon::start_data_table_row().
+ ' '.$updateCtr.' | '.$line.
+ &Apache::loncommon::end_data_table_row();
$updateCtr++;
} else {
- $noupdate.=' '.$noupdateCtr.' | '.$line;
+ push(@noupdate,
+ ' '.$noupdateCtr.' | '.$line);
$noupdateCtr++;
}
if ($aggregateflag) {
@@ -3540,16 +3550,28 @@ sub editgrades {
$cdom,$cnum);
}
}
- if ($noupdate) {
+ if (@noupdate) {
# my $numcols=(scalar(@partid)*(scalar(@parts)-1)*2)+3;
my $numcols=scalar(@partid)*4+2;
- $result .= ' No Changes Occurred For the Students Below | '.$noupdate;
+ $result .= &Apache::loncommon::start_data_table_row('LC_empty_row').
+ ''.
+ &mt('No Changes Occurred For the Students Below').
+ ' | '.
+ &Apache::loncommon::end_data_table_row();
+ foreach my $line (@noupdate) {
+ $result.=
+ &Apache::loncommon::start_data_table_row().
+ $line.
+ &Apache::loncommon::end_data_table_row();
+ }
}
- $result .= '
|
'."\n".
- &show_grading_menu_form ($symb);
- my $msg = '