Annotation of loncom/homework/imageresponse.pm, revision 1.27

1.12      albertel    1: # The LearningOnline Network with CAPA
1.14      albertel    2: # image click response style
                      3: #
1.27    ! www         4: # $Id: imageresponse.pm,v 1.26 2003/05/05 22:36:54 albertel Exp $
1.14      albertel    5: #
                      6: # Copyright Michigan State University Board of Trustees
                      7: #
                      8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
                      9: #
                     10: # LON-CAPA is free software; you can redistribute it and/or modify
                     11: # it under the terms of the GNU General Public License as published by
                     12: # the Free Software Foundation; either version 2 of the License, or
                     13: # (at your option) any later version.
                     14: #
                     15: # LON-CAPA is distributed in the hope that it will be useful,
                     16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
                     17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     18: # GNU General Public License for more details.
                     19: #
                     20: # You should have received a copy of the GNU General Public License
                     21: # along with LON-CAPA; if not, write to the Free Software
                     22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     23: #
                     24: # /home/httpd/html/adm/gpl.txt
                     25: #
                     26: # http://www.lon-capa.org/
                     27: #
1.1       albertel   28: 
1.25      www        29: #FIXME LATER assumes multiple possible submissions but only one is possible 
                     30: #currently
1.3       albertel   31: 
1.1       albertel   32: package Apache::imageresponse;
                     33: use strict;
1.21      harris41   34: use Image::Magick;
1.1       albertel   35: 
1.16      harris41   36: BEGIN {
1.12      albertel   37:   &Apache::lonxml::register('Apache::imageresponse',('imageresponse'));
1.1       albertel   38: }
                     39: 
                     40: sub start_imageresponse {
1.12      albertel   41:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
1.13      albertel   42:   my $result;
1.12      albertel   43:   #when in a radiobutton response use these
                     44:   &Apache::lonxml::register('Apache::imageresponse',('foilgroup','foil','text','image','rectangle','conceptgroup'));
                     45:   push (@Apache::lonxml::namespace,'imageresponse');
                     46:   my $id = &Apache::response::start_response($parstack,$safeeval);
1.13      albertel   47:   if ($target eq 'meta') {
                     48:     $result=&Apache::response::meta_package_write('imageresponse');
                     49:   }
                     50:   return $result;
1.1       albertel   51: }
                     52: 
                     53: sub end_imageresponse {
1.12      albertel   54:   &Apache::response::end_response;
                     55:   pop @Apache::lonxml::namespace;
1.15      albertel   56:   &Apache::lonxml::deregister('Apache::imageresponse',('foilgroup','foil','text','image','rectangle','conceptgroup'));
1.12      albertel   57:   return '';
1.1       albertel   58: }
                     59: 
1.20      albertel   60: %Apache::response::foilgroup=();
1.1       albertel   61: sub start_foilgroup {
1.20      albertel   62:   %Apache::response::foilgroup=();
1.12      albertel   63:   $Apache::imageresponse::conceptgroup=0;
                     64:   &Apache::response::setrandomnumber();
                     65:   return '';
1.1       albertel   66: }
                     67: 
1.2       albertel   68: sub getfoilcounts {
1.12      albertel   69:   my ($parstack,$safeeval)=@_;
                     70: 
                     71:   my $max = &Apache::lonxml::get_param('max',$parstack,$safeeval,'-2');
                     72:   # +1 since instructors will count from 1
                     73:   my $count = $#{ $Apache::response::foilgroup{'names'} }+1;
1.18      albertel   74:   if (&Apache::response::showallfoils()) { $max=$count; }
1.12      albertel   75:   return ($count,$max);
1.2       albertel   76: }
                     77: 
                     78: sub whichfoils {
1.12      albertel   79:   my ($max)=@_;
                     80:   if (!defined(@{ $Apache::response::foilgroup{'names'} })) { return; }
                     81:   my @names = @{ $Apache::response::foilgroup{'names'} };
                     82:   my @whichopt =();
                     83:   while ((($#whichopt+1) < $max) && ($#names > -1)) {
                     84:     &Apache::lonxml::debug("Have $#whichopt max is $max");
1.18      albertel   85:     my $aopt;
                     86:     if (&Apache::response::showallfoils()) {
                     87:       $aopt=0;
                     88:     } else {
1.22      albertel   89:       $aopt=int(&Math::Random::random_uniform() * ($#names+1));
1.18      albertel   90:     }
1.12      albertel   91:     &Apache::lonxml::debug("From $#names elms, picking $aopt");
                     92:     $aopt=splice(@names,$aopt,1);
                     93:     &Apache::lonxml::debug("Picked $aopt");
                     94:     push (@whichopt,$aopt);
                     95:   }
                     96:   return @whichopt;
1.2       albertel   97: }
                     98: 
                     99: sub displayfoils {
1.24      sakharuk  100:   my ($target,@whichopt) = @_;
1.12      albertel  101:   my $result ='';
                    102:   my $name;
                    103:   my $temp=1;
                    104:   foreach $name (@whichopt) {
1.24      sakharuk  105:     $result.=$Apache::response::foilgroup{"$name.text"};
                    106:     if ($target eq 'tex') {$result.="\\vskip 0 mm \n";} else {$result.="<br />\n";}
1.12      albertel  107:     my $image=$Apache::response::foilgroup{"$name.image"};
                    108:     if ($Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"} =~ /^correct/ ) {
1.24      sakharuk  109:       if ($target eq 'tex') {
                    110: 	$result.=$Apache::response::foilgroup{"$name.image"}."\\vskip 0 mm \n";
                    111:       } else {
                    112:         $result.="<img src=\"$image\"/> <br />\n";
                    113:       }
1.12      albertel  114:     } else {
1.24      sakharuk  115:       if ($target eq 'tex') {
                    116: 	$result.=$Apache::response::foilgroup{"$name.image"}."\\vskip 0 mm \n";
                    117:       } else {
                    118:         $result.="<input type=\"image\" name=\"HWVAL_$Apache::inputtags::response['-1']:$temp\" src=\"$image\"/> <br />\n";
                    119:       }
1.12      albertel  120:     }
                    121:     $temp++;
                    122:   }
                    123:   return $result;
1.2       albertel  124: }
                    125: 
1.3       albertel  126: sub gradefoils {
1.12      albertel  127:   my (@whichopt) = @_;
                    128:   my $x;
                    129:   my $y;
                    130:   my $result;
                    131:   my $id=$Apache::inputtags::response['-1'];
                    132:   my $temp=1;
                    133:   foreach my $name (@whichopt) {
                    134:     $x=$ENV{"form.HWVAL_$id:$temp.x"};
                    135:     $y=$ENV{"form.HWVAL_$id:$temp.y"};
                    136:     &Apache::lonxml::debug("Got a x of $x and a y of $y for $name");
                    137:     if (defined(@{ $Apache::response::foilgroup{"$name.area"} })) {
                    138:       my @areas = @{ $Apache::response::foilgroup{"$name.area"} };
                    139:       my $grade="INCORRECT";
                    140:       foreach my $area (@areas) {
                    141: 	&Apache::lonxml::debug("Area is $area for $name");
                    142: 	$area =~ m/([a-z]*):/;
                    143: 	&Apache::lonxml::debug("Area of type $1");
                    144: 	if ($1 eq 'rectangle') {
                    145: 	  $grade=&grade_rectangle($area,$x,$y);
                    146: 	} else {
                    147: 	  &Apache::lonxml::error("Unknown area style $area");
1.9       albertel  148: 	}
1.12      albertel  149: 	&Apache::lonxml::debug("Area said $grade");
                    150: 	if ($grade eq 'APPROX_ANS') { last; }
                    151:       }
                    152:       &Apache::lonxml::debug("Foil was $grade");
                    153:       if ($grade eq 'INCORRECT') { $result= 'INCORRECT'; }
                    154:       if (($grade eq 'APPROX_ANS') && ($result ne 'APPROX_ANS')) { $result=$grade; }
                    155:       &Apache::lonxml::debug("Question is $result");
                    156:       $temp++;
                    157:     }
                    158:   }
                    159:   $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.submission"}="$x:$y";
                    160:   $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.awarddetail"}=$result;
                    161:   return '';
1.3       albertel  162: }
                    163: 
1.1       albertel  164: sub end_foilgroup {
1.12      albertel  165:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                    166:   my $result='';
                    167:   my @whichopt;
1.24      sakharuk  168:   if ($target eq 'web' || $target eq 'grade' || $target eq 'tex') {
1.12      albertel  169:     my ($count,$max) = &getfoilcounts($parstack,$safeeval);
                    170:     if ($count>$max) { $count=$max }
                    171:     &Apache::lonxml::debug("Count is $count from $max");
                    172:     @whichopt = &whichfoils($max);
1.26      albertel  173:   } elsif ($target eq 'web' || $target eq 'tex') {
1.24      sakharuk  174:     $result=&displayfoils($target,@whichopt);
1.26      albertel  175:   } elsif ($target eq 'grade') {
1.12      albertel  176:     if ( defined $ENV{'form.submitted'}) {
                    177:       &gradefoils(@whichopt);
1.3       albertel  178:     }
1.26      albertel  179:   } elsif ($target eq 'edit') {
                    180:       $result=&Apache::edit::end_table();
1.12      albertel  181:   }
                    182:   return $result;
1.1       albertel  183: }
                    184: 
                    185: sub start_conceptgroup {
1.12      albertel  186:   $Apache::imageresponse::conceptgroup=1;
1.20      albertel  187:   %Apache::response::conceptgroup=();
1.12      albertel  188:   return '';
1.1       albertel  189: }
                    190: 
                    191: sub end_conceptgroup {
1.12      albertel  192:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
1.26      albertel  193:   $Apache::imageresponse::conceptgroup=0;
                    194:   my $result;
1.24      sakharuk  195:   if ($target eq 'web' || $target eq 'grade' || $target eq 'tex') {
1.12      albertel  196:     if (defined(@{ $Apache::response::conceptgroup{'names'} })) {
                    197:       my @names = @{ $Apache::response::conceptgroup{'names'} };
1.22      albertel  198:       my $pick=int(&Math::Random::random_uniform() * ($#names+1));
1.12      albertel  199:       my $name=$names[$pick];
                    200:       if (defined(@{ $Apache::response::conceptgroup{"$name.area"} })) {
                    201: 	push @{ $Apache::response::foilgroup{'names'} }, $name;
                    202: 	$Apache::response::foilgroup{"$name.text"} = $Apache::response::conceptgroup{"$name.text"};
                    203: 	$Apache::response::foilgroup{"$name.image"} = $Apache::response::conceptgroup{"$name.image"};
                    204: 	push(@{ $Apache::response::foilgroup{"$name.area"} }, @{ $Apache::response::conceptgroup{"$name.area"} });
                    205: 	my $concept = &Apache::lonxml::get_param('concept',$parstack,$safeeval);
                    206: 	$Apache::response::foilgroup{"$name.concept"} = $concept;
                    207: 	&Apache::lonxml::debug("Selecting $name in $concept");
                    208:       }
1.9       albertel  209:     }
1.26      albertel  210:   } elsif ($target eq 'edit') {
                    211:       $result=&Apache::edit::end_table();
1.12      albertel  212:   }
1.26      albertel  213:   return $result;
1.1       albertel  214: }
                    215: 
1.12      albertel  216: $Apache::imageresponse::curname='';
1.1       albertel  217: sub start_foil {
1.12      albertel  218:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
1.24      sakharuk  219:   if ($target eq 'web' || $target eq 'grade' || $target eq 'tex') {
1.12      albertel  220:     my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
                    221:     if ($name eq '') { $name=$Apache::lonxml::curdepth; }
1.18      albertel  222:     if ( $Apache::imageresponse::conceptgroup
                    223: 	 && !&Apache::response::showallfoils()) {
1.12      albertel  224:       push(@{ $Apache::response::conceptgroup{'names'} }, $name);
                    225:     } else {
                    226:       push(@{ $Apache::response::foilgroup{'names'} }, $name);
                    227:     }
                    228:     $Apache::imageresponse::curname=$name;
                    229:   }
                    230:   return '';
1.1       albertel  231: }
                    232: 
                    233: sub end_foil {
1.26      albertel  234:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                    235:     my $result;
                    236:     if ($target eq 'edit') {
                    237: 	$result=&Apache::edit::end_table();
                    238:     }
                    239:     return $result;
1.1       albertel  240: }
                    241: 
                    242: sub start_text {
1.12      albertel  243:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
1.25      www       244:   my $result='';
                    245:   if ($target eq 'web' || $target eq 'tex') { 
                    246:      &Apache::lonxml::startredirection; 
                    247:   } elsif ($target eq 'edit') {
1.26      albertel  248:     my $descr=&Apache::lonxml::get_all_text('/text',$parser);
1.25      www       249:     $result=&Apache::edit::tag_start($target,$token,'Task Description').
                    250: 	&Apache::edit::editfield($token->[1],$descr,'Text',60,2).
1.26      albertel  251:         &Apache::edit::end_row();
1.25      www       252:   } elsif ($target eq "modified") {
1.26      albertel  253:     my $descr=&Apache::lonxml::get_all_text('/text',$parser);
1.25      www       254:     $result=$token->[4].&Apache::edit::modifiedfield($token);
                    255:     &Apache::lonxml::debug($result);
                    256:   }
                    257:   return $result;
1.1       albertel  258: }
                    259: 
                    260: sub end_text {
1.12      albertel  261:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
1.26      albertel  262:   my $result;
1.24      sakharuk  263:   if ($target eq 'web' || $target eq 'tex') {
1.12      albertel  264:     my $name = $Apache::imageresponse::curname;
1.18      albertel  265:     if ( $Apache::imageresponse::conceptgroup
                    266:        && !&Apache::response::showallfoils() ) {
1.12      albertel  267:       $Apache::response::conceptgroup{"$name.text"} = &Apache::lonxml::endredirection;
                    268:     } else {
                    269:       $Apache::response::foilgroup{"$name.text"} = &Apache::lonxml::endredirection;
1.7       albertel  270:     }
1.26      albertel  271:   } elsif ($target eq 'edit') {
                    272:       $result=&Apache::edit::end_table();
1.12      albertel  273:   }
1.26      albertel  274:   return $result;
1.1       albertel  275: }
                    276: 
                    277: sub start_image {
1.12      albertel  278:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
1.25      www       279:   my $result='';
                    280:   if ($target eq 'web' || $target eq 'tex') { 
                    281:       &Apache::lonxml::startredirection; 
                    282:   } elsif ($target eq 'edit') {
1.26      albertel  283:     my $bgimg=&Apache::lonxml::get_all_text('/image',$parser);
1.27    ! www       284:     $Apache::edit::bgimgsrc=$bgimg;
        !           285:     $Apache::edit::bgimgsrcdepth=$Apache::lonxml::curdepth;
        !           286: 
1.25      www       287:     $result=&Apache::edit::tag_start($target,$token,'Clickable Image').
                    288: 	&Apache::edit::editline($token->[1],$bgimg,'Image Source File',40);
                    289:     $result.=&Apache::edit::browse(undef,'textnode').' ';
                    290:     $result.=&Apache::edit::search(undef,'textnode').
1.26      albertel  291:         &Apache::edit::end_row();
1.25      www       292:   } elsif ($target eq "modified") {
1.26      albertel  293:     my $bgimg=&Apache::lonxml::get_all_text('/image',$parser);
1.25      www       294:     $result=$token->[4].&Apache::edit::modifiedfield($token);
                    295:     &Apache::lonxml::debug($result);
                    296:   }
                    297:   return $result;
1.1       albertel  298: }
                    299: 
                    300: sub end_image {
1.26      albertel  301:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
                    302:   my $result;
1.24      sakharuk  303:   my $name = $Apache::imageresponse::curname;
1.12      albertel  304:   if ($target eq 'web') {
                    305:     my $image = &Apache::lonxml::endredirection;
                    306:     &Apache::lonxml::debug("out is $image");
1.18      albertel  307:     if ( $Apache::imageresponse::conceptgroup
                    308: 	 && !&Apache::response::showallfoils()) {
1.12      albertel  309:       $Apache::response::conceptgroup{"$name.image"} = $image;
                    310:     } else {
                    311:       $Apache::response::foilgroup{"$name.image"} = $image;
1.7       albertel  312:     }
1.26      albertel  313:   } elsif ($target eq 'edit') {
                    314:       $result=&Apache::edit::end_table();
1.19      sakharuk  315:   } elsif ($target eq 'tex') {
                    316:     my $src = &Apache::lonxml::endredirection;
                    317:     $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
                    318:     my $width_param = '';
                    319:     my $height_param = '';
                    320:     my $scaling = .3;
                    321:     my $image = Image::Magick->new;
                    322:     my $current_figure = $image->Read($src);
                    323:     $width_param = $image->Get('width') * $scaling;;
                    324:     $height_param = $image->Get('height') * $scaling;;
                    325:     undef $image;
                    326:     my $epssrc = $src;
                    327:     $epssrc =~ s/(\.gif|\.jpg)$/\.eps/i;
                    328:     if (not -e $epssrc) {
                    329: 	my $localfile = $epssrc;
                    330: 	$localfile =~ s/.*(\/res)/$1/;	
                    331: 	my $file;
                    332: 	my $path;	
                    333: 	if ($localfile =~ m!(.*)/([^/]*)$!) {
                    334: 	    $file = $2;
                    335: 	    $path = $1.'/'; 
                    336: 	}	
                    337: 	my $signal_eps = 0;
                    338: 	my @content_directory = &Apache::lonnet::dirlist($path);
                    339: 	for (my $iy=0;$iy<=$#content_directory;$iy++) {
                    340: 	    my @tempo_array = split(/&/,$content_directory[$iy]);
                    341: 	    $content_directory[$iy] = $tempo_array[0];
                    342: 	    if ($file eq $tempo_array[0]) {
                    343: 		$signal_eps = 1;
                    344: 		last;
                    345: 	    }
                    346: 	}
                    347: 	if ($signal_eps) {
                    348: 	    my $eps_file = &Apache::lonnet::getfile($localfile);
                    349: 	} else {
                    350: 	    $localfile = $src;
                    351: 	    $localfile =~ s/.*(\/res)/$1/;	
                    352: 	    my $as = &Apache::lonnet::getfile($src);		      
                    353: 	}
                    354:     }
                    355:     my $file;
                    356:     my $path;	
                    357:     if ($src =~ m!(.*)/([^/]*)$!) {
                    358: 	$file = $2;
                    359: 	$path = $1.'/'; 
                    360:     }
                    361:     my $newsrc = $src;
1.27    ! www       362:     $newsrc =~ s/(\.gif|\.jpg|\.jpeg)$/\.eps/i;
        !           363:     $file=~s/(\.gif|\.jpg|\.jpeg)$/\.eps/i;
1.19      sakharuk  364:     #do we have any specified size of the picture?
                    365:     my $TeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval); 
                    366:     my $TeXheight = &Apache::lonxml::get_param('TeXheight',$parstack,$safeeval); 
                    367:     my $width = &Apache::lonxml::get_param('width',$parstack,$safeeval);
                    368:     if ($TeXwidth ne '') { 
                    369: 	$width_param = $TeXwidth; 
                    370:     } elsif ($TeXheight ne '') { 
                    371: 	$width_param = $TeXheight/$height_param*$width_param;
                    372:     } elsif ($width ne '') {
                    373: 	$width_param = $width*$scaling;      
                    374:     }
                    375:     #where can we find the picture?
                    376:     if (-e $newsrc) {
                    377: 	if ($path) {
1.24      sakharuk  378: 	  $Apache::response::foilgroup{"$name.image"} ='\vskip 0 mm \noindent\graphicspath{{'.$path.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'} ';
1.19      sakharuk  379: 	}
                    380:     } else {
                    381: 	my $temp_file;
                    382: 	my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout.dat";
                    383: 	$temp_file = Apache::File->new('>>'.$filename); 
                    384: 	print $temp_file "$src\n";
1.24      sakharuk  385: $Apache::response::foilgroup{"$name.image"} ='\vskip 0 mm \graphicspath{{/home/httpd/prtspool/}}\includegraphics[width='.$width_param.' mm]{'.$file.'} ';
1.19      sakharuk  386:     }
1.24      sakharuk  387:   } 
1.26      albertel  388:   return $result;
1.1       albertel  389: }
                    390: 
                    391: sub start_rectangle {
1.12      albertel  392:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
1.25      www       393:   my $result='';
                    394:   if ($target eq 'web' || $target eq 'grade' || $target eq 'tex') { 
                    395:      &Apache::lonxml::startredirection; 
                    396:   } elsif ($target eq 'edit') {
1.26      albertel  397:     my $coords=&Apache::lonxml::get_all_text('/rectangle',$parser);
1.25      www       398:     $result=&Apache::edit::tag_start($target,$token,'Rectangle').
                    399: 	&Apache::edit::editline($token->[1],$coords,'Coordinate Pairs',40).
1.27    ! www       400:         &Apache::edit::entercoordpair(undef,'textnode').
1.26      albertel  401:         &Apache::edit::end_row();
1.25      www       402:   } elsif ($target eq "modified") {
1.26      albertel  403:     my $coords=&Apache::lonxml::get_all_text('/rectangle',$parser);
1.25      www       404:     $result=$token->[4].&Apache::edit::modifiedfield($token);
                    405:     &Apache::lonxml::debug($result);
                    406:   }
                    407:   return $result;
1.1       albertel  408: }
                    409: 
1.3       albertel  410: sub grade_rectangle {
1.12      albertel  411:   my ($spec,$x,$y) = @_;
                    412:   &Apache::lonxml::debug("Spec is $spec");
                    413:   $spec=~m/rectangle:\(([0-9]+),([0-9]+)\)\-\(([0-9]+),([0-9]+)\)/;
                    414:   my $x1=$1;
                    415:   my $y1=$2;
                    416:   my $x2=$3;
                    417:   my $y2=$4;
                    418:   &Apache::lonxml::debug("Point $x1,$y1,$x2,$y2");
                    419:   if ($x1 > $x2) { my $temp=$x1;$x1=$x2;$x2=$temp; }
                    420:   if ($y1 > $y2) { my $temp=$y1;$y1=$y2;$y2=$temp; }
1.17      albertel  421:   if (($x >= $x1) && ($x <= $x2) && ($y >= $y1) && ($y <= $y2)) {
                    422:     return 'APPROX_ANS';
                    423:   }
1.12      albertel  424:   return 'INCORRECT';
1.3       albertel  425: }
                    426: 
1.1       albertel  427: sub end_rectangle {
1.12      albertel  428:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
1.26      albertel  429:   my $result;
1.24      sakharuk  430:   if ($target eq 'web' || $target eq 'grade' || $target eq 'tex') {
1.12      albertel  431:     my $name = $Apache::imageresponse::curname;
                    432:     my $area = &Apache::lonxml::endredirection;
                    433:     &Apache::lonxml::debug("out is $area for $name");
1.18      albertel  434:     if ( $Apache::imageresponse::conceptgroup
                    435: 	 && !&Apache::response::showallfoils()) {
1.12      albertel  436:       push @{ $Apache::response::conceptgroup{"$name.area"} },"rectangle:$area";
                    437:     } else {
                    438:       push @{ $Apache::response::foilgroup{"$name.area"} },"rectangle:$area";
1.7       albertel  439:     }
1.26      albertel  440:   } elsif ($target eq 'edit') {
                    441:       $result=&Apache::edit::end_table();
1.12      albertel  442:   }
1.26      albertel  443:   return $result;
1.1       albertel  444: }
                    445: 1;
                    446: __END__
                    447:  

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>