';
+ return $output;
+}
+
sub displayfoils {
my ($target,$max,$randomize,$tol)=@_;
my $result;
@@ -304,7 +332,8 @@ sub displayfoils {
}
}
if ($target ne 'tex' && $Apache::lonhomework::type ne 'exam') {
- $optionlist='\n";
} else {
@@ -333,6 +362,11 @@ sub displayfoils {
$temp++;
}
}
+ if ($target eq 'web') {
+ &Apache::response::setup_prior_tries_hash(\&format_prior_answer,
+ [\@whichfoils,
+ 'submissiongrading']);
+ }
if ($target ne 'tex') {$result.=" ";} else {$result.=' \vskip 0 mm ';}
return $result;
}
@@ -442,12 +476,12 @@ sub end_foil {
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
&Apache::lonxml::debug("Got a name of :$name:");
if ($name eq "") {
- &Apache::lonxml::warning("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;
}
&Apache::lonxml::debug("Using a name of :$name:");
if (defined($Apache::response::foilnames{$name})) {
- &Apache::lonxml::error(&mt("Foil name [_1] appears more than once. Foil names need to be unique.",$name));
+ &Apache::lonxml::error(&mt('Foil name [_1] appears more than once. Foil names need to be unique.',''.$name.''));
}
$Apache::response::foilnames{$name}++;
my $location =&Apache::lonxml::get_param('location',$parstack,