version 1.63, 2003/09/08 21:22:15
|
version 1.67, 2003/10/08 16:46:38
|
Line 67 sub tag_start {
|
Line 67 sub tag_start {
|
#<td>". |
#<td>". |
# &movebuttons($target,$token). |
# &movebuttons($target,$token). |
# "</tr><tr><td colspan=\"3\">\n"; |
# "</tr><tr><td colspan=\"3\">\n"; |
my @help;# = Apache::lonxml::helpinfo($token); |
my @help = Apache::lonxml::helpinfo($token); |
if ($help[0]) { |
if ($help[0]) { |
$result .= '<td align="right" valign="top">' . |
$result .= '<td align="right" valign="top">' . |
Apache::loncommon::help_open_topic(@help) . |
Apache::loncommon::help_open_topic(@help) . |
Line 283 sub insert_formularesponse {
|
Line 283 sub insert_formularesponse {
|
<formularesponse answer="" samples=""> |
<formularesponse answer="" samples=""> |
<textline /> |
<textline /> |
<hintgroup> |
<hintgroup> |
|
<startouttext/> |
|
<endouttext /> |
</hintgroup> |
</hintgroup> |
</formularesponse>'; |
</formularesponse>'; |
} |
} |
Line 292 sub insert_numericalresponse {
|
Line 294 sub insert_numericalresponse {
|
<numericalresponse answer=""> |
<numericalresponse answer=""> |
<textline /> |
<textline /> |
<hintgroup> |
<hintgroup> |
|
<startouttext/> |
|
<endouttext /> |
</hintgroup> |
</hintgroup> |
</numericalresponse>'; |
</numericalresponse>'; |
} |
} |
Line 301 sub insert_stringresponse {
|
Line 305 sub insert_stringresponse {
|
<stringresponse answer="" type=""> |
<stringresponse answer="" type=""> |
<textline /> |
<textline /> |
<hintgroup> |
<hintgroup> |
|
<startouttext/> |
|
<endouttext /> |
</hintgroup> |
</hintgroup> |
</stringresponse>'; |
</stringresponse>'; |
} |
} |
Line 318 sub insert_imageresponse {
|
Line 324 sub insert_imageresponse {
|
<foilgroup> |
<foilgroup> |
</foilgroup> |
</foilgroup> |
<hintgroup> |
<hintgroup> |
|
<startouttext/> |
|
<endouttext /> |
</hintgroup> |
</hintgroup> |
</imageresponse>'; |
</imageresponse>'; |
} |
} |
Line 328 sub insert_optionresponse {
|
Line 336 sub insert_optionresponse {
|
<foilgroup options=""> |
<foilgroup options=""> |
</foilgroup> |
</foilgroup> |
<hintgroup> |
<hintgroup> |
|
<startouttext/> |
|
<endouttext /> |
</hintgroup> |
</hintgroup> |
</optionresponse>'; |
</optionresponse>'; |
} |
} |
Line 338 sub insert_radiobuttonresponse {
|
Line 348 sub insert_radiobuttonresponse {
|
<foilgroup> |
<foilgroup> |
</foilgroup> |
</foilgroup> |
<hintgroup> |
<hintgroup> |
|
<startouttext/> |
|
<endouttext /> |
</hintgroup> |
</hintgroup> |
</radiobuttonresponse>'; |
</radiobuttonresponse>'; |
} |
} |
Line 348 sub insert_rankresponse {
|
Line 360 sub insert_rankresponse {
|
<foilgroup options=""> |
<foilgroup options=""> |
</foilgroup> |
</foilgroup> |
<hintgroup> |
<hintgroup> |
|
<startouttext/> |
|
<endouttext /> |
</hintgroup> |
</hintgroup> |
</rankresponse>'; |
</rankresponse>'; |
} |
} |
Line 360 sub insert_matchresponse {
|
Line 374 sub insert_matchresponse {
|
</itemgroup> |
</itemgroup> |
</foilgroup> |
</foilgroup> |
<hintgroup> |
<hintgroup> |
|
<startouttext/> |
|
<endouttext /> |
</hintgroup> |
</hintgroup> |
</matchresponse>'; |
</matchresponse>'; |
} |
} |
Line 374 sub insert_hintpart {
|
Line 390 sub insert_hintpart {
|
</hintpart>'; |
</hintpart>'; |
} |
} |
|
|
|
sub insert_hintgroup { |
|
return ' |
|
<hintgroup> |
|
<startouttext/> |
|
<endouttext /> |
|
</hintgroup>'; |
|
} |
|
|
sub insert_numericalhint { |
sub insert_numericalhint { |
return ' |
return ' |
<numericalhint> |
<numericalhint> |
Line 569 sub select_arg {
|
Line 593 sub select_arg {
|
my $optionlist=""; |
my $optionlist=""; |
my $selected=$token->[2]{$name}; |
my $selected=$token->[2]{$name}; |
foreach my $option (@$list) { |
foreach my $option (@$list) { |
my $value; |
my ($text,$value); |
if ( ref($option) eq 'ARRAY') { |
if ( ref($option) eq 'ARRAY') { |
$value='value="'.$$option[0].'"'; |
$value='value="'.$$option[0].'"'; |
$option=$$option[1]; |
$text=$$option[1]; |
|
$option=$$option[0]; |
} else { |
} else { |
|
$text=$option; |
$value='value="'.$option.'"'; |
$value='value="'.$option.'"'; |
} |
} |
if ( $selected eq $option ) { |
if ( $selected eq $option ) { |
$optionlist.="<option $value selected=\"on\">$option</option>\n"; |
$optionlist.="<option $value selected=\"on\">$text</option>\n"; |
} else { |
} else { |
$optionlist.="<option $value >$option</option>\n"; |
$optionlist.="<option $value >$text</option>\n"; |
} |
} |
} |
} |
$result.='<nobr>'.$description.' <select name="'. |
$result.='<nobr>'.$description.' <select name="'. |
Line 596 sub select_or_text_arg {
|
Line 622 sub select_or_text_arg {
|
my $found=0; |
my $found=0; |
my $selected=$token->[2]{$name}; |
my $selected=$token->[2]{$name}; |
foreach my $option (@$list) { |
foreach my $option (@$list) { |
my $value; |
my ($text,$value); |
if ( ref($option) eq 'ARRAY') { |
if ( ref($option) eq 'ARRAY') { |
$value='value="'.$$option[0].'"'; |
$value='value="'.$$option[0].'"'; |
$option=$$option[1]; |
$text=$$option[1]; |
|
$option=$$option[0]; |
} else { |
} else { |
|
$text=$option; |
$value='value="'.$option.'"'; |
$value='value="'.$option.'"'; |
} |
} |
if ( $selected eq $option ) { |
if ( $selected eq $option ) { |
$optionlist.="<option $value selected=\"on\">$option</option>\n"; |
$optionlist.="<option $value selected=\"on\">$text</option>\n"; |
$found=1; |
$found=1; |
} else { |
} else { |
$optionlist.="<option $value>$option</option>\n"; |
$optionlist.="<option $value>$text</option>\n"; |
} |
} |
} |
} |
$optionlist.="<option value=\"TYPEDINVALUE\"". |
$optionlist.="<option value=\"TYPEDINVALUE\"". |