--- loncom/homework/grades.pm 2007/08/18 00:57:25 1.429 +++ loncom/homework/grades.pm 2007/08/21 22:21:54 1.432 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.429 2007/08/18 00:57:25 banghart Exp $ +# $Id: grades.pm,v 1.432 2007/08/21 22:21:54 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -723,7 +723,6 @@ LISTJAVASCRIPT my $saveStatus = $env{'form.Status'} eq '' ? 'Active' : $env{'form.Status'}; $env{'form.Status'} = $saveStatus; - $gradeTable.=''."\n". ''."\n". ''."\n". @@ -734,8 +733,7 @@ LISTJAVASCRIPT ''. ''. ''. - - ''."\n". + &build_section_inputs(). ''."\n". '
'."\n". '
'."\n". @@ -1661,6 +1659,19 @@ sub download_all_link { return } +sub build_section_inputs { + my $section_inputs; + if ($env{'form.section'} eq '') { + $section_inputs .= ''."\n"; + } else { + my @sections = &Apache::loncommon::get_env_multiple('form.section'); + foreach my $section(@sections) { + $section_inputs .= ''."\n"; + } + } + return $section_inputs; +} + # --------------------------- show submissions of a student, option to grade sub submission { my ($request,$counter,$total) = @_; @@ -1741,7 +1752,6 @@ sub submission { $env{'form.savemsgN'} = $keyhash{$symb.'_savemsgN'} ne '' ? $keyhash{$symb.'_savemsgN'} : '0'; } my $overRideScore = $env{'form.overRideScore'} eq '' ? 'no' : $env{'form.overRideScore'}; - $request->print('
'."\n". ''."\n". ''."\n". @@ -1756,7 +1766,7 @@ sub submission { ''."\n". ''."\n". ''."\n". - ''."\n". + &build_section_inputs(). ''."\n". ''."\n". ''."\n". ''."\n". - ''."\n". + &build_section_inputs(). ''."\n". ''."\n". ''."\n"; my $sectionClass; + my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section')); if ($env{'form.section'} eq 'all') { $sectionClass='Class '; } elsif ($env{'form.section'} eq 'none') { - $sectionClass='Students in no Section '; + $sectionClass=&mt('Students in no Section').''; } else { - $sectionClass='Students in Section '.$env{'form.section'}.''; + $sectionClass=&mt('Students in Section(s) [_1]',$section_display).''; } - $result.='

Assign Common Grade To '.$sectionClass; + $result.='

'.&mt('Assign Common Grade To [_1]',$sectionClass); $result.= '
'."\n". '
'; #radio buttons/text box for assigning points for a section or class. @@ -3865,9 +3876,9 @@ LISTJAVASCRIPT ''."\n". ''."\n". ''."\n"; - - $result.=''."\n". - ''."\n". + + $result.=&build_section_inputs(); + $result.=''."\n". ''."\n". ''."\n". ''."
\n";