version 1.75, 2006/03/09 01:33:57
|
version 1.79, 2006/11/06 11:56:23
|
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); |
} |
} |
|
|
Line 539 sub end_image {
|
Line 544 sub end_image {
|
$graphinclude =~ s/^$commentline//; |
$graphinclude =~ s/^$commentline//; |
} else { |
} else { |
my ($path,$file) = &Apache::londefdef::get_eps_image($src); |
my ($path,$file) = &Apache::londefdef::get_eps_image($src); |
|
$file =~ s/\ /\_/g; |
my ($height_param,$width_param)= |
my ($height_param,$width_param)= |
&Apache::londefdef::image_size($src,0.3,$parstack,$safeeval); |
&Apache::londefdef::image_size($src,0.3,$parstack,$safeeval); |
$graphinclude = '\graphicspath{{'.$path.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'}'; |
$graphinclude = '\graphicspath{{'.$path.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'}'; |