Subversion Repositories wimsdev

Rev

Rev 6851 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! produces a DHTML page of the  exercise for printing
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">         
  3. <html xml:lang="$lang" xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML">
  4. <head>
  5. <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />
  6. <title>$module_title</title>
  7. </head>
  8. <body>
  9. !if $questiontype !=0 or $applet=1
  10.     <span class="schaersvoorde_alarm">
  11.         My guess : this page not very usefull in a printed paperversion<br />
  12.         It's most likely a multiplechoice exercise<br />
  13.         or it makes use of some java applets ?
  14.         <br />
  15.         You can always try your browser "print functionality" on the interactive version, and see what happens.
  16.         <br />
  17.    !href module=home Back
  18.    </a>
  19.    </span>
  20. !else
  21.    <script src="$jsdir/wz_dragdrop.js"></script>
  22.    !set DHTML=$empty
  23.    <table id="exercise" class="exercise">
  24.         <tr>
  25.         !set cnt=0
  26.         !if $total_exos >4
  27.             !set limited=I've limited your request for $total_exos exercises to a modest 4 piece papertest
  28.             !set total_exos=4
  29.         !endif
  30.         !for n=1 to $total_exos
  31.             !set counter=$n
  32.             !set question$n=$empty
  33.             !set exotext=$empty
  34.             !set formula$n=$empty
  35.             !set answer$n=$empty
  36.             !set options=0
  37.             !readproc exos/exo$subject
  38.             <tr>
  39.             <td>
  40.                 <div id="d1_$n" name="d1_$n" style="position:relative;font-size:70%">
  41.                     $questionnumber $n)<br />
  42.                     !if $(question$n) != $empty
  43.                         $(question$n)
  44.                         <br />
  45.                     !endif
  46.                     !set DHTML=!append item "d1_$n" to $DHTML
  47.                 </div>
  48.                     !if $exotext != $empty
  49.                         <div id="d2_$n" name="d2_$n" style="position:relative;font-size:70%">
  50.                             <br />
  51.                             $exotext
  52.                             !set DHTML=!append item "d2_$n" to $DHTML
  53.                         </div>
  54.                     !endif
  55.                 !if $(formula$n) != $empty
  56.                     <br />
  57.                     !set formula$n=$(formula$n) \,\,
  58.                     <div id="d3_$n" name="d3_$n" style="position:relative;font-size:70%">
  59.                         !insmath $(formula$n)
  60.                     </div>
  61.                     !set DHTML=!append item "d3_$n" to $DHTML
  62.                     !! this will be an image, I hope...if not we are in deep DHTML trouble
  63.                 !endif
  64.             </td>
  65.             </tr>
  66.         !next n
  67.     </table>
  68.     !if $image=1
  69.         !if $xsize=$empty
  70.             !set xsize=100
  71.             !set ysize=100
  72.         !endif
  73.         !if $xsize>400 and $xsize<625
  74.         !! als xsize echt 450 hebben we een speciale bedoeling met dat plaatje, hoop ik...
  75.             !set xsize=220
  76.         !endif
  77.         !set insdraw_size=$xsize,$ysize
  78.         !for n=1 to $total_exos
  79.             !increase cnt
  80.             !set ins_attr=name="insert$cnt"
  81.             <div id="d4_$n" name="d4_$n" style="position:relative;width:$xsize;height:$ysize">
  82.                 !if $plot=1
  83.                     !set insplot_set=$(image_settings$n)
  84.                     !insplot $(image$n)
  85.                 !else
  86.                     !insdraw $(image$n)
  87.                 !endif
  88.             </div>
  89.             !set DHTML=!append item "d4_$n" to $DHTML
  90.             <br />
  91.         !next n
  92.     !endif
  93.     <p style="page-break-after:always">
  94.     <hr />
  95.         <ol>
  96.         !for n=1 to $total_exos
  97.             <li>
  98.             !if $(textanswer$n)!=$empty
  99.                 <div id="d5_$n" name="d5_$n" style="position:relative;font-size:70%">
  100.                 $(textanswer$n)
  101.                 </div>
  102.                 <br />
  103.                 !set DHTML=!append item "d5_$n" to $DHTML
  104.             !endif
  105.             !if $(texanswer$n)!=$empty
  106.                 <div id="d6_$n" name="d6_$n" style="position:relative;font-size:70%">
  107.                 !insmath $(texanswer$n)
  108.                 </div>
  109.                 !set DHTML=!append item "d6_$n" to $DHTML
  110.             !else
  111.                 $(answer$n)
  112.             !endif
  113.         !next n
  114.         </ol>
  115.         $limited
  116.     </hr />
  117.     </p>
  118.  
  119. <p style="page-break-after:always">&nbsp;</p>
  120. !record 69 of $remarkdir/commonremarks.$taal
  121. <br />
  122. !href module=$module&+session=$session&+cmd=intro
  123. !record 70 of $remarkdir/commonremarks.$taal
  124.  
  125. <p style="page-break-after:always">&nbsp;</p>
  126.  
  127. <script>
  128. //<![CDATA[
  129.  
  130.     function print_this(){
  131.     window.print();
  132.     }
  133.     SET_DHTML( CURSOR_MOVE, RESIZABLE , NO_ALT , SCROLL , $DHTML );
  134. //]]>
  135. </script>
  136. <input type="button" value="print" onclick="javascript:print_this();" />
  137. !endif
  138.  
  139. </body>
  140. </html>
  141. !exit
  142.