--- loncom/homework/response.pm 2015/02/23 19:46:19 1.241 +++ loncom/homework/response.pm 2015/03/09 16:19:54 1.243 @@ -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.243 2015/03/09 16:19:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -586,7 +586,11 @@ sub edit_mathresponse_button { if (($version < 531) || (($prefix eq '') && ($version < 533))) { $eqneditor = ''; } - } elsif ($version < 522) { + } elsif ($version < 533) { + $eqneditor = 'dragmath'; + } + } elsif ($env{'browser.os'} eq 'win') { + if ($env{'browser.version'} < 533) { $eqneditor = 'dragmath'; } } @@ -595,15 +599,42 @@ sub edit_mathresponse_button { $eqneditor = 'dragmath'; } } elsif ($env{'browser.type'} eq 'mozilla') { - if ($env{'browser.version'} < 3) { + if ($env{'browser.version'} < 5) { $eqneditor = 'dragmath'; } else { if ($env{'browser.info'} =~ /^firefox\-([\d\.]+)/) { my $firefox = $1; - if ($firefox < 3) { + if ($firefox < 4) { + $eqneditor = 'dragmath'; + } + } + } + } elsif ($env{'browser.type'} eq 'chrome') { + if ($env{'browser.version'} < 5) { + $eqneditor = 'dragmath'; + } + } elsif ($env{'browser.type'} eq 'opera') { + if ($env{'browser.version'} < 12) { + $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') {