version 1.19, 2001/06/27 18:51:59
|
version 1.24, 2001/09/13 19:55:02
|
Line 17 sub start_optionresponse {
|
Line 17 sub start_optionresponse {
|
push (@Apache::lonxml::namespace,'optionresponse'); |
push (@Apache::lonxml::namespace,'optionresponse'); |
my $id = &Apache::response::start_response($parstack,$safeeval); |
my $id = &Apache::response::start_response($parstack,$safeeval); |
if ($target eq 'edit') { |
if ($target eq 'edit') { |
$result.=&Apache::edit::start_table($token)."<tr><td>Multiple Option Response Question</td> |
$result.=&Apache::edit::start_table($token). |
<td>Delete:". |
"<tr><td>Multiple Option Response Question</td><td>Delete:". |
&Apache::edit::deletelist($target,$token) |
&Apache::edit::deletelist($target,$token) |
."</td><td> </td></tr><tr><td colspan=\"3\">\n"; |
."</td><td> </td></tr><tr><td colspan=\"3\">\n"; |
$result.=&Apache::edit::text_arg('Max Number Of Foils:','max',$token,'4')."</td></tr>"; |
$result.=&Apache::edit::text_arg('Max Number Of Foils:','max',$token,'4'). |
|
"</td></tr>"; |
$result.="<tr><td colspan=\"3\">\n"; |
$result.="<tr><td colspan=\"3\">\n"; |
} |
} |
if ($target eq 'modified') { |
if ($target eq 'modified') { |
my $constructtag=&Apache::edit::get_new_args($token,$parstack,$safeeval,'max'); |
my $constructtag=&Apache::edit::get_new_args($token,$parstack, |
|
$safeeval,'max'); |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
} |
} |
|
if ($target eq 'meta') { |
|
$result=&Apache::response::meta_package_write('optionresponse'); |
|
} |
return $result; |
return $result; |
} |
} |
|
|
Line 192 sub displayfoils {
|
Line 197 sub displayfoils {
|
foreach $option (@opt) { |
foreach $option (@opt) { |
$optionlist.="<option>$option</option>\n"; |
$optionlist.="<option>$option</option>\n"; |
} |
} |
if ($Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"} =~ /^correct/ ) { |
if (($Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"} =~ /^correct/) || ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER')) { |
foreach $name (@whichopt) { |
foreach $name (@whichopt) { |
$result.="<br />".$Apache::response::foilgroup{$name.'.value'}. |
$result.="<br />".$Apache::response::foilgroup{$name.'.value'}. |
":".$Apache::response::foilgroup{$name.'.text'}."\n"; |
":".$Apache::response::foilgroup{$name.'.text'}."\n"; |
Line 266 sub start_foil {
|
Line 271 sub start_foil {
|
if ($$tagstack['-2'] eq 'conceptgroup') { $level = '-3'; } |
if ($$tagstack['-2'] eq 'conceptgroup') { $level = '-3'; } |
my @opt; |
my @opt; |
eval '@opt ='.&Apache::lonxml::get_param('options',$parstack,$safeeval,$level); |
eval '@opt ='.&Apache::lonxml::get_param('options',$parstack,$safeeval,$level); |
$result.=&Apache::edit::text_arg('Name:','name',$token). |
$result.=&Apache::edit::text_arg('Name:','name',$token); |
&Apache::edit::select_arg('Correct Option:','value',['unused',(@opt)],$token). |
$result.= &Apache::edit::select_or_text_arg('Correct Option:','value',['unused',(@opt)],$token,'15'); |
'</td></tr><tr><td colspan="3">'; |
$result .= '</td></tr><tr><td colspan="3">'; |
} |
} |
if ($target eq 'modified') { |
if ($target eq 'modified') { |
my $constructtag=&Apache::edit::get_new_args($token,$parstack,$safeeval,'value','name'); |
my $constructtag=&Apache::edit::get_new_args($token,$parstack,$safeeval,'value','name'); |