--- loncom/homework/imageresponse.pm 2007/10/15 20:20:49 1.91
+++ loncom/homework/imageresponse.pm 2008/12/21 05:22:01 1.94.2.1
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# image click response style
#
-# $Id: imageresponse.pm,v 1.91 2007/10/15 20:20:49 albertel Exp $
+# $Id: imageresponse.pm,v 1.94.2.1 2008/12/21 05:22:01 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -59,6 +59,7 @@ sub start_imageresponse {
$result=&Apache::response::meta_package_write('imageresponse');
} elsif ($target eq 'analyze') {
my $part_id="$Apache::inputtags::part.$id";
+ $Apache::lonhomework::analyze{"$part_id.type"} = 'imageresponse';
push (@{ $Apache::lonhomework::analyze{"parts"} },$part_id);
push (@{ $Apache::lonhomework::analyze{"$part_id.bubble_lines"} },
1);
@@ -222,7 +223,7 @@ sub draw_image {
}
}
}
- &Apache::lonnet::appenv(%x);
+ &Apache::lonnet::appenv(\%x);
return $id;
}
@@ -238,7 +239,7 @@ sub displayfoils {
my $image=$Apache::response::foilgroup{"$name.image"};
&Apache::lonxml::debug("image is $image");
if ( ($target eq 'web' || $target eq 'answer')
- && $image !~ /^http:/ ) {
+ && $image !~ /^https?\:/ ) {
$image=&clean_up_image($image);
}
push(@images,$image);
@@ -304,7 +305,7 @@ sub display_answers {
my $image=$Apache::response::foilgroup{"$name.image"};
&Apache::lonxml::debug("image is $image");
if ( ($target eq 'web' || $target eq 'answer')
- && $image !~ /^http:/ ) {
+ && $image !~ /^https?\:/ ) {
$image = &clean_up_image($image);
}
my $token=&prep_image($image,'answeronly',$name);
@@ -319,7 +320,7 @@ sub clean_up_image {
my ($image)=@_;
if ($image =~ /\s*
[_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}++;
if ( $Apache::imageresponse::conceptgroup