Diff for /loncom/homework/response.pm between versions 1.199 and 1.205

version 1.199, 2008/09/04 22:47:19 version 1.205, 2008/09/23 19:15:57
Line 486  sub start_mathresponse { Line 486  sub start_mathresponse {
    $safeeval);     $safeeval);
     $Apache::inputtags::answertxt{$id}=[$answer];      $Apache::inputtags::answertxt{$id}=[$answer];
  }   }
         if ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER') {  
             $result.=&edit_mathresponse_button($id,"HWVAL_$id");  
         }  
   
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
  $result.=&Apache::edit::tag_start($target,$token);   $result.=&Apache::edit::tag_start($target,$token);
Line 523  sub start_mathresponse { Line 520  sub start_mathresponse {
 sub edit_mathresponse_button {  sub edit_mathresponse_button {
     my ($id,$field)=@_;      my ($id,$field)=@_;
     my $button=&mt('Edit Answer');      my $button=&mt('Edit Answer');
     my $helplink=&Apache::loncommon::help_open_topic('Formula_Editor');  #    my $helplink=&Apache::loncommon::help_open_topic('Formula_Editor');
     my $iconpath=$Apache::lonnet::perlvar{'lonIconsURL'};      my $iconpath=$Apache::lonnet::perlvar{'lonIconsURL'};
     return(<<ENDFORMULABUTTON);      return(<<ENDFORMULABUTTON);
 <script language="JavaScript">  <script language="JavaScript">
Line 533  function edit_${id}_${field} (textarea) Line 530  function edit_${id}_${field} (textarea)
     newwin = window.open("/adm/dragmath/applet/MaximaPopup.html","","width=565,height=400,resizable");      newwin = window.open("/adm/dragmath/applet/MaximaPopup.html","","width=565,height=400,resizable");
 }  }
 </script>  </script>
 <a href="javascript:edit_${id}_${field}('${field}');void(0);"><img class="stift" src='$iconpath/stift.gif' alt='$button' /></a>$helplink  <a href="javascript:edit_${id}_${field}('${field}');void(0);"><img class="stift" src='$iconpath/stift.gif' alt='$button' title='$button'/></a>
 ENDFORMULABUTTON  ENDFORMULABUTTON
 }  }
   
Line 575  sub end_mathresponse { Line 572  sub end_mathresponse {
     }      }
     if ($target eq 'web') {      if ($target eq 'web') {
  &setup_prior_tries_hash(\&format_prior_response_math);   &setup_prior_tries_hash(\&format_prior_response_math);
           my $partid = $Apache::inputtags::part;
           my $id = $Apache::inputtags::response[-1];
           if (($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')
              && (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffeditor') ne 'yes')) {
               $result.=&edit_mathresponse_button($id,"HWVAL_$id");
           }
     }      }
   
     pop(@Apache::lonxml::namespace);      pop(@Apache::lonxml::namespace);
Line 1189  sub submitted { Line 1192  sub submitted {
     }      }
     # Submit All button on a .page was pressed      # Submit All button on a .page was pressed
     if (defined($env{'form.all_submit'})) { return 1; }      if (defined($env{'form.all_submit'})) { return 1; }
     # otherwise no submission occured      # otherwise no submission occurred
     return 0;      return 0;
 }  }
   

Removed from v.1.199  
changed lines
  Added in v.1.205


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