version 1.295, 2011/10/08 19:19:58
|
version 1.296, 2011/11/29 13:24:38
|
Line 843 sub finalizeawards {
|
Line 843 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 { |
sub decideoutput { |
my ($award,$awarded,$awardmsg,$solved,$previous,$target,$nocorrect)=@_; |
my ($award,$awarded,$awardmsg,$solved,$previous,$target,$nocorrect)=@_; |
|
|
Line 911 sub decideoutput {
|
Line 931 sub decideoutput {
|
} |
} |
} |
} |
} |
} |
if ($awarded==1) { $button=0; } else { $button=1; } |
if (&grading_is_nonlenient($part)) { |
|
$button=0; |
|
} elsif ($awarded==1) { |
|
$button=0; |
|
} else { |
|
$button=1; |
|
} |
$previousmsg=''; |
$previousmsg=''; |
} elsif ($solved =~ /^excused/) { |
} elsif ($solved =~ /^excused/) { |
if ($target eq 'tex') { |
if ($target eq 'tex') { |