--- loncom/homework/grades.pm 2007/08/21 18:48:18 1.431 +++ 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.431 2007/08/21 18:48:18 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"; @@ -3866,9 +3876,9 @@ LISTJAVASCRIPT ''."\n". ''."\n". ''."\n"; - - $result.=''."\n". - ''."\n". + + $result.=&build_section_inputs(); + $result.=''."\n". ''."\n". ''."\n". ''."
\n"; @@ -7545,10 +7555,6 @@ sub handler { } } else { &init_perm(); -# &Apache::lonnet::logthis("command is $command"); -# foreach my $key (keys %perm) { -# &Apache::lonnet::logthis("a key is $key"); -# } if ($command eq 'submission' && $perm{'vgr'}) { ($env{'form.student'} eq '' ? &listStudents($request) : &submission($request,0,0)); } elsif ($command eq 'pickStudentPage' && $perm{'vgr'}) {