Diff for /loncom/imspackages/imsexport.pm between versions 1.10 and 1.11

version 1.10, 2012/05/07 02:12:54 version 1.11, 2013/11/12 04:54:57
Line 673  sub simpleproblem  { Line 673  sub simpleproblem  {
                 %values = &evaloptionhash($options);                  %values = &evaloptionhash($options);
                 $output .= qq|                  $output .= qq|
 <problem>  <problem>
     <startouttext />$qtext<endouttext />
   <optionresponse max="$maxfoils" randomize="$randomize">    <optionresponse max="$maxfoils" randomize="$randomize">
     <foilgroup options="$options">      <foilgroup options="$options">
 |;  |;
Line 701  sub simpleproblem  { Line 702  sub simpleproblem  {
             } else {              } else {
                 $output .= qq|                  $output .= qq|
 <problem>  <problem>
     <startouttext />$qtext<endouttext />
   <radiobuttonresponse max="$maxfoils" randomize="$randomize">    <radiobuttonresponse max="$maxfoils" randomize="$randomize">
    <foilgroup>    <foilgroup>
 |;  |;
                 for (my $k=0; $k<10; $k++) {                  for (my $k=0; $k<10; $k++) {
                     my $iter = $k+1;                      my $iter = $k+1;
Line 727  sub simpleproblem  { Line 729  sub simpleproblem  {
 </problem>  </problem>
 |;  |;
             }              }
         } elsif ($qtype eq 'stringanswer') {          } elsif ($qtype eq 'string') {
             my $stringanswer = $qparms{$prefix.'stringanswer'};              my $stringanswer = $qparms{$prefix.'stringanswer'};
             my $stringtype=$qparms{$prefix.'stringtype'};              my $stringtype=$qparms{$prefix.'stringtype'};
             $output .= qq|              $output .= qq|
 <problem>  <problem>
   <stringresponse answer="$stringanswer" type="$stringtype">    <stringresponse answer="$stringanswer" type="$stringtype">
     <textline>    <startouttext />$qtext<endouttext />
     </textline>      <textline />
             |;              |;
             if ($hint) {              if ($hint) {
                 $output .= '                  $output .= '
Line 748  sub simpleproblem  { Line 750  sub simpleproblem  {
   </stringresponse>    </stringresponse>
 </problem>  </problem>
 |;  |;
           } elsif ($qtype eq 'numerical') {
               my $sigfigs = $qparms{$prefix.'numericalsigfigs'};
               my $unit = $qparms{$prefix.'numericalunit'};
               my $answer = $qparms{$prefix.'numericalanswer'};
               my $tolerance = $qparms{$prefix.'numericaltolerance'};
               my $format = $qparms{$prefix.'numericalformat'};
               my $scriptblock = $qparms{$prefix.'numericalscript'};
               $output .= qq|
   <problem>
   |;
               if ($scriptblock) {
                   $output .= qq|
   <script type="loncapa/perl">
   $scriptblock
   </script>|;
                }
                $output .= qq|
   <startouttext />$qtext<endouttext />
   <numericalresponse answer="$answer" |;
                if ($unit ne '') {
                    $output .= qq|unit="$unit" |;
                }
                if ($format ne '') {
                    $output .= qq|format="$format" |;
                }
                $output =~ s{ $}{};
                $output .= '>';
                if ($tolerance ne '') {
                    $output .= qq|
     <responseparam name="tol" type="tolerance" default="$tolerance" description="Numerical Tolerance" />|;
                }
                if ($sigfigs) {
                    $output .= qq|
     <responseparam name="sig" type="int_range" default="$sigfigs" description="Significant Digits" />|;
                }
                $output .= qq|
     <textline />|;
               if ($hint) {
                   $output .= qq|
     <hintgroup>
       <hintpart on="default">
         <startouttext />'.$hint.'<endouttext/>
       </hintpart>
     </hintgroup>|;
               }
               $output .= qq|
   </numericalresponse>
   </problem>
   |;
         } else {          } else {
             $output .= qq|              $output .= qq|
 <problem>  <problem>

Removed from v.1.10  
changed lines
  Added in v.1.11


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