version 1.94, 2003/10/27 20:04:34
|
version 1.98, 2004/01/14 22:08:22
|
Line 43 sub start_optionresponse {
|
Line 43 sub start_optionresponse {
|
%Apache::hint::option=(); |
%Apache::hint::option=(); |
if ($target eq 'edit') { |
if ($target eq 'edit') { |
$result.=&Apache::edit::start_table($token). |
$result.=&Apache::edit::start_table($token). |
"<tr><td>Multiple Option Response Question</td><td>Delete:". |
"<tr><td>Multiple Option Response Question ". |
|
&Apache::loncommon::help_open_topic('Option_Response_Problems')."</td><td>Delete:". |
&Apache::edit::deletelist($target,$token) |
&Apache::edit::deletelist($target,$token) |
."</td><td> ". |
."</td><td> ". |
&Apache::edit::end_row(). |
&Apache::edit::end_row(). |
Line 184 sub end_foilgroup {
|
Line 185 sub end_foilgroup {
|
if ($ENV{'form.submitted'} eq 'scantron') { |
if ($ENV{'form.submitted'} eq 'scantron') { |
$response = $opt[$response]; |
$response = $opt[$response]; |
} |
} |
$responsehash{$name}=$response; |
|
if ( $response =~ /[^\s]/) { |
if ( $response =~ /[^\s]/) { |
|
$responsehash{$name}=$response; |
my $value=$Apache::response::foilgroup{$name.'.value'}; |
my $value=$Apache::response::foilgroup{$name.'.value'}; |
&Apache::lonxml::debug("submitted a $response for $value<br />\n"); |
&Apache::lonxml::debug("submitted a $response for $value<br />\n"); |
if ($value eq $response) { |
if ($value eq $response) { |
Line 318 sub displayfoils {
|
Line 319 sub displayfoils {
|
} else { |
} else { |
$text=$value.': '.$text; |
$text=$value.': '.$text; |
} |
} |
|
} else { |
|
$text='•'.$text; |
} |
} |
$result.=$text."\n"; |
$result.=$text."\n"; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
Line 367 sub displayfoils {
|
Line 370 sub displayfoils {
|
my $text=$Apache::response::foilgroup{$name.'.text'}; |
my $text=$Apache::response::foilgroup{$name.'.text'}; |
if (!($text=~s|<drawoptionlist\s*/>|$optionlist|) && $Apache::lonhomework::type ne 'exam') { |
if (!($text=~s|<drawoptionlist\s*/>|$optionlist|) && $Apache::lonhomework::type ne 'exam') { |
$text=$optionlist.$text; |
$text=$optionlist.$text; |
|
} else { |
|
$text='•'.$text; |
} |
} |
$result.=$break.$text."\n"; |
$result.=$break.$text."\n"; |
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |
Line 441 sub optionlist_correction {
|
Line 446 sub optionlist_correction {
|
$texoptionlist =~ s/>/\$>\$/g; |
$texoptionlist =~ s/>/\$>\$/g; |
$texoptionlist =~ s/</\$<\$/g; |
$texoptionlist =~ s/</\$<\$/g; |
$texoptionlist =~ s/=/\$=\$/g; |
$texoptionlist =~ s/=/\$=\$/g; |
$texoptionlist =~ s/\^(\d+)/<m>\$$1\$<\/m>/g; |
$texoptionlist =~ s/\^(\d+)/\$^{$1}\$/g; |
} else { |
} else { |
$texoptionlist =~ s/<option><\/option>/\\item \[\] \\vskip -5 mm/; |
$texoptionlist =~ s/<option><\/option>/\\item \[\] \\vskip -5 mm/; |
} |
} |