--- loncom/homework/imageresponse.pm 2008/11/12 20:01:21 1.95 +++ loncom/homework/imageresponse.pm 2009/08/03 10:40:00 1.98 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # image click response style # -# $Id: imageresponse.pm,v 1.95 2008/11/12 20:01:21 jms Exp $ +# $Id: imageresponse.pm,v 1.98 2009/08/03 10:40:00 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -41,134 +41,69 @@ Coordinates the response to clicking an This is part of the LearningOnline Network with CAPA project described at http://www.lon-capa.org. -=head1 HANDLER SUBROUTINE - - - -=head1 OTHER SUBROUTINES +=head1 SUBROUTINES =over -=item * - -start_imageresponse() - -=item * - -end_imageresponse() - -=item * - -start_foilgroup() - -=item * - -getfoilcounts() - -=item * - -whichfoils() - -=item * - -prep_image() - -=item * - -draw_image() - -=item * - -displayfoils() - -=item * +=item start_imageresponse() -format_prior_response() +=item end_imageresponse() -=item * +=item start_foilgroup() -display_answers() +=item getfoilcounts() -=item * +=item whichfoils() -clean_up_image() +=item prep_image() -=item * +=item draw_image() -gradefoils() +=item displayfoils() -=item * +=item format_prior_response() -stringify_submission() +=item display_answers() -=item * +=item clean_up_image() -get_submission() +=item gradefoils() -=item * +=item stringify_submission() -end_foilgroup() +=item get_submission() -=item * +=item end_foilgroup() -start_conceptgroup() +=item start_conceptgroup() -=item * +=item end_conceptgroup() -end_conceptgroup() +=item insert_foil() -=item * +=item start_foil() -insert_foil() +=item end_foil() -=item * +=item start_text() -start_foil() +=item end_text() -=item * +=item start_image() -end_foil() +=item end_image() -=item * +=item start_rectangle() -start_text() +=item grade_rectangle() -=item * +=item end_rectangle() -end_text() +=item start_polygon() -=item * +=item grade_polygon() -start_image() - - -=item * - -end_image() - -=item * - -start_rectangle() - -=item * - -grade_rectangle() - -=item * - -end_rectangle() - -=item * - -start_polygon() - -=item * - -grade_polygon() - -=item * - -end_polygon() +=item end_polygon() =back @@ -252,7 +187,6 @@ sub end_imageresponse { } &Apache::response::end_response(); - return $result; } @@ -385,7 +319,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); @@ -451,7 +385,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); @@ -466,7 +400,7 @@ sub clean_up_image { my ($image)=@_; if ($image =~ /\s*