--- loncom/homework/grades.pm 2007/03/14 23:39:39 1.393 +++ loncom/homework/grades.pm 2007/04/16 19:00:38 1.395 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.393 2007/03/14 23:39:39 albertel Exp $ +# $Id: grades.pm,v 1.395 2007/04/16 19:00:38 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1627,6 +1627,23 @@ sub show_problem { return $result; } +sub download_all_link { + my ($r,$symb) = @_; + my $all_students = + join("\n", &Apache::loncommon::get_env_multiple('form.stuinfo')); + + my $parts = + join("\n",&Apache::loncommon::get_env_multiple('form.vPart')); + + my $identifier = &Apache::loncommon::get_cgi_id(); + &Apache::lonnet::appenv('cgi.'.$identifier.'.students' => $all_students, + 'cgi.'.$identifier.'.symb' => $symb, + 'cgi.'.$identifier.'.parts' => $parts,); + $r->print(''. + &mt('Download All Submitted Documents').''); + return +} + # --------------------------- show submissions of a student, option to grade sub submission { my ($request,$counter,$total) = @_; @@ -1661,7 +1678,7 @@ sub submission { &sub_page_kw_js($request) if ($env{'form.handgrade'} eq 'yes'); $env{'form.probTitle'} = $env{'form.probTitle'} eq '' ? &Apache::lonnet::gettitle($symb) : $env{'form.probTitle'}; - + &download_all_link($request,$symb); $request->print('

 Submission Record

'."\n". ' Resource: '.$env{'form.probTitle'}.''."\n");