Diff for /loncom/homework/optionresponse.pm between versions 1.41 and 1.42

version 1.41, 2002/06/21 20:36:30 version 1.42, 2002/07/16 21:02:29
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 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} ';
         my $option_list = &Apache::lonxml::get_param('options',$parstack,$safeeval);
         $option_list =~ s/^\(//;
         $option_list =~ s/\)$//;
         $result .= ' \item[] Use the following options: \textbf{'.$option_list.'}. ';
     }
   return $result;    return $result;
 }  }
   
Line 281  sub displayfoils { Line 285  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 414  sub start_foil { Line 416  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 440  sub end_foil { Line 441  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;
       }        }
     }      }

Removed from v.1.41  
changed lines
  Added in v.1.42


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>