version 1.44, 2005/01/31 22:00:40
|
version 1.48, 2005/06/22 12:03:23
|
Line 177 sub displayanswers {
|
Line 177 sub displayanswers {
|
|
|
sub check_response_order { |
sub check_response_order { |
my (%responsehash)=@_; |
my (%responsehash)=@_; |
my @order=sort(values(%responsehash)); |
my @order=sort( {$a <=> $b} values(%responsehash)); |
my $lastvalue=0; |
my $lastvalue=0; |
my $expected=1; |
my $expected=1; |
my $malformed=0; |
my $malformed=0; |
Line 263 sub displayfoils {
|
Line 263 sub displayfoils {
|
foreach my $name (@whichfoils) { |
foreach my $name (@whichfoils) { |
my $text=$Apache::response::foilgroup{$name.'.text'}; |
my $text=$Apache::response::foilgroup{$name.'.text'}; |
my $value=shift(@correctorder); |
my $value=shift(@correctorder); |
if ($target eq 'web') {$result.='<br />';} else {$result.=' \strut\\\\\strut ';} |
if ($target eq 'web') { |
$result.=$value.':'.$text; |
$result.='<br /><b>'.$value.':</b> '.$text; |
|
} else { |
|
$result.=' \strut\\\\\strut '.$value.':'.$text; |
|
} |
} |
} |
} else { |
} else { |
my $i = 0; |
my $i = 0; |
Line 425 sub end_foil {
|
Line 428 sub end_foil {
|
if ($value ne 'unused') { |
if ($value ne 'unused') { |
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval); |
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval); |
&Apache::lonxml::debug("Got a name of :$name:"); |
&Apache::lonxml::debug("Got a name of :$name:"); |
if (!$name) { |
if ($name eq "") { |
&Apache::lonxml::error("Foils without names exist. This can cause problems to malfunction."); |
&Apache::lonxml::warning("Foils without names exist. This can cause problems to malfunction."); |
$name=$Apache::lonxml::curdepth; |
$name=$Apache::lonxml::curdepth; |
} |
} |
&Apache::lonxml::debug("Using a name of :$name:"); |
&Apache::lonxml::debug("Using a name of :$name:"); |