Diff for /loncom/homework/optionresponse.pm between versions 1.125 and 1.126

version 1.125, 2005/04/07 06:56:22 version 1.126, 2005/06/07 01:33:19
Line 165  sub end_foilgroup { Line 165  sub end_foilgroup {
     my $name;      my $name;
     my @opt;      my @opt;
     eval '@opt ='.&Apache::lonxml::get_param('options',$parstack,$safeeval);      eval '@opt ='.&Apache::lonxml::get_param('options',$parstack,$safeeval);
       &Apache::lonxml::debug("options:".join(':',@opt));
   
     my $TeXlayout=&Apache::lonxml::get_param('TeXlayout',$parstack,$safeeval,      my $TeXlayout=&Apache::lonxml::get_param('TeXlayout',$parstack,$safeeval,
      -2,0);       -2,0);
     if ($target eq 'tex' && $tex_option_switch eq 'nochoice') {@opt=();}      if ($target eq 'tex' && $tex_option_switch eq 'nochoice') {@opt=();}
Line 385  sub displayfoils { Line 387  sub displayfoils {
       }        }
       my $lastopt=$lastresponse{$name};        my $lastopt=$lastresponse{$name};
       my $optionlist="<option></option>\n";        my $optionlist="<option></option>\n";
       my $option;        foreach my $option (@opt) {
       foreach $option (@opt) {    my $escopt=&HTML::Entities::encode($option,'\'"&<>');
  if ($option eq $lastopt) {    if ($option eq $lastopt) {
   $optionlist.="<option selected=\"on\">$option</option>\n";        $optionlist.="<option value='".$escopt."' selected=\"on\">$option</option>\n";
  } else {    } else {
   $optionlist.="<option>$option</option>\n";        $optionlist.="<option value='".$escopt."'>$option</option>\n";
  }    }
       }        }
       if ($target ne 'tex') {        if ($target ne 'tex') {
   if ($Apache::lonhomework::type ne 'exam') {    if ($Apache::lonhomework::type ne 'exam') {

Removed from v.1.125  
changed lines
  Added in v.1.126


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