--- loncom/homework/response.pm 2015/02/23 19:46:19 1.241 +++ 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.241 2015/02/23 19:46:19 raeburn Exp $ +# $Id: response.pm,v 1.242 2015/03/07 23:05:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -595,17 +595,36 @@ sub edit_mathresponse_button { $eqneditor = 'dragmath'; } } elsif ($env{'browser.type'} eq 'mozilla') { - if ($env{'browser.version'} < 3) { + if ($env{'browser.version'} < 4) { $eqneditor = 'dragmath'; } else { if ($env{'browser.info'} =~ /^firefox\-([\d\.]+)/) { my $firefox = $1; - if ($firefox < 3) { + if ($firefox < 4) { $eqneditor = 'dragmath'; } } } } + if ($eqneditor eq 'lcmath') { + if (($env{'request.course.id'}) && ($env{'request.state'} ne 'construct')) { + if (exists($env{'course.'.$env{'request.course.id'}.'.uselcmath'})) { + if ($env{'course.'.$env{'request.course.id'}.'.uselcmath'} eq '0') { + $eqneditor = 'dragmath'; + } + } else { + my %domdefs = &Apache::lonnet::get_domain_defaults($env{'course.'.$env{'request.course.id'}.'.domain'}); + if ($domdefs{'uselcmath'} eq '0') { + $eqneditor = 'dragmath'; + } + } + } else { + my %domdefs = &Apache::lonnet::get_domain_defaults($env{'course.'.$env{'request.course.id'}.'.domain'}); + if ($domdefs{'uselcmath'} eq '0') { + $eqneditor = 'dragmath'; + } + } + } if ($eqneditor eq 'dragmath') { # DragMath applet my $button=&mt('Edit Answer');