--- loncom/homework/inputtags.pm 2011/12/10 18:10:56 1.298 +++ loncom/homework/inputtags.pm 2012/01/29 03:02:52 1.301 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.298 2011/12/10 18:10:56 www Exp $ +# $Id: inputtags.pm,v 1.301 2012/01/29 03:02:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -843,26 +843,6 @@ sub finalizeawards { } } -sub grading_is_nonlenient { - my ($part) = @_; -# Web mode: we are non-lenient unless told otherwise - my $defaultparm = 'off'; - my $nonlenient = 0; -# Grading a bubblesheet exam: we are grading lenient unless told otherwise - if ($Apache::lonhomework::scantronmode) { - $defaultparm = 'on'; - $nonlenient = 1; - } - my $lenientparm = - &Apache::response::get_response_param($part,'lenient',$defaultparm); - if ($lenientparm=~/^0|off|no$/i) { - $nonlenient = 1; - } elsif ($lenientparm=~/^1|on|yes$/i) { - $nonlenient = 0; - } - return $nonlenient; -} - sub decideoutput { my ($award,$awarded,$awardmsg,$solved,$previous,$target,$nocorrect)=@_; @@ -931,11 +911,11 @@ sub decideoutput { } } } - if (&grading_is_nonlenient($part)) { + if ($awarded >= 1) { $button=0; - } elsif ($awarded==1) { + } elsif (&Apache::lonnet::EXT("resource.$part.retrypartial") !~/^1|on|yes$/i) { $button=0; - } else { + } else { $button=1; } $previousmsg=''; @@ -1096,6 +1076,7 @@ sub decideoutput { } elsif ($award eq 'ANONYMOUS_CREDIT') { $message = &mt("Your anonymous submission has been recorded, and credit awarded."); $css_class=$possible_class{'correct'}; + $button=1; } elsif ($award eq 'DRAFT') { $message = &mt("Copy saved but not submitted."); $css_class=$possible_class{'not_charged_try'}; @@ -1514,7 +1495,10 @@ sub gradestatus { && $status ne 'UNAVAILABLE' && $status ne 'INVALID_ACCESS' && $status ne 'NEEDS_CHECKIN' - && $status ne 'NOT_IN_A_SLOT') { + && $status ne 'NOT_IN_A_SLOT' + && $status ne 'RESERVABLE' + && $status ne 'RESERVABLE_LATER' + && $status ne 'NOTRESERVABLE') { ($previousmsg,$latemessage,$message,$trystr) = &get_grade_messages($id,"resource.$id",$target,$status,