version 1.41, 2002/05/03 20:13:14
|
version 1.42, 2002/07/17 18:06:18
|
Line 29
|
Line 29
|
|
|
package Apache::radiobuttonresponse; |
package Apache::radiobuttonresponse; |
use strict; |
use strict; |
|
use HTML::Entities(); |
|
|
BEGIN { |
BEGIN { |
&Apache::lonxml::register('Apache::radiobuttonresponse',('radiobuttonresponse')); |
&Apache::lonxml::register('Apache::radiobuttonresponse',('radiobuttonresponse')); |
Line 217 sub whichfoils {
|
Line 218 sub whichfoils {
|
push (@falselist,$name); |
push (@falselist,$name); |
} elsif ($Apache::response::foilgroup{$name.'.value'} eq 'unused') { |
} elsif ($Apache::response::foilgroup{$name.'.value'} eq 'unused') { |
} else { |
} else { |
&Apache::lonxml::error(&HTML::Entites::encode("No valid value assigned ($Apache::response::foilgroup{$name.'.value'}) for foil $name in <foilgroup>")); |
&Apache::lonxml::error(&HTML::Entities::encode("No valid value assigned ($Apache::response::foilgroup{$name.'.value'}) for foil $name in <foilgroup>")); |
} |
} |
} |
} |
my $whichtrue = int(rand($#truelist+1)); |
my $whichtrue = int(rand($#truelist+1)); |
Line 341 sub start_foil {
|
Line 342 sub start_foil {
|
} 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('Name:','name',$token); |
$result.=&Apache::edit::text_arg('Name:','name',$token); |
$result.=&Apache::edit::select_arg('Correct Option:','value', |
$result.=&Apache::edit::select_or_text_arg('Correct Option:','value', |
['unused','true','false'],$token); |
['unused','true','false'],$token); |
$result.=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); |
$result.=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); |
} elsif ($target eq 'modified') { |
} elsif ($target eq 'modified') { |