--- loncom/homework/response.pm 2014/12/30 20:03:10 1.238 +++ loncom/homework/response.pm 2015/03/07 23:05:57 1.242 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.238 2014/12/30 20:03:10 raeburn Exp $ +# $Id: response.pm,v 1.242 2015/03/07 23:05:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -181,7 +181,6 @@ sub setrandomnumber { } else { ($rndmod,$rndmod2)=&Apache::lonnet::digest("$id1,$id2"); } - $Apache::lonhomework::results{'resource.'.$id1.'.rawrndseed'}=$rndseed; if ($rndseed =~/([,:])/) { my $char=$1; use integer; @@ -198,7 +197,6 @@ sub setrandomnumber { } } &Apache::lonxml::debug("randseed $rndmod $rndseed"); - $Apache::lonhomework::results{'resource.'.$id1.'.rndseed'}=$rndseed; &Apache::lonnet::setup_random_from_rndseed($rndseed); return ''; } @@ -580,15 +578,59 @@ sub start_mathresponse { sub edit_mathresponse_button { my ($partid,$id)=@_; my $field = 'HWVAL_'.$partid.'_'.$id; - my $btype = $env{'browser.type'}; - my $bversion = $env{'browser.version'}; - if (($btype eq 'explorer' && $bversion < 9) || ($btype eq 'safari' && $bversion < 3) || - ($btype eq 'mozilla' && $bversion < 3)) { - # DragMath applet - my $button=&mt('Edit Answer'); -# my $helplink=&Apache::loncommon::help_open_topic('Formula_Editor'); - my $iconpath=$Apache::lonnet::perlvar{'lonIconsURL'}; - return(< function LC_mathedit_${field} (LCtextline) { thenumber = LCtextline; @@ -601,8 +643,7 @@ function LC_mathedit_${field} (LCtextlin $button ENDFORMULABUTTON - - } else { + } elsif ($eqneditor eq 'lcmath') { # LON-CAPA math equation editor my $mathjaxjs; unless (lc(&Apache::lontexconvert::tex_engine()) eq 'mathjax') { @@ -617,6 +658,7 @@ MATHJAX_SCRIPT