--- loncom/homework/grades.pm 2007/08/11 13:32:23 1.428 +++ loncom/homework/grades.pm 2007/08/22 18:27:03 1.433 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.428 2007/08/11 13:32:23 www Exp $ +# $Id: grades.pm,v 1.433 2007/08/22 18:27:03 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. @@ -3084,8 +3095,11 @@ sub viewgrades { 'onClick="javascript:submit();" target="_self" />'."\n"; if (scalar(%$fullname) eq 0) { my $colspan=3+scalar(@parts); - $result='There are no students in section "'.$env{'form.section'}. - '" with enrollment status "'.$env{'form.Status'}.'" to modify or grade.'; + my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section')); + $result=''. + &mt('There are no students in section(s) [_1] with enrollment status [_2] to modify or grade', + $section_display, $env{'form.Status'}). + ''; } $result.=&show_grading_menu_form($symb); return $result; @@ -3162,9 +3176,10 @@ sub editgrades { my ($request) = @_; my $symb=&get_symb($request); - my $title='

Current Grade Status

'; - $title.='

Current Resource: '.$env{'form.probTitle'}.'


'."\n"; - $title.='

Section: '.$env{'form.section'}.'

'."\n"; + my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section')); + my $title='

'.&mt('Current Grade Status').'

'; + $title.='

'.&mt('Current Resource: [_1]',$env{'form.probTitle'}).'


'."\n"; + $title.='

'.&mt('Section: [_1]',$section_display).'

'."\n"; my $result= '
'."\n"; $result.= ''. @@ -3865,9 +3880,9 @@ LISTJAVASCRIPT ''."\n". ''."\n". ''."\n"; - - $result.=''."\n". - ''."\n". + + $result.=&build_section_inputs(); + $result.=''."\n". ''."\n". ''."\n". ''."
\n"; @@ -6932,7 +6947,7 @@ GRADINGMENUJS $result.='
'; $result.='
'."\n". - ' '.&mt('Select Section').': '."\n"; if (ref($sections)) { foreach (sort (@$sections)) { $result.='