version 1.39, 2002/05/03 19:32:57
|
version 1.43, 2002/07/18 15:45:41
|
Line 63 sub start_optionresponse {
|
Line 63 sub start_optionresponse {
|
my $part_id="$Apache::inputtags::part.$Apache::inputtags::response[-1]"; |
my $part_id="$Apache::inputtags::part.$Apache::inputtags::response[-1]"; |
push (@{ $Apache::lonhomework::analyze{"parts"} },$part_id); |
push (@{ $Apache::lonhomework::analyze{"parts"} },$part_id); |
} |
} |
# if ($target eq 'tex') {$result .= '\begin{enumerate}';} |
|
return $result; |
return $result; |
} |
} |
|
|
Line 74 sub end_optionresponse {
|
Line 73 sub end_optionresponse {
|
&Apache::lonxml::deregister('Apache::optionresponse',('foilgroup','foil','conceptgroup')); |
&Apache::lonxml::deregister('Apache::optionresponse',('foilgroup','foil','conceptgroup')); |
my $result; |
my $result; |
if ($target eq 'edit') { $result=&Apache::edit::end_table(); } |
if ($target eq 'edit') { $result=&Apache::edit::end_table(); } |
# if ($target eq 'tex') {$result .= '\end{enumerate}';} |
|
return $result; |
return $result; |
} |
} |
|
|
Line 132 ENDTABLE
|
Line 130 ENDTABLE
|
if ($optchanged) { |
if ($optchanged) { |
$result = "<foilgroup options=\"("; |
$result = "<foilgroup options=\"("; |
foreach my $option (@options) { |
foreach my $option (@options) { |
$option=~s/\'/\\\'/; |
$option=~s/\'/\\\'/g; |
&Apache::lonxml::debug("adding option :$option:"); |
&Apache::lonxml::debug("adding option :$option:"); |
$result .="'".$option."',"; |
$result .="'".$option."',"; |
} |
} |
Line 140 ENDTABLE
|
Line 138 ENDTABLE
|
$result.=')">'; |
$result.=')">'; |
} # else nothing changed so just use the default mechanism |
} # else nothing changed so just use the default mechanism |
} |
} |
if ($target eq 'tex') {$result .= '\begin{enumerate}';} |
if ($target eq 'tex') { |
|
$result .= ' \begin{enumerate} '; |
|
} |
return $result; |
return $result; |
} |
} |
|
|
Line 281 sub displayfoils {
|
Line 281 sub displayfoils {
|
foreach $name (@whichopt) { |
foreach $name (@whichopt) { |
if ($target eq 'web') { |
if ($target eq 'web') { |
$result.="<br />"; |
$result.="<br />"; |
} elsif ($target eq 'tex') { |
|
$result.='\newline'; |
|
} |
} |
$result .=$Apache::response::foilgroup{$name.'.value'}. |
$result .=$Apache::response::foilgroup{$name.'.value'}. |
":".$Apache::response::foilgroup{$name.'.text'}."\n"; |
":".$Apache::response::foilgroup{$name.'.text'}."\n"; |
Line 313 sub displayfoils {
|
Line 311 sub displayfoils {
|
$durtyoptionlist =~ s/<option>/{\\bf /g; |
$durtyoptionlist =~ s/<option>/{\\bf /g; |
$durtyoptionlist =~ s/<\/option>/},/g; |
$durtyoptionlist =~ s/<\/option>/},/g; |
$durtyoptionlist =~ s/,$/\./g; |
$durtyoptionlist =~ s/,$/\./g; |
$result.= $durtyoptionlist.$Apache::response::foilgroup{$name.'.text'}; |
$durtyoptionlist =~ s/>/\$>\$/g; |
|
$durtyoptionlist =~ s/</\$<\$/g; |
|
$durtyoptionlist =~ s/=/\$=\$/g; |
|
$result.= $durtyoptionlist.'\item '.$Apache::response::foilgroup{$name.'.text'}; |
$Apache::optionresponse::displayoptionintex=1; |
$Apache::optionresponse::displayoptionintex=1; |
} else { |
} else { |
$result.= $Apache::response::foilgroup{$name.'.text'}; |
$result.= '\item '.$Apache::response::foilgroup{$name.'.text'}; |
} |
} |
} |
} |
} |
} |
Line 411 sub start_foil {
|
Line 412 sub start_foil {
|
my $constructtag=&Apache::edit::get_new_args($token,$parstack,$safeeval,'value','name'); |
my $constructtag=&Apache::edit::get_new_args($token,$parstack,$safeeval,'value','name'); |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
} |
} |
if ($target eq 'tex') {$result .= '\item ';} |
|
return $result; |
return $result; |
} |
} |
|
|
Line 437 sub end_foil {
|
Line 437 sub end_foil {
|
$Apache::response::conceptgroup{"$name.text"} = $text; |
$Apache::response::conceptgroup{"$name.text"} = $text; |
} else { |
} else { |
push @{ $Apache::response::foilgroup{'names'} }, $name; |
push @{ $Apache::response::foilgroup{'names'} }, $name; |
$Apache::response::foilgroup{"$name.value"} = $value; |
if ($target eq 'tex') { |
|
$Apache::response::foilgroup{"$name.value"} = '\item '.$value; |
|
} else { |
|
$Apache::response::foilgroup{"$name.value"} = $value; |
|
} |
$Apache::response::foilgroup{"$name.text"} = $text; |
$Apache::response::foilgroup{"$name.text"} = $text; |
} |
} |
} |
} |