version 1.16, 2002/03/06 20:41:17
|
version 1.18, 2002/03/08 18:31:27
|
Line 86 sub start_randomlabel {
|
Line 86 sub start_randomlabel {
|
my $codebase = &Apache::lonxml::get_param('codebase',$parstack,$safeeval); |
my $codebase = &Apache::lonxml::get_param('codebase',$parstack,$safeeval); |
my $w= &Apache::lonxml::get_param('width',$parstack,$safeeval); |
my $w= &Apache::lonxml::get_param('width',$parstack,$safeeval); |
my $h= &Apache::lonxml::get_param('height',$parstack,$safeeval); |
my $h= &Apache::lonxml::get_param('height',$parstack,$safeeval); |
$Apache::randomlabel::ratio = $h/$w; |
$Apache::randomlabel::ratio = ($w > 0 ? $h/$w : 1 ); |
my $texwidth= &Apache::lonxml::get_param('texwidth',$parstack,$safeeval); |
my $texwidth= &Apache::lonxml::get_param('texwidth',$parstack,$safeeval); |
if (!$code) { $code='GLabel.class'; } |
if (!$code) { $code='GLabel.class'; } |
if (!$codebase) { $codebase='/res/adm/includes/'; } |
if (!$codebase) { $codebase='/res/adm/includes/'; } |
Line 102 sub start_randomlabel {
|
Line 102 sub start_randomlabel {
|
$bgimg.'}\setlength{\unitlength}{1mm} \begin{picture}('.$texwidth.','.$texwidth*$h/$w.')' |
$bgimg.'}\setlength{\unitlength}{1mm} \begin{picture}('.$texwidth.','.$texwidth*$h/$w.')' |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::text_arg('Image:','bgimg',$token,75); |
$result.=&Apache::edit::text_arg('Image:','bgimg',$token,75).' '; |
$result.=&Apache::edit::browse('bgimg').'<br />'. |
$result.=&Apache::edit::browse('bgimg').' '; |
|
$result.=&Apache::edit::search('bgimg').'<br />'. |
&Apache::edit::text_arg('Width(pixel):' ,'width' ,$token,6). |
&Apache::edit::text_arg('Width(pixel):' ,'width' ,$token,6). |
&Apache::edit::text_arg('Height(pixel):','height' ,$token,6). |
&Apache::edit::text_arg('Height(pixel):','height' ,$token,6). |
&Apache::edit::text_arg('TeXWidth(mm):' ,'texwidth',$token,6). |
&Apache::edit::text_arg('TeXWidth(mm):' ,'texwidth',$token,6). |