version 1.28, 2003/05/06 15:48:55
|
version 1.31, 2003/06/09 22:42:49
|
Line 51 sub start_imageresponse {
|
Line 51 sub start_imageresponse {
|
} |
} |
|
|
sub end_imageresponse { |
sub end_imageresponse { |
&Apache::response::end_response; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
pop @Apache::lonxml::namespace; |
&Apache::response::end_response; |
&Apache::lonxml::deregister('Apache::imageresponse',('foilgroup','foil','text','image','rectangle','conceptgroup')); |
pop @Apache::lonxml::namespace; |
return ''; |
&Apache::lonxml::deregister('Apache::imageresponse',('foilgroup','foil','text','image','rectangle','conceptgroup')); |
|
my $result; |
|
if ($target eq 'edit') { $result=&Apache::edit::end_table(); } |
|
return $result; |
} |
} |
|
|
%Apache::response::foilgroup=(); |
%Apache::response::foilgroup=(); |
Line 136 sub gradefoils {
|
Line 139 sub gradefoils {
|
$x=$ENV{"form.HWVAL_$id:$temp.x"}; |
$x=$ENV{"form.HWVAL_$id:$temp.x"}; |
$y=$ENV{"form.HWVAL_$id:$temp.y"}; |
$y=$ENV{"form.HWVAL_$id:$temp.y"}; |
&Apache::lonxml::debug("Got a x of $x and a y of $y for $name"); |
&Apache::lonxml::debug("Got a x of $x and a y of $y for $name"); |
if (defined(@{ $Apache::response::foilgroup{"$name.area"} })) { |
if (defined($x) && defined($y) && |
|
defined(@{ $Apache::response::foilgroup{"$name.area"} })) { |
my @areas = @{ $Apache::response::foilgroup{"$name.area"} }; |
my @areas = @{ $Apache::response::foilgroup{"$name.area"} }; |
my $grade="INCORRECT"; |
my $grade="INCORRECT"; |
foreach my $area (@areas) { |
foreach my $area (@areas) { |
Line 214 sub end_conceptgroup {
|
Line 218 sub end_conceptgroup {
|
return $result; |
return $result; |
} |
} |
|
|
|
sub insert_foil { |
|
return ' |
|
<foil> |
|
<image></image> |
|
<text></text> |
|
<rectangle></rectangle> |
|
</foil> |
|
'; |
|
} |
|
|
$Apache::imageresponse::curname=''; |
$Apache::imageresponse::curname=''; |
sub start_foil { |
sub start_foil { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |