Diff for /loncom/homework/functionplotresponse.pm between versions 1.49 and 1.54

version 1.49, 2010/12/03 00:52:59 version 1.54, 2011/01/28 16:25:03
Line 108  sub init_script { Line 108  sub init_script {
           $script.="if (param=='applet_$id') { loaded_$id=true; }\n";            $script.="if (param=='applet_$id') { loaded_$id=true; }\n";
       }        }
       $script.="if (".join(' && ',map { "loaded_$_" } (@Apache::functionplotresponse::callscripts)).        $script.="if (".join(' && ',map { "loaded_$_" } (@Apache::functionplotresponse::callscripts)).
                ") { setTimeout('ggbInitAll()',20) }";                 ") { setTimeout('ggbInitAll()',200) }";
       my $calls=join("\n",map { "ggbInit_$_();" } (@Apache::functionplotresponse::callscripts));         my $calls=join("\n",map { "ggbInit_$_();" } (@Apache::functionplotresponse::callscripts)); 
       return (<<ENDGGBINIT);        return (<<ENDGGBINIT);
 <script type="text/javascript">  <script type="text/javascript">
Line 184  sub set_slope_coordinate { Line 184  sub set_slope_coordinate {
    my $mult=($fixed?'a*':'');     my $mult=($fixed?'a*':'');
    return (<<ENDSETSVARIABLE);     return (<<ENDSETSVARIABLE);
 document.ggbApplet_$id.evalCommand("a=1");  document.ggbApplet_$id.evalCommand("a=1");
 document.ggbApplet_$id.evalCommand("$xvariable=Slider[0,$domain,$xinterval]");  document.ggbApplet_$id.evalCommand("$xvariable=Slider[$xinterval,$domain,$xinterval]");
 document.ggbApplet_$id.setVisible("$xvariable", false);  document.ggbApplet_$id.setVisible("$xvariable", false);
 document.ggbApplet_$id.evalCommand("$xvariable=$xrel");  document.ggbApplet_$id.evalCommand("$xvariable=$xrel");
 document.ggbApplet_$id.evalCommand("$yvariable=Slider[-$range,$range,$yinterval]");  document.ggbApplet_$id.evalCommand("$yvariable=Slider[-$range,$range,$yinterval]");
Line 536  sub start_functionplotrule { Line 536  sub start_functionplotrule {
                                      $token,'8').                                       $token,'8').
              &Apache::edit::end_row();               &Apache::edit::end_row();
   } elsif ($target eq 'modified') {    } elsif ($target eq 'modified') {
       if (($env{'form.'.&Apache::edit::html_element_name('xinitial')} ne '') && ($env{'form.'.&Apache::edit::html_element_name('xinitiallabel')} eq 'start')) {
          $env{'form.'.&Apache::edit::html_element_name('xinitiallabel')}='';
       }
       if (($env{'form.'.&Apache::edit::html_element_name('xfinal')} ne '') && ($env{'form.'.&Apache::edit::html_element_name('xfinallabel')} eq 'end')) {
          $env{'form.'.&Apache::edit::html_element_name('xfinallabel')}='';
       }
     my $constructtag=&Apache::edit::get_new_args($token,$parstack,      my $constructtag=&Apache::edit::get_new_args($token,$parstack,
                                                  $safeeval,'index','derivativeorder',                                                   $safeeval,'index','derivativeorder',
                                                            'xinitial','xinitiallabel','xfinal','xfinallabel',                                                             'xinitial','xinitiallabel','xfinal','xfinallabel',
Line 816  sub start_functionplotresponse { Line 822  sub start_functionplotresponse {
        .'<tr><td><span class="LC_nobreak">'.&mt('Function Plot Question').'</span></td>'         .'<tr><td><span class="LC_nobreak">'.&mt('Function Plot Question').'</span></td>'
        .'<td><span class="LC_nobreak">'.&mt('Delete?').' '         .'<td><span class="LC_nobreak">'.&mt('Delete?').' '
        .&Apache::edit::deletelist($target,$token).'&nbsp;&nbsp;&nbsp;'         .&Apache::edit::deletelist($target,$token).'&nbsp;&nbsp;&nbsp;'
        .&Apache::edit::insertlist($target,$token)         .&Apache::edit::insertlist($target,$token).'&nbsp;&nbsp;&nbsp;'
          .&Apache::loncommon::help_open_topic('Function_Plot_Response_Question','Function Plot Responses')
        .'</span></td>'         .'</span></td>'
        ."<td>&nbsp;"         ."<td>&nbsp;"
        .&Apache::edit::end_row()         .&Apache::edit::end_row()
Line 1100  sub start_functionplotruleset { Line 1107  sub start_functionplotruleset {
         '<tr><td><span class="LC_nobreak">'.&mt('Function Plot Rule Set').'</span></td>'          '<tr><td><span class="LC_nobreak">'.&mt('Function Plot Rule Set').'</span></td>'
        .'<td><span class="LC_nobreak">'.&mt('Delete?').' '         .'<td><span class="LC_nobreak">'.&mt('Delete?').' '
        .&Apache::edit::deletelist($target,$token).'&nbsp;&nbsp;&nbsp;'.         .&Apache::edit::deletelist($target,$token).'&nbsp;&nbsp;&nbsp;'.
         &Apache::edit::insertlist($target,$token)          &Apache::edit::insertlist($target,$token).'&nbsp;&nbsp;&nbsp;'
          .&Apache::loncommon::help_open_topic('Function_Plot_Response_Rule_Set','Function Plot Rules')
        .'</span></td>'         .'</span></td>'
        ."<td>&nbsp;"         ."<td>&nbsp;"
        .&Apache::edit::end_row()         .&Apache::edit::end_row()
Line 1278  sub start_functionplotelements { Line 1286  sub start_functionplotelements {
         '<tr><td><span class="LC_nobreak">'.&mt('Function Plot Elements').'</span></td>'          '<tr><td><span class="LC_nobreak">'.&mt('Function Plot Elements').'</span></td>'
        .'<td><span class="LC_nobreak">'.&mt('Delete?').' '         .'<td><span class="LC_nobreak">'.&mt('Delete?').' '
        .&Apache::edit::deletelist($target,$token).'&nbsp;&nbsp;&nbsp;'.         .&Apache::edit::deletelist($target,$token).'&nbsp;&nbsp;&nbsp;'.
         &Apache::edit::insertlist($target,$token)          &Apache::edit::insertlist($target,$token).'&nbsp;&nbsp;&nbsp;'
          .&Apache::loncommon::help_open_topic('Function_Plot_Response_Elements','Function Plot Elements')
        .'</span></td>'         .'</span></td>'
        ."<td>&nbsp;"         ."<td>&nbsp;"
        .&Apache::edit::end_row()         .&Apache::edit::end_row()

Removed from v.1.49  
changed lines
  Added in v.1.54


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