--- loncom/homework/grades.pm 2010/08/30 09:47:32 1.636 +++ loncom/homework/grades.pm 2010/12/04 15:02:26 1.639 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.636 2010/08/30 09:47:32 wenzelju Exp $ +# $Id: grades.pm,v 1.639 2010/12/04 15:02:26 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -44,6 +44,7 @@ use Apache::Constants qw(:common); use Apache::lonlocal; use Apache::lonenc; use Apache::lonstathelpers; +use Apache::lonquickgrades; use String::Similarity; use LONCAPA; @@ -3861,7 +3862,7 @@ ENDPICK } sub checkforfile_js { - my $alertmsg = &mt('Please use the "Choose File" button to select a file from your local directory.'); + my $alertmsg = &mt('Please use the browse button to select a file from your local directory.'); my $result = &Apache::lonhtmlcommon::scripttag(<1) { + push(@skipped,&mt("[_1]: point value larger than weight","$username:$domain")); + } $grades{"resource.$part.awarded"}=$pcr; $grades{"resource.$part.solved"}=$award; $points{$part}=1; @@ -9137,7 +9141,7 @@ sub startpage { unshift(@$crumbs,{href=>&href_symb_cmd($symb,'gradingmenu'),text=>"Grading"}); $r->print(&Apache::loncommon::start_page('Grading',undef, {'bread_crumbs' => $crumbs})); - $r->print('

'.$$crumbs[-1]{'text'}.'

'); + &Apache::lonquickgrades::startGradeScreen($r,'grading'); unless ($nodisplayflag) { $r->print(&Apache::lonhtmlcommon::resource_info_box($symb,$onlyfolderflag)); } @@ -9182,9 +9186,9 @@ sub handler { &Apache::lonenc::check_decrypt(\$symb); $ssi_error = 0; - if ($symb eq '' || $command eq '') { + if (($symb eq '' || $command eq '') && ($env{'request.course.id'})) { # -# Not called from a resource +# Not called from a resource, but inside a course # &startpage($request,undef,[],1,1); &select_problem($request); @@ -9330,6 +9334,7 @@ sub handler { if ($ssi_error) { &ssi_print_error($request); } + &Apache::lonquickgrades::endGradeScreen($request); $request->print(&Apache::loncommon::end_page()); &reset_caches(); return '';