--- loncom/homework/functionplotresponse.pm 2013/12/17 00:33:42 1.105 +++ loncom/homework/functionplotresponse.pm 2024/06/30 20:15:19 1.105.2.4 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # Functionplot responses # -# $Id: functionplotresponse.pm,v 1.105 2013/12/17 00:33:42 raeburn Exp $ +# $Id: functionplotresponse.pm,v 1.105.2.4 2024/06/30 20:15:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -56,11 +56,8 @@ sub useHTML5 { } elsif ($env{'browser.type'} eq 'safari') { if ($env{'browser.os'} eq 'mac') { my ($prefix,$version) = ($env{'browser.version'} =~ /^(\d*)(\d{3})\./); - if ((!$env{'browser.mobile'}) || - (($env{'browser.mobile'}) && length($prefix))) { - if ($version >= 536) { - return 1; - } + if ($version >= 536) { + return 1; } } } elsif ($env{'browser.type'} eq 'mozilla') { @@ -76,6 +73,10 @@ sub useHTML5 { if (($env{'browser.os'} eq 'win') && ($env{'browser.version'} >= 10)) { return 1; } + } elsif ($env{'browser.type'} eq 'opera') { + if ($env{'browser.version'} >= 18) { + return 1; + } } return 0; } @@ -158,9 +159,11 @@ sub html5_geogebra_startcode { unless ($height) { $height=400; } my $code=&geogebra_internal_program(); return (<
+data-param-useBrowserForJS="true" data-param-ggbbase64="$code"> +
ENDSTARTCODE } @@ -1456,7 +1459,7 @@ sub start_functionplotresponse { my $ylabel=&Apache::lonxml::get_param('ylabel',$parstack,$safeeval); if ($target eq 'edit') { $result.=&Apache::edit::start_table($token) - .''.&mt('Function Plot Question').'' + .''.&Apache::loncommon::insert_folding_button().&mt('Function Plot Question').'' .''.&mt('Delete?').' ' .&Apache::edit::deletelist($target,$token).'   ' .&Apache::edit::insertlist($target,$token).'   ' @@ -2043,7 +2046,7 @@ sub start_functionplotruleset { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; if ($target eq 'edit') { return &Apache::edit::start_table($token). - ''.&mt('Function Plot Rule Set').'' + ''.&Apache::loncommon::insert_folding_button().&mt('Function Plot Rule Set').'' .''.&mt('Delete?').' ' .&Apache::edit::deletelist($target,$token).'   '. &Apache::edit::insertlist($target,$token).'   ' @@ -2236,7 +2239,8 @@ sub start_functionplotelements { if ($target eq 'edit') { return &Apache::edit::start_table($token). - ''.&mt('Function Plot Elements').'' + ''.&Apache::loncommon::insert_folding_button() + .&mt('Function Plot Elements').'' .''.&mt('Delete?').' ' .&Apache::edit::deletelist($target,$token).'   '. &Apache::edit::insertlist($target,$token).'   '