--- loncom/homework/grades.pm 2007/11/06 11:48:48 1.483 +++ loncom/homework/grades.pm 2007/11/06 19:19:54 1.484 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.483 2007/11/06 11:48:48 foxr Exp $ +# $Id: grades.pm,v 1.484 2007/11/06 19:19:54 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4099,12 +4099,13 @@ LISTJAVASCRIPT $request->print($result); my $studentTable.=' Select a student you wish to grade and then click on the Next button.
'. - '
'. - ''. - ''. - ''. - ''. - ''; + &Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row(). + ''. + ''. + ''. + ''. + &Apache::loncommon::end_data_table_header_row(); my (undef,undef,$fullname) = &getclasslist($getsec,'1'); my $ptr = 1; @@ -4116,15 +4117,21 @@ LISTJAVASCRIPT return $a cmp $b; } (keys(%$fullname))) { my ($uname,$udom) = split(/:/,$student); - $studentTable.=($ptr%2 == 1 ? '' : ''); + $studentTable.=($ptr%2==1 ? &Apache::loncommon::start_data_table_row() + : ''); $studentTable.=''; $studentTable.='' : ''); + $studentTable.= + ($ptr%2 == 0 ? ''.&Apache::loncommon::end_data_table_row() + : ''); $ptr++; } - $studentTable.='' if ($ptr%2 == 0); - $studentTable.='
 No.'.&nameUserString('header').' No.'.&nameUserString('header').'
 No.'.&nameUserString('header').' No.'.&nameUserString('header').'
'.$ptr.'  \n"; - $studentTable.=($ptr%2 == 0 ? '
  
'."\n"; + if ($ptr%2 == 0) { + $studentTable.='  '. + &Apache::loncommon::end_data_table_row(); + } + $studentTable.=&Apache::loncommon::end_data_table()."\n"; $studentTable.=''."\n"; @@ -4224,10 +4231,11 @@ sub displayPage { $studentTable.=' Note: Problems graded correct by the computer are marked with a '.$checkIcon. ' symbol.'."\n". - '
'. - ''. - ''. - ''; + &Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row(). + ''. + ''. + &Apache::loncommon::end_data_table_header_row(); &Apache::lonxml::clear_problem_counter(); my ($depth,$question,$prob) = (1,1,1); @@ -4241,7 +4249,9 @@ sub displayPage { my $parts = $curRes->parts(); my $title = $curRes->compTitle(); my $symbx = $curRes->symb(); - $studentTable.=''; $studentTable.='
 Prob.  '.($env{'form.vProb'} eq 'no' ? 'Title' : 'Problem Text').'/Grade
 Prob.  '.($env{'form.vProb'} eq 'no' ? 'Title' : 'Problem Text').'/Grade
'.$prob. + $studentTable.= + &Apache::loncommon::start_data_table_row(). + ''.$prob. (scalar(@{$parts}) == 1 ? '' : '
('.scalar(@{$parts}).' parts)').'
'; my %form = ('CODE' => $env{'form.CODE'},); @@ -4449,12 +4459,14 @@ sub updateGradeByPage { my $iterator = $navmap->getIterator($map->map_start(), $map->map_finish()); - my $studentTable='
'. - ''. - ''. - ''. - ''. - ''; + my $studentTable= + &Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row(). + ''. + ''. + ''. + ''. + &Apache::loncommon::end_data_table_header_row(); $iterator->next(); # skip the first BEGIN_MAP my $curRes = $iterator->next(); # for "current resource" @@ -4467,7 +4479,9 @@ sub updateGradeByPage { my $parts = $curRes->parts(); my $title = $curRes->compTitle(); my $symbx = $curRes->symb(); - $studentTable.=''; $studentTable.=''; @@ -4555,14 +4569,14 @@ sub updateGradeByPage { $studentTable.=''. ''. - ''; + &Apache::loncommon::end_data_table_row(); $prob++; } $curRes = $iterator->next(); } - $studentTable.='
 Prob.  Title  Previous Score  New Score 
 Prob.  Title  Previous Score  New Score 
'.$prob. + $studentTable.= + &Apache::loncommon::start_data_table_row(). + ''.$prob. (scalar(@{$parts}) == 1 ? '' : '
('.scalar(@{$parts}).' parts)').'
 '.$title.' '.$displayPts[0].''.$displayPts[1].'
'; + $studentTable.=&Apache::loncommon::end_data_table(); $studentTable.=&show_grading_menu_form($env{'form.symb'}); my $grademsg=($changeflag == 0 ? 'No score was changed or updated.' : 'The scores were changed for '.