--- loncom/homework/imageresponse.pm 2004/01/09 23:22:19 1.43 +++ loncom/homework/imageresponse.pm 2004/01/15 19:51:30 1.45 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # image click response style # -# $Id: imageresponse.pm,v 1.43 2004/01/09 23:22:19 albertel Exp $ +# $Id: imageresponse.pm,v 1.45 2004/01/15 19:51:30 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -473,7 +473,11 @@ sub end_image { my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout.dat"; $temp_file = Apache::File->new('>>'.$filename); print $temp_file "$src\n"; - $Apache::response::foilgroup{"$name.image"} ='\vskip 0 mm \graphicspath{{/home/httpd/prtspool/}}\includegraphics[width='.$width_param.' mm]{'.$file.'} '; + $newsrc=~s/\/home\/httpd\/html\/res//; + $newsrc=~s/\/home\/([^\/]*)\/public_html\//\/$1\//; + $newsrc=~s/\/\.\//\//; + $newsrc=~s/\/([^\/]+)\.(ps|eps)/\//; + $Apache::response::foilgroup{"$name.image"} ='\vskip 0 mm \graphicspath{{/home/httpd/prtspool'.$newsrc.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'} '; } } return $result; @@ -489,9 +493,10 @@ sub start_rectangle { my $coords=&Apache::lonxml::get_all_text('/rectangle',$parser); $result=&Apache::edit::tag_start($target,$token,'Rectangle'). &Apache::edit::editline($token->[1],$coords,'Coordinate Pairs',40). - &Apache::edit::entercoordpair(undef,'textnode'). + &Apache::edit::entercoord(undef,'textnode',undef,undef,'box'). &Apache::edit::end_row(); } elsif ($target eq "modified") { + &Apache::edit::deletecoorddata(); $result=$token->[4].&Apache::edit::modifiedfield('/rectangle',$parser); } return $result; @@ -540,7 +545,7 @@ sub start_polygon { my $coords=&Apache::lonxml::get_all_text('/polygon',$parser); $result=&Apache::edit::tag_start($target,$token,'Polygon'). &Apache::edit::editline($token->[1],$coords,'Coordinate list',40). - &Apache::edit::entercoordpolygon(undef,'textnode'). + &Apache::edit::entercoord(undef,'textnode',undef,undef,'polygon'). &Apache::edit::end_row(); } elsif ($target eq "modified") { $result=$token->[4].&Apache::edit::modifiedfield('/polygon',$parser);