Subversion Repositories wimsdev

Rev

Rev 6713 | Rev 6718 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <script type="text/javascript"  src="$jsdir/geogebra2wims.js"></script>
  2. <script type="text/javascript">
  3. //<![CDATA[
  4. <!-- no validator -->
  5.     function dontknow(){
  6.         myConfirm('$dontknow','?','$wims_ref_name','$session','$module','$counter','$nok_send_color');
  7.     }
  8.     <!-- do not use "' in description -->
  9.    var descr_list="$description";
  10.    var descr_cnt = 30;
  11.    var description = make_description(descr_list,descr_cnt);
  12.    
  13.    var list_of_things=new Array();
  14.    
  15.    !if $list_of_things=$empty
  16.         !! A list of all possible object names
  17.         list_of_things=['text','point','line','segment','circle','function','polygon','conic','ellipse','polynomial','vector','number','angle'];
  18.    !else
  19.         list_of_things=$list_of_things
  20.    !endif
  21.    function sendanswer(){
  22.         var reply=geogebra2wims(list_of_things);
  23.         var test=reply.split(",");var found_nothing=0;
  24.         for(var p=0;p<test.length;p++){
  25.             if(test[p] == 0){found_nothing++;}
  26.         }
  27.         if(found_nothing == test.length){setAlarm(r35+"<br /> hmmm ? ");return;}
  28.         !! geogebra2wims will send values from myinput0 as
  29.         !! text=input0@input1@input2....@input_n
  30.         myConfirm("<br />$send<br />",reply,'$wims_ref_name','$session','$module','$counter','$ok_send_color');
  31.    }
  32. //]]>
  33. </script>
  34. <table id="exercise" class="exercise">
  35.    <tr>
  36.    <td class="exercise_t">
  37.         !if $(question$n) != $empty
  38.             $(question$n)
  39.             <br />
  40.         !endif
  41.         !if $(formula$n) != $empty
  42.             !if $display=1234
  43.                 !insmath $$$$ $(formula$n) $$$$
  44.             !else
  45.                 !insmath $(formula$n)
  46.             !endif
  47.         !endif
  48.         !if $exotext != $empty
  49.             <br />
  50.             $exotext
  51.         !endif
  52.         !if $inputs>0
  53.             !set a_items=!itemcnt $(answer$n)
  54.             !if $inputs != $a_items
  55.                 !set use_lines=1
  56.             !else
  57.                 !set use_lines=0
  58.             !endif
  59.             <table class="zebra_table_h2">
  60.                 !for i=1 to $inputs
  61.                     !if $wims_user=supervisor
  62.                         !if $use_lines=1
  63.                             !set voorzeggen=!line $i of $(answer$n)
  64.                         !else
  65.                             !set voorzeggen=!item $i of $(answer$n)
  66.                         !endif
  67.                         <tr><td>$(description[$i])</td><td>$m_rightarrow</td><td><input id="myinput$[$i-1]" class="schaersvoorde_textarea" size="$cols" value="$voorzeggen" /></td><td>&nbsp;$(ex$p)</td></tr>
  68.                     !else
  69.                         <tr><td>$(description[$i])</td><td>$m_rightarrow</td><td><input id="myinput$[$i-1]" class="schaersvoorde_textarea" size="$cols" value="" /></td><td>&nbsp;$(ex$p)</td></tr>
  70.                     !endif
  71.                 !next i
  72.             </table>
  73.         !endif
  74.    </td>
  75. !if $make_tr=1
  76.    </tr>
  77.    <tr>
  78. !endif
  79. !set server=!replace internal /wims.cgi by $empty in $wims_ref_name
  80.    <td class="exercise_c">
  81.         <!-- we use the GeoGebra startbutton (12/2012) -->
  82.         <!-- attention wims variable customToolbar for "param customToolbar" should be like  " 0 | 3 | 5 " spaces matter !   -->
  83.         <!-- 15/6/2013 switched to Geogebra3 : to correct trouble on OpenJDK & icedtea-web plugin -->
  84.         <object classid="java:geogebra.GeoGebraApplet.class" type="application/x-java-applet;jpi-version=1.4" id="ggbApplet" width="164px" height="48px" >
  85.         <param name="java_code" value="geogebra.GeoGebraApplet" />
  86.         <param name="java_codebase" value="java/geogebra3" />
  87.         <param name="java_archive" value="geogebra.jar" />
  88.         <param name="language" value="$taal" />
  89.         <param name="type" value="button" />
  90.         <param name="filename" value="$server/$module_dir/$ggb" />
  91.         <param name="showToolBar"  value="$showToolBar" />
  92.         <param name="showMenuBar"  value="$showMenuBar" />
  93.         <param name="framePossible" value="$framePossible" />
  94.         <param name="customToolBar" value=$customToolBar />
  95.         <param name="showAlgebraInput" value="$showAlgebraInput" />
  96.         <param name="mayscript" value="true" />
  97.         <a onmouseover="return escape('<img src=\'$gifdir/java.jpg\' alt=\'Get JAVA\' />');" href="http://www.java.com/$lang/download/manual.jsp?locale=$lang" >$nojava</a></object>
  98.         !if $appletcommand != $empty
  99.             <script type="text/javascript">
  100.             //<![CDATA[
  101.                 $appletcommand
  102.             //]]>
  103.             </script>
  104.         !endif
  105.     </td>
  106.     </tr>
  107. </table>
  108.  
  109. <div id="send_buttons" class="embedded_central">
  110.     <input type="button" id="schaersvoorde_ok_button" onclick="javascript:sendanswer();" value="$send" />
  111.     <input type="button" id="schaersvoorde_nok_button" onclick="javascript:dontknow();" value="$dontknow" />
  112. </div>
  113.  
  114. !exit
  115.