version 1.74, 2007/10/08 09:22:50
|
version 1.78, 2008/03/12 02:46:52
|
Line 186 sub jme_img {
|
Line 186 sub jme_img {
|
my $result='<img alt="'.$smile.'" src="/cgi-bin/convertjme.pl?'.$id.'"'; |
my $result='<img alt="'.$smile.'" src="/cgi-bin/convertjme.pl?'.$id.'"'; |
if ($options =~ /border/) { $result.= ' border="1"'; } |
if ($options =~ /border/) { $result.= ' border="1"'; } |
$result.=' />'; |
$result.=' />'; |
&Apache::lonnet::appenv('cgi.'.$id.'.JME' => |
&Apache::lonnet::appenv({'cgi.'.$id.'.JME' => |
&escape($jme), |
&escape($jme), |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.WIDTH' => $width); |
'cgi.'.$id.'.WIDTH' => $width}); |
return $result; |
return $result; |
} |
} |
|
|
Line 334 sub end_organicresponse {
|
Line 334 sub end_organicresponse {
|
|
|
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
$target eq 'tex' || $target eq 'analyze') { |
$target eq 'tex' || $target eq 'analyze') { |
&Apache::lonxml::increment_counter(&Apache::response::repetition(), $partid); |
&Apache::lonxml::increment_counter(&Apache::response::repetition(), |
|
"$partid.$id"); # part.response |
if ($target eq 'analyze') { |
if ($target eq 'analyze') { |
|
$Apache::lonhomework::analyze{"$partid.$id.type"} = 'organicresponse'; |
&Apache::lonhomework::set_bubble_lines(); |
&Apache::lonhomework::set_bubble_lines(); |
} |
} |
} |
} |
Line 363 sub start_organicstructure {
|
Line 365 sub start_organicstructure {
|
if ($options =~ /border/) { $result.= ' border="1"'; } |
if ($options =~ /border/) { $result.= ' border="1"'; } |
$result.=' />'; |
$result.=' />'; |
&Apache::lonnet::appenv( |
&Apache::lonnet::appenv( |
'cgi.'.$id.'.JME' => &escape($molecule), |
{'cgi.'.$id.'.JME' => &escape($molecule), |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.WIDTH' => $width ); |
'cgi.'.$id.'.WIDTH' => $width}); |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval,undef,1); |
my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval,undef,1); |
my $webwidth=&Apache::lonxml::get_param('width', $parstack, $safeeval); |
my $webwidth=&Apache::lonxml::get_param('width', $parstack, $safeeval); |
Line 379 sub start_organicstructure {
|
Line 381 sub start_organicstructure {
|
'_'.time.'_'.$$.int(rand(1000)).'_organicstructure'; |
'_'.time.'_'.$$.int(rand(1000)).'_organicstructure'; |
my $id=$filename; |
my $id=$filename; |
&Apache::lonnet::appenv( |
&Apache::lonnet::appenv( |
'cgi.'.$id.'.JME' => &escape($molecule), |
{'cgi.'.$id.'.JME' => &escape($molecule), |
'cgi.'.$id.'.PS' => 1, |
'cgi.'.$id.'.PS' => 1, |
'cgi.'.$id.'.WIDTH' => $texwidth ); |
'cgi.'.$id.'.WIDTH' => $texwidth}); |
$id=&escape($id); |
$id=&escape($id); |
&Apache::lonxml::register_ssi("/cgi-bin/convertjme.pl?$id"); |
&Apache::lonxml::register_ssi("/cgi-bin/convertjme.pl?$id"); |
if ($options =~ /border/) { $result.= '\fbox{'; } |
if ($options =~ /border/) { $result.= '\fbox{'; } |
Line 563 sub end_reactionresponse {
|
Line 565 sub end_reactionresponse {
|
|
|
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
$target eq 'tex' || $target eq 'analyze') { |
$target eq 'tex' || $target eq 'analyze') { |
&Apache::lonxml::increment_counter(&Apache::response::repetition(), $partid); |
&Apache::lonxml::increment_counter(&Apache::response::repetition(), "$partid.$id"); |
|
if ($target eq 'analyze') { |
|
$Apache::lonhomework::analyze{"$partid.$id.type"} = 'reactionresponse'; |
|
&Apache::lonhomework::set_bubble_lines(); |
|
} |
} |
} |
&Apache::response::end_response(); |
&Apache::response::end_response(); |
return $result; |
return $result; |