Diff for /loncom/homework/inputtags.pm between versions 1.307 and 1.309

version 1.307, 2012/08/21 18:24:28 version 1.309, 2012/09/14 11:23:58
Line 197  sub start_textfield { Line 197  sub start_textfield {
     if ($addchars) {      if ($addchars) {
  $result.=&addchars('HWVAL_'.$resid,$addchars);   $result.=&addchars('HWVAL_'.$resid,$addchars);
     }      }
             my $textareaclass = 'class="LC_richDetectHtml"';              my $textareaclass = 'class="LC_richDetectHtml spellchecked"';
     $result.= '<textarea wrap="hard" name="HWVAL_'.$resid.'" id="HWVAL_'.$resid.'" '.      $result.= '<textarea wrap="hard" name="HWVAL_'.$resid.'" id="HWVAL_'.$resid.'" ' .
       'rows="'.$rows.'" cols="'.$cols.'" '.$textareaclass.'>'.        'rows="'.$rows.'" cols="'.$cols.'" '.$textareaclass
         . "onblur='\$(this).spellchecker(\"check\")'"
         .'>'.
                       &HTML::Entities::encode($oldresponse,'<>&"');                        &HTML::Entities::encode($oldresponse,'<>&"');
     if ($oldresponse ne '') {      if ($oldresponse ne '') {
   
Line 251  sub start_textfield { Line 253  sub start_textfield {
     for (my $i=0;$i<int $number_of_lines*2;$i++) {$result.='\strut \\\\ ';}      for (my $i=0;$i<int $number_of_lines*2;$i++) {$result.='\strut \\\\ ';}
     $result.='\strut \\\\\strut \\\\\strut \\\\\strut \\\\}}}';      $result.='\strut \\\\\strut \\\\\strut \\\\\strut \\\\}}}';
  } else {   } else {
     my $TeXwidth=$width_of_box/80;      my $fieldname = $env{'request.symb'}.
     $result = '\vskip 1 mm \fbox{\fbox{\parbox{'.$TeXwidth.'\textwidth-5mm}{';                      '&part_'. $Apache::inputtags::part.
     for (my $i=0;$i<int $number_of_lines*2;$i++) {$result.='\strut \\\\ ';}                      '&textresponse'.
     $result.='}}}\vskip 2 mm ';                      '&HWVAL_' . $Apache::inputtags::response['-1'];
               $result.='\TextField[name='.$fieldname.',multiline=true,height=6\baselineskip,width=270,borderwidth=0,backgroundcolor={.85
                   .85 .85}]\\';
  }   }
     }      }
     return $result;      return $result;
Line 381  sub start_textline { Line 385  sub start_textline {
     $name = "none";      $name = "none";
  }   }
  $result.= '<input onkeydown="javascript:setSubmittedPart(\''.$partid.'\');" type="text" '.$readonly.' name="'.$name.'" value="'.   $result.= '<input onkeydown="javascript:setSubmittedPart(\''.$partid.'\');" type="text" '.$readonly.' name="'.$name.'" value="'.
     $oldresponse.'" size="'.$size.'"'.$maxlength.' />';      $oldresponse.'" class="spellchecked"  size="'.$size.'"'.$maxlength.'
                       onblur=' . "'\$(this).spellchecker(\"check\")'"  . '/>';
     }      }
     if ($Apache::lonhomework::type eq 'exam'      if ($Apache::lonhomework::type eq 'exam'
  && &needs_exam_box($tagstack)) {   && &needs_exam_box($tagstack)) {

Removed from v.1.307  
changed lines
  Added in v.1.309


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