version 1.49, 2003/05/06 11:54:08
|
version 1.54, 2003/06/09 22:42:49
|
Line 310 sub insert_essayresponse {
|
Line 310 sub insert_essayresponse {
|
</essayresponse>'; |
</essayresponse>'; |
} |
} |
|
|
|
sub insert_imageresponse { |
|
return ' |
|
<imageresponse max="1"> |
|
<foilgroup> |
|
</foilgroup> |
|
<hintgroup> |
|
</hintgroup> |
|
</imageresponse>'; |
|
} |
|
|
sub insert_optionresponse { |
sub insert_optionresponse { |
return ' |
return ' |
<optionresponse max="10"> |
<optionresponse max="10"> |
Line 386 sub insert_radiobuttonhint {
|
Line 396 sub insert_radiobuttonhint {
|
</radiobuttonhint>'; |
</radiobuttonhint>'; |
} |
} |
|
|
|
sub insert_optionhint { |
|
return ' |
|
<optionhint> |
|
</optionhint>'; |
|
} |
|
|
sub insert_startouttext { |
sub insert_startouttext { |
return "<startouttext />\n<endouttext />"; |
return "<startouttext />\n<endouttext />"; |
} |
} |
Line 398 sub textarea_sizes {
|
Line 414 sub textarea_sizes {
|
my ($data)=@_; |
my ($data)=@_; |
my $count=0; |
my $count=0; |
my $maxlength=-1; |
my $maxlength=-1; |
foreach (split ("\n", $$data)) { $count++; |
foreach (split ("\n", $$data)) { |
if (length($_) > $maxlength) { $maxlength = length($_); } |
$count+=int(length($_)/79); |
} |
$count++; |
|
if (length($_) > $maxlength) { $maxlength = length($_); } |
|
} |
my $rows = $count; |
my $rows = $count; |
my $cols = $maxlength; |
my $cols = $maxlength; |
return ($rows,$cols); |
return ($rows,$cols); |
Line 454 sub get_new_args {
|
Line 472 sub get_new_args {
|
my $element=&html_element_name($arg); |
my $element=&html_element_name($arg); |
my $newvalue=$ENV{"form.$element"}; |
my $newvalue=$ENV{"form.$element"}; |
&Apache::lonxml::debug(" for:$arg: cur is :$value: new is :$newvalue:"); |
&Apache::lonxml::debug(" for:$arg: cur is :$value: new is :$newvalue:"); |
if ($value ne $newvalue) { |
if (defined($newvalue) && $value ne $newvalue) { |
$token->[2]->{$arg}=$newvalue; |
$token->[2]->{$arg}=$newvalue; |
$rebuild=1; |
$rebuild=1; |
} |
} |
Line 621 sub entercoordpair {
|
Line 639 sub entercoordpair {
|
$formwidth='&formwidth='.$width.'_'.$Apache::edit::bgimgsrccurdepth; |
$formwidth='&formwidth='.$width.'_'.$Apache::edit::bgimgsrccurdepth; |
} |
} |
my $result = <<"ENDBUTTON"; |
my $result = <<"ENDBUTTON"; |
<a href="/cgi-bin/imagechoice.pl?mode=pair&formname=$form&file=$bgfile$formheight$formwidth" |
<a href="/cgi-bin/imagechoice.pl?mode=pair&formname=$form&file=$bgfile$formheight$formwidth&formcoord=$element" |
target="imagechoice">Click Coordinate Pair</a> |
target="imagechoice">Click Coordinate Pair</a> |
ENDBUTTON |
ENDBUTTON |
return $result; |
return $result; |