version 1.174, 2011/03/03 21:05:35
|
version 1.176, 2011/06/07 17:27:37
|
Line 225 sub end_foilgroup {
|
Line 225 sub end_foilgroup {
|
my $part_id="$Apache::inputtags::part.$Apache::inputtags::response[-1]"; |
my $part_id="$Apache::inputtags::part.$Apache::inputtags::response[-1]"; |
push (@{ $Apache::lonhomework::analyze{"$part_id.options"} },@opt); |
push (@{ $Apache::lonhomework::analyze{"$part_id.options"} },@opt); |
} elsif ( $target eq 'grade') { |
} elsif ( $target eq 'grade') { |
|
|
my $nonlenient=0; |
my $nonlenient=0; |
my $part=$Apache::inputtags::part; |
my $part=$Apache::inputtags::part; |
my $lenientparm=&Apache::lonnet::EXT("resource.$part.lenient"); |
my $lenientparm=&Apache::lonnet::EXT("resource.$part.lenient"); |
|
|
&Apache::lonnet::logthis("Parameter ".$part." ".$lenientparm); |
|
|
|
if ($Apache::lonhomework::scantronmode) { |
if ($Apache::lonhomework::scantronmode) { |
$nonlenient=0; |
$nonlenient=0; |
# Grading an exam: we are grading lenient unless told not to |
# Grading an exam: we are grading lenient unless told not to |
Line 244 sub end_foilgroup {
|
Line 243 sub end_foilgroup {
|
$nonlenient=0; |
$nonlenient=0; |
} |
} |
} |
} |
&Apache::lonnet::logthis("Non-Lenient set to ".$nonlenient); |
|
if ( &Apache::response::submitted()) { |
if ( &Apache::response::submitted()) { |
|
|
my @whichopt = &whichfoils($max,$randomize); |
my @whichopt = &whichfoils($max,$randomize); |
my $temp=1;my $name; |
my $temp=1;my $name; |
my %responsehash; |
my %responsehash; |
Line 310 sub end_foilgroup {
|
Line 309 sub end_foilgroup {
|
# |
# |
# Non-lenient mode. All right or all wrong |
# Non-lenient mode. All right or all wrong |
# |
# |
&Apache::lonnet::logthis("In non-lenient"); |
|
my $ad; |
my $ad; |
if ($wrong==0 && $ignored==0) { |
if ($wrong==0 && $ignored==0) { |
$ad='EXACT_ANS'; |
$ad='EXACT_ANS'; |
Line 329 sub end_foilgroup {
|
Line 327 sub end_foilgroup {
|
# |
# |
# This is lenient mode |
# This is lenient mode |
# |
# |
&Apache::lonnet::logthis("This is in lenient mode ... nice"); |
|
my $ad; |
my $ad; |
if ($wrong==0 && $right==0) { |
if ($wrong==0 && $right==0) { |
#nothing submitted only assign a score if we |
#nothing submitted only assign a score if we |
Line 463 sub displayfoils {
|
Line 460 sub displayfoils {
|
my $part=$Apache::inputtags::part; |
my $part=$Apache::inputtags::part; |
my $id=$Apache::inputtags::response[-1]; |
my $id=$Apache::inputtags::response[-1]; |
my $break; |
my $break; |
my $solved=$Apache::lonhomework::history{"resource.$part.solved"}; |
|
if ( ($target ne 'tex') && |
if ( ($target ne 'tex') && |
&Apache::response::show_answer() ) { |
&Apache::response::show_answer() ) { |
my $temp=1; |
my $temp=1; |
Line 854 sub end_foil {
|
Line 850 sub end_foil {
|
&Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.')); |
&Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.')); |
$name=$Apache::lonxml::curdepth; |
$name=$Apache::lonxml::curdepth; |
} |
} |
|
if ($name eq "0") { |
|
&Apache::lonxml::error(&mt('Foil name [_1] is not supported. Please choose another name.','<b><tt>'.$name.'</tt></b>')); |
|
} |
&Apache::lonxml::debug("Using a name of :$name:"); |
&Apache::lonxml::debug("Using a name of :$name:"); |
if (defined($Apache::response::foilnames{$name})) { |
if (defined($Apache::response::foilnames{$name})) { |
&Apache::lonxml::error(&mt("Foil name [_1] appears more than once. Foil names need to be unique.",'<b><tt>'.$name.'</tt></b>')); |
&Apache::lonxml::error(&mt("Foil name [_1] appears more than once. Foil names need to be unique.",'<b><tt>'.$name.'</tt></b>')); |