Diff for /loncom/homework/response.pm between versions 1.213 and 1.215

version 1.213, 2009/03/16 18:20:22 version 1.215, 2009/05/04 16:45:44
Line 54  use strict; Line 54  use strict;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::lonmaxima();  use Apache::lonmaxima();
   use Apache::lonr();
   
 BEGIN {  BEGIN {
     &Apache::lonxml::register('Apache::response',('responseparam','parameter','dataresponse','customresponse','mathresponse'));      &Apache::lonxml::register('Apache::response',('responseparam','parameter','dataresponse','customresponse','mathresponse'));
Line 508  sub start_mathresponse { Line 509  sub start_mathresponse {
  'answerdisplay',$token);   'answerdisplay',$token);
  $result.=&Apache::edit::select_arg('Algebra System:',   $result.=&Apache::edit::select_arg('Algebra System:',
    'cas',     'cas',
    ['maxima'],     ['maxima','R'],
    $token);     $token);
  $result.=&Apache::edit::text_arg('Argument Array:',   $result.=&Apache::edit::text_arg('Argument Array:',
  'args',$token).   'args',$token).
Line 545  function edit_${id}_${field} (textarea) Line 546  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' title='$button'/></a>  <a href="javascript:edit_${id}_${field}('${field}');void(0);"><img class="stift" src="$iconpath/stift.gif" alt="$button" title="$button" /></a>
 ENDFORMULABUTTON  ENDFORMULABUTTON
 }  }
   
Line 572  sub end_mathresponse { Line 573  sub end_mathresponse {
                 $award=&Apache::lonmaxima::maxima_run($Apache::response::custom_answer[-1],$response,$args,                  $award=&Apache::lonmaxima::maxima_run($Apache::response::custom_answer[-1],$response,$args,
                                                       &Apache::lonxml::get_param('libraries',$parstack,$safeeval));                                                        &Apache::lonxml::get_param('libraries',$parstack,$safeeval));
             }              }
               if ($cas eq 'R') {
                   my $args = [&Apache::lonxml::get_param_var('args',$parstack,$safeeval)];
                   $award=&Apache::lonr::r_run($Apache::response::custom_answer[-1],$response,$args,
                                               &Apache::lonxml::get_param('libraries',$parstack,$safeeval));
               }
   
     if (!&Apache::inputtags::valid_award($award)) {      if (!&Apache::inputtags::valid_award($award)) {
  $error = $award;   $error = $award;
  $award = 'ERROR';   $award = 'ERROR';

Removed from v.1.213  
changed lines
  Added in v.1.215


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