--- loncom/homework/grades.pm 2009/12/15 18:26:18 1.584 +++ loncom/homework/grades.pm 2009/12/16 16:09:24 1.585 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.584 2009/12/15 18:26:18 bisitz Exp $ +# $Id: grades.pm,v 1.585 2009/12/16 16:09:24 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1711,6 +1711,25 @@ sub get_increment { return $increment; } +sub gradeBox_start { + return ( + &Apache::loncommon::start_data_table() + .&Apache::loncommon::start_data_table_header_row() + .''.&mt('Part').'' + .''.&mt('Points').'' + .' ' + .''.&mt('Assign Grade').'' + .''.&mt('Weight').'' + .''.&mt('Grade Status').'' + .&Apache::loncommon::end_data_table_header_row() + ); +} + +sub gradeBox_end { + return ( + &Apache::loncommon::end_data_table() + ); +} #--- displays the grading box, used in essay type problem and grading by page/sequence sub gradeBox { my ($request,$symb,$uname,$udom,$counter,$partid,$record) = @_; @@ -1730,7 +1749,7 @@ sub gradeBox { if ($last_resets{$partid}) { $aggtries = &get_num_tries($record,$last_resets{$partid},$partid); } - $result.=''; + $result.=&Apache::loncommon::start_data_table_row(); my $ctr = 0; my $thisweight = 0; my $increment = &get_increment(); @@ -1753,8 +1772,8 @@ sub gradeBox { $wgt.')" />'."\n"; $line.='',$display_part,$radio,$line); $result .= - ''; - $result.='
/'.$wgt.' '.$wgtmsg. ($$record{'resource.'.$partid.'.solved'} eq 'correct_by_student' ? ' '.$checkIcon : ''). - ' '.&mt('Grade Status').':'."\n"; - $line.='Part:[_1]Points:[_2]or[_3]'.&mt('Part:').''.$display_part.''.&mt('Points:').''.$radio.''.&mt('or').''.$line.'
'."\n"; + ''.$display_part.''.$radio.''.&mt('or').''.$line.''; + $result.=&Apache::loncommon::end_data_table_row(); $result.=''."\n". ''."\n". ''. - - '
'. - &mt('Assign Grades').'
'. - '
'); + $request->print( + '
' + .'
' + .&mt('Assign Grades').'
' + ); + $request->print(&gradeBox_start()); #
foreach my $part_response_id (@part_response_id) { my ($partid,$respid) = @{ $part_response_id }; my $part_resp = join('_',@{ $part_response_id }); @@ -2297,7 +2317,8 @@ KEYWORDS push(@gradePartRespid,$partid.'.'.$respid); $request->print(&gradeBox($request,$symb,$uname,$udom,$counter,$partid,\%record)); } - $request->print('
'); + $request->print(&gradeBox_end()); #
+ $request->print(''); $request->print('