version 1.59, 2002/11/10 15:51:31
|
version 1.60, 2002/11/11 15:58:51
|
Line 375 sub displayfoils {
|
Line 375 sub displayfoils {
|
} |
} |
$temp++; |
$temp++; |
} else { |
} else { |
|
my $texoptionlist = &optionlist_correction($optionlist); |
if ($displayoptionintex == 0) { |
if ($displayoptionintex == 0) { |
my $texoptionlist = &optionlist_correction($optionlist); |
if ($Apache::lonhomework::type eq 'exam') {$texoptionlist='';} #if exam we do not need to show optionlist |
if ($Apache::lonhomework::type eq 'exam') {$texoptionlist='';} |
|
if ($Apache::response::foilgroup{$name.'.text'}=~m/\\item /) { |
if ($Apache::response::foilgroup{$name.'.text'}=~m/\\item /) { |
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |
$Apache::response::foilgroup{$name.'.text'}=~s/\\item/\\item[\\textbf{$Apache::lonxml::counter}\.]/; |
$Apache::response::foilgroup{$name.'.text'}=~s/\\item/\\item[\\textbf{$Apache::lonxml::counter}\.]/; |
} |
} |
$result.= $texoptionlist.$Apache::response::foilgroup{$name.'.text'}; |
if ($Apache::response::foilgroup{$name.'.text'}=~/<drawoptionlist\s*\/>/) { |
|
$texoptionlist = &texoptionlist_correction($texoptionlist); |
|
$Apache::response::foilgroup{$name.'.text'}=~s|<drawoptionlist\s*/>|$texoptionlist|; |
|
$result.= $Apache::response::foilgroup{$name.'.text'}; |
|
} else { |
|
$result.= $texoptionlist.$Apache::response::foilgroup{$name.'.text'}; |
|
} |
} else { |
} else { |
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |
$result.= $texoptionlist.'\vspace*{-2 mm}\item[\textbf{'.$Apache::lonxml::counter.'}.]'.$Apache::response::foilgroup{$name.'.text'}; |
$result.= $texoptionlist.'\vspace*{-2 mm}\item[\textbf{'.$Apache::lonxml::counter.'}.]'.$Apache::response::foilgroup{$name.'.text'}; |
Line 399 sub displayfoils {
|
Line 405 sub displayfoils {
|
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |
$Apache::response::foilgroup{$name.'.text'}=~s/\\item/\\item[\\textbf{$Apache::lonxml::counter}\.]/; |
$Apache::response::foilgroup{$name.'.text'}=~s/\\item/\\item[\\textbf{$Apache::lonxml::counter}\.]/; |
} |
} |
$result.= $Apache::response::foilgroup{$name.'.text'}; |
if ($Apache::response::foilgroup{$name.'.text'}=~/<drawoptionlist\s*\/>/) { |
|
$texoptionlist = &texoptionlist_correction($texoptionlist); |
|
$Apache::response::foilgroup{$name.'.text'}=~s|<drawoptionlist\s*/>|$texoptionlist|; |
|
} |
|
$result.= $Apache::response::foilgroup{$name.'.text'}; |
} else { |
} else { |
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |
$result.= '\item[\textbf{'.$Apache::lonxml::counter.'}.]'.$Apache::response::foilgroup{$name.'.text'}; |
$result.= '\item[\textbf{'.$Apache::lonxml::counter.'}.]'.$Apache::response::foilgroup{$name.'.text'}; |
Line 437 sub optionlist_correction {
|
Line 447 sub optionlist_correction {
|
return $texoptionlist; |
return $texoptionlist; |
} |
} |
|
|
|
|
|
sub texoptionlist_correction { |
|
my $texoptionlist = shift; |
|
$texoptionlist =~ s/\\item \[\] Possible answers are:\s*/\\fbox\{/; |
|
$texoptionlist =~ s/\.$/}/; |
|
return $texoptionlist; |
|
} |
|
|
|
|
sub webbubbles { |
sub webbubbles { |
|
|