'.&mt('Delete?').' '
.&Apache::edit::deletelist($target,$token)
@@ -127,8 +128,8 @@ sub start_foilgroup {
maxcheck => 'Enter maximum number students may check (e.g., 3)',
mincheck => 'Enter minimum number students need to check (e.g., 1)',
);
- $result.= (<
$lt{'sel'}
+ $result.= sprintf(<
%s $lt{'sel'}
$lt{'add'}
@@ -375,8 +376,8 @@ sub end_foilgroup {
}
}
my $part=$Apache::inputtags::part;
- my $nonlenient=&grading_is_nonlenient($part);
- my $id = $Apache::inputtags::response['-1'];
+ my $id = $Apache::inputtags::response['-1'];
+ my $nonlenient=&grading_is_nonlenient($part,$id);
my $responsestr=&Apache::lonnet::hash2str(%responsehash);
my $gradestr =&Apache::lonnet::hash2str(%grade);
my %previous=&Apache::response::check_for_previous($responsestr,
@@ -491,22 +492,33 @@ sub end_foilgroup {
}
sub grading_is_nonlenient {
- my ($part) = @_;
+ my ($part,$id) = @_;
# Web mode: we are non-lenient unless told otherwise
my $defaultparm = 'off';
- my $nonlenient = 0;
+ my $nonlenient = 1;
# Grading a bubblesheet exam: we are grading lenient unless told otherwise
if ($Apache::lonhomework::scantronmode) {
$defaultparm = 'on';
- $nonlenient = 1;
+ $nonlenient = 0;
}
my $lenientparm =
&Apache::response::get_response_param($part,'lenient',$defaultparm);
+ if ($lenientparm eq 'default') {
+ $lenientparm = $defaultparm;
+ }
+ $lenientparm =
+ &Apache::response::get_response_param($part.'_'.$id,'lenient',$lenientparm);
+ if ($lenientparm eq 'default') {
+ $lenientparm = $defaultparm;
+ }
if ($lenientparm=~/^0|off|no$/i) {
$nonlenient = 1;
} elsif ($lenientparm=~/^1|on|yes$/i) {
$nonlenient = 0;
}
+ if (!$nonlenient) {
+ $Apache::inputtags::leniency=1;
+ }
return $nonlenient;
}