--- loncom/homework/grades.pm 2010/04/17 16:38:38 1.621 +++ loncom/homework/grades.pm 2010/04/17 22:48:52 1.622 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.621 2010/04/17 16:38:38 www Exp $ +# $Id: grades.pm,v 1.622 2010/04/17 22:48:52 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -43,6 +43,7 @@ use Apache::lonmsg(); use Apache::Constants qw(:common); use Apache::lonlocal; use Apache::lonenc; +use Apache::lonstathelpers; use String::Similarity; use LONCAPA; @@ -9169,6 +9170,14 @@ sub startpage { } } +sub select_problem { + my ($r)=@_; + $r->print('

'.&mt('Select the problem you want to grade').'

'); + $r->print(&Apache::lonstathelpers::problem_selector('.',undef,1)); + $r->print(''); + $r->print('
'); +} + sub handler { my $request=$_[0]; &reset_caches(); @@ -9200,11 +9209,12 @@ sub handler { &Apache::lonenc::check_decrypt(\$symb); $ssi_error = 0; - if ($symb eq '' && $command eq '') { + if ($symb eq '' || $command eq '') { # # Not called from a resource # - + &startpage($request,undef,[],1,1); + &select_problem($request); } else { &init_perm(); if ($command eq 'submission' && $perm{'vgr'}) {