Diff for /loncom/homework/imageresponse.pm between versions 1.75 and 1.78

version 1.75, 2006/03/09 01:33:57 version 1.78, 2006/05/30 12:45:37
Line 37  use Apache::londefdef(); Line 37  use Apache::londefdef();
 use Apache::Constants qw(:common :http);  use Apache::Constants qw(:common :http);
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonnet;  use Apache::lonnet;
   use lib '/home/httpd/lib/perl/';
   use LONCAPA;
    
   
 BEGIN {  BEGIN {
     &Apache::lonxml::register('Apache::imageresponse',('imageresponse'));      &Apache::lonxml::register('Apache::imageresponse',('imageresponse'));
Line 70  sub end_imageresponse { Line 73  sub end_imageresponse {
     my $result;      my $result;
     if ($target eq 'edit') {      if ($target eq 'edit') {
  $result=&Apache::edit::end_table();   $result=&Apache::edit::end_table();
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex'
        && $Apache::lonhomework::type eq 'exam') {
  $result=&Apache::inputtags::exam_score_line($target);   $result=&Apache::inputtags::exam_score_line($target);
     }      }
   
Line 130  sub prep_image { Line 134  sub prep_image {
     my $respid=$Apache::inputtags::response['-1'];      my $respid=$Apache::inputtags::response['-1'];
     my $id=&Apache::loncommon::get_cgi_id();      my $id=&Apache::loncommon::get_cgi_id();
     my (%x,$i);      my (%x,$i);
     $x{"cgi.$id.BGIMG"}=&Apache::lonnet::escape($image);      $x{"cgi.$id.BGIMG"}=&escape($image);
     my ($x,$y)=split(/:/,$Apache::lonhomework::history{"resource.$part.$respid.submission"});      my ($x,$y)=split(/:/,$Apache::lonhomework::history{"resource.$part.$respid.submission"});
     #draws 2 xs on the image at the clicked location      #draws 2 xs on the image at the clicked location
     #one in white and then one in red on top of the one in white      #one in white and then one in red on top of the one in white
Line 347  sub end_foilgroup { Line 351  sub end_foilgroup {
  } elsif ( $target eq 'analyze') {   } elsif ( $target eq 'analyze') {
     &Apache::response::analyze_store_foilgroup(\@whichopt,      &Apache::response::analyze_store_foilgroup(\@whichopt,
       ['text','image','area']);        ['text','image','area']);
  } elsif ($target eq 'answer') {   } elsif ($target eq 'answer'
    && $env{'form.answer_output_mode'} ne 'tex') {
     $result=&display_answers($target,\@whichopt);      $result=&display_answers($target,\@whichopt);
  }   }
   

Removed from v.1.75  
changed lines
  Added in v.1.78


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